Upstream clang3.6 still doesn't allow change of calling convension of
__builtin_isnan from the default to "softfp" (via __attribute__((pcs("aapcs"))))
as required by bionic libm.so for 32-bit ARM. Let's hope clang3.7
fix that. See upstream bug http://llvm.org/bugs/show_bug.cgi?id=20958
Change-Id: Ibdcc1783ffa7cf2f36e733983bd6d912ad38df70
It appears that upstream 3.5 still can't accept __builtin_isnan redeclared
with calling convention, eg.
cat > isnan.c <<EOF
int __builtin_isnan(double) __attribute__((pcs("aapcs")));
EOF
clang -target armv5te-none-linux-androideabi -c isnan.c
isnan.c:1:5: error: function declared 'aapcs' here was previously declared without calling convention
int __builtin_isnan(double) __attribute__((pcs("aapcs")));
^
isnan.c:1:5: note: previous declaration is here
Change-Id: Iff466fd913c3deec27aa3ff355a208543028d368
Similar to clang 3.3, it seems that clang 3.4 declares an incompatible
function prototypes for __builtin_isnan(). To workaround this issue,
we should not declare the function prototype for __builtin_isnan().
Note: Though it may be good to fix this in clang type checker, like
__builtin_nexttoward(), however it seems non-trivial since __builtin_isnsn()
might be overloaded. We can revert this after we have fixed the
clang builtin definition.
Change-Id: I329b56225f3d229b0c141bb8414c4369f154efda
Annotate __builtin math functions with __NDK_FPABI_MATH__ too.
1. __attribute__((pcs("aapcs"))) has no effect on codegen when __buitlin
function is emitted inlined.
2. When __builtin call into regular function in Android's libm, it has
proper attribute which observes soft float-abi
Change-Id: I11e8b74fc22f3072b9ce849193e4a56e98c92d64
Allow user code to be compiled with "-mhard-float" for armeabi-v7a
(which implies -mfloat-abi=hard), and either link with
1. Android native APIs which use softfp, or
2. A customized libm_hard.a which is compiled with -mhard-float. Need
-D_NDK_MATH_NO_SOFTFP=1
See tests/device/hard-float/jni/Android.mk for details and restriction
on Clang
Change-Id: I773a842c73368e08b9a6cda0441e95a96fa303b2
This commit removes duplication of system headers per platform, i.e. remove
copies of common headers like <stdlib.h> from arch-arm/usr/include and arch-x86/usr/include
and move them to a common include directory. More specifically:
- common headers: android-N/arch-A/usr/include --> android-N/include
- arch-specific headers: android-N/arch-A/usr-include --> android-N/arch-A/include
- arch-specific libs: android-N/arch-A/usr/lib --> android-N/arch-A/lib
Change-Id: Ifdba5038d108901931f3e3a7c14ebe6270d2d276
NOTE: This also contains careful separation of API-level-specific headers.
For example, platforms/android-5/include/pthread.h contains new function
declarations that are not available when using platforms/android-3/include/pthread.h
NOTE: The NDK's build-platforms.sh script has been updated to understand the new
layout. This change in develeopment/ndk does not change the layout of
platform files under $NDK/platforms after build-platforms.sh is called.