char16_t and char32_t should not be defined when building as C. For
GCC they are, but not for clang. Pull in the updated bionic header
which has the fix for this.
Change-Id: I41b292ece36af79bbe835706bee4441b298215ff
From the comment about __NDK_FPABI__ vs __NDK_FPABI_MATH__:
NOTE: Disable for clang for now unless _NDK_MATH_NO_SOFTFP=1, because clang before 3.4 doesn't
allow change of calling convension for builtin and produces error message reads:
a.i:564:6: error: function declared 'aapcs' here was previously declared without calling convention
int sin(double d) __attribute__((pcs("aapcs")));
^
a.i:564:6: note: previous declaration is here
This applies to current clang as well, not just pre-3.4. Mark these
math functions as math functions.
Change-Id: I001b31df540aa3f61eec049f89346cbf2f11f128
GCC and Clang will not define __GNUC_STDC_INLINE__ when compiling C++, so this
macro currently implies regular C++ inline semantics in C++. This may cause
the compiler to emit an external definition of the function, which will cause
link errors when compiling with -fvisibility=hidden; see e.g. crbug.com/481902.
To fix this, also test the __cplusplus macro when deciding whether to assume
non-GNU inline semantics.
Change-Id: Icbd1f42279c2f65610e62f21d4a0a09d3b0e091c
Cherry pick bionic 86d2feef9f4df517dd5755b39b993bec0c3e1ea5 which
fixes struct stat64. This may look like breaking mips64 ABI, but mips64
support is stil work in progress post-L
Also see prebuilts/ndk e6639a4c0ba9296a19fd477154aace3585221d9d
Change-Id: Ia8859762191220b9d3127b37970f05594375ca40
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
When defined as char pointers, every compilation unit that includes
the NdkMediaDrm.h header defines a new copy of the same global
variables - leading to linker errors due to multiple definitions
if more than one file includes it.
By using a define, they don't generate any symbols. The NdkMediaFormat.h
header uses extern const char* for a similar set of keys, but that
can't be added after the actual platform has shipped. The other
alternative would be to declare them as static const char*, which
wouldn't generate global symbols, but which could trigger warnings
about unused static symbols instead.
The same change has already been applied in frameworks/av in
https://android-review.googlesource.com/120303.
Change-Id: I14ca81d94309b7f437b3bc144920c48a8b3f0261
1. move sgidefs.h to libc/arch-mips.
See bionic 6e50cb454451916ced315680f6c13dc08cf3959a
2. change type of u_ar0 from "unsigned long" to "struct user_regs_struct*".
See bionic e03950fa0c5567edf70d011b856a027e03b1c0f7
3. sync fts.h, dlext.h, sys/user.h
4. remove ' from string.h
Change-Id: I2ba58b0df4c655f107ea086efbd0220de2b40e9a
posix_memalign is added to libc.so for API 17, 18, 19 but prototype
is missing from stdlib.h
Turns out API 16 supports posix_memalign too. Add it as well
See b.android.com/77861
Change-Id: I940cdc60af9f98490001d67bef32fee556a3ac51
The common header include/linux/a.out.h include asm/a.out.h, but
arm64/mips/mips64 don't have it. Add a placeholder before bionic
has it
Change-Id: I7084e0beabe86fec32987a89e66d6c094f1e8c22
Macros putc, getc and their unlock cousins use internal functions and
variables not necessarily available in future libc.so (*1). Remove macros
and use functions aleady exists in libc.so instead.
(*1) https://android-review.googlesource.com/#/c/110662/
Change-Id: I3faa2d74de40ef8376119b38f2a39d46ece47d07
Add clock_settime() and clock_nanosleep() function
prototypes in time.h.
Change-Id: I0eb45e465b3b48b9d4f3a4a8109a6f2d9c4f8ce2
Signed-off-by: Haruki Hasegawa <h6a.h4i.0@gmail.com>