Compile with android NDK r10b 32bit target
Android does not have _Exit. We detect this and use _exit instead. clang-3.4 has an issue around undefined reference to __atomic_fetch_add_4, so we stick to gcc-4.8 for now.
This commit is contained in:
parent
5ff73de195
commit
d00d4d647d
|
@ -40,8 +40,6 @@ PATH=$TOOLCHAIN/bin:$PATH
|
||||||
--disable-python-bindings \
|
--disable-python-bindings \
|
||||||
--disable-examples \
|
--disable-examples \
|
||||||
--disable-threads \
|
--disable-threads \
|
||||||
CC=arm-linux-androideabi-clang \
|
|
||||||
CXX=arm-linux-androideabi-clang++ \
|
|
||||||
CPPFLAGS="-I$PREFIX/include" \
|
CPPFLAGS="-I$PREFIX/include" \
|
||||||
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
|
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
|
||||||
LDFLAGS="-L$PREFIX/lib"
|
LDFLAGS="-L$PREFIX/lib"
|
||||||
|
|
|
@ -437,6 +437,7 @@ if test "x$cross_compiling" != "xyes"; then
|
||||||
AC_FUNC_MALLOC
|
AC_FUNC_MALLOC
|
||||||
fi
|
fi
|
||||||
AC_CHECK_FUNCS([ \
|
AC_CHECK_FUNCS([ \
|
||||||
|
_Exit \
|
||||||
getpwnam \
|
getpwnam \
|
||||||
memmove \
|
memmove \
|
||||||
memset \
|
memset \
|
||||||
|
|
|
@ -16,8 +16,7 @@ unpacked::
|
||||||
|
|
||||||
$ build/tools/make-standalone-toolchain.sh \
|
$ build/tools/make-standalone-toolchain.sh \
|
||||||
--install-dir=$ANDROID_HOME/toolchain \
|
--install-dir=$ANDROID_HOME/toolchain \
|
||||||
--toolchain=arm-linux-androideabi-4.8 \
|
--toolchain=arm-linux-androideabi-4.8
|
||||||
--llvm-version=3.4
|
|
||||||
|
|
||||||
The additional flag ``--system=linux-x86_64`` may be required if you
|
The additional flag ``--system=linux-x86_64`` may be required if you
|
||||||
are using x86_64 system.
|
are using x86_64 system.
|
||||||
|
|
|
@ -44,6 +44,10 @@
|
||||||
#define SOCK_CLOEXEC 0
|
#define SOCK_CLOEXEC 0
|
||||||
#endif // !SOCK_CLOEXEC
|
#endif // !SOCK_CLOEXEC
|
||||||
|
|
||||||
|
#ifndef HAVE__EXIT
|
||||||
|
#define _Exit(status) _exit(status)
|
||||||
|
#endif // !HAVE__EXIT
|
||||||
|
|
||||||
#define DIE() \
|
#define DIE() \
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue