Commit Graph

3 Commits

Author SHA1 Message Date
Dan Albert
5831e92366 Remove more hard float crap.
Ugh. We had redefinitions of all the __builtin_* math functions in
here.

Test: ./checkbuild.py
Bug: https://github.com/android-ndk/ndk/issues/142
Change-Id: Iec187c3a542e2dc9b3d628c2a9aa3fb45d7986ef
2016-08-02 10:24:19 -07:00
Andrew Hsieh
3598d53b42 Drop clang version check for __builtin_isinf and __builtin_isnan
This CL unconditionally removes the existance of __builtin_isinf and
__builtin_isnan from math.h for clang, because (unlike other math functions)
clang doesn't like those to be declared.

See LLVM bugzilla entry: http://llvm.org/bugs/show_bug.cgi?id=20958

The reason for decorating all math functions with __attribute__((pcs("aapcs")))
is to offer developers the ability to compile their code with hardfp and still
link Android's libm.so which follows softfp calling convention.

Before issue 20958 is fixed, those who want clang to compile their code with
hardfp in NDK has to go all the way hard, ie.
1) LOCAL_CFLAGS += -mhard-float -D_NDK_MATH_NO_SOFTFP=1
   Note that _NDK_MATH_NO_SOFTFP=1 remove __attribute__((pcs("aapcs"))) for all math functions
2) LOCAL_LDLIBS += -lm_hard  # link libm_hard.a recompiled with -mhard-float instead of bionic libm.so

Change-Id: Ie2f95e73e58e1574e8cadbcab92a5209d94448e1
2015-01-16 14:24:04 -08:00
Andrew Hsieh
da84168fb2 Rename android-L to android-21
Change-Id: I1e781b15a867cf6283756f35f2b5955c96637c39
2014-10-15 10:48:04 +08:00