From a00442bee64a720665b6271b174908fe0386c9ca Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sun, 17 Jul 2016 23:39:58 +0900 Subject: [PATCH] Work with Android NDK r12b clang + libc++ does not work, it still requires libc++_shared.so runtime even if -lstdc++ is used, which supposed to link with static version of libc++. --- android-config | 5 ++--- doc/sources/building-android-binary.rst | 15 +++++---------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/android-config b/android-config index e3a88179..af259636 100755 --- a/android-config +++ b/android-config @@ -39,9 +39,8 @@ PATH="$TOOLCHAIN"/bin:"$PATH" --without-libxml2 \ --disable-python-bindings \ --disable-examples \ - --enable-werror \ - CC="$TOOLCHAIN"/bin/clang \ - CXX="$TOOLCHAIN"/bin/clang++ \ + CC="$TOOLCHAIN"/bin/arm-linux-androideabi-gcc \ + CXX="$TOOLCHAIN"/bin/arm-linux-androideabi-g++ \ CPPFLAGS="-fPIE -I$PREFIX/include" \ PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \ LDFLAGS="-fPIE -pie -L$PREFIX/lib" diff --git a/doc/sources/building-android-binary.rst b/doc/sources/building-android-binary.rst index 27e6d7b3..15d0a0ff 100644 --- a/doc/sources/building-android-binary.rst +++ b/doc/sources/building-android-binary.rst @@ -21,17 +21,12 @@ unpacked: .. code-block:: text - $ build/tools/make-standalone-toolchain.sh \ - --install-dir=$ANDROID_HOME/toolchain \ - --toolchain=arm-linux-androideabi-4.9 \ - --llvm-version=3.5 \ - --platform=android-16 + $ build/tools/make_standalone_toolchain.py \ + --arch arm --api 16 --stl gnustl + --install-dir $ANDROID_HOME/toolchain -The additional flag ``--system=linux-x86_64`` may be required if you -are using x86_64 system. - -The platform level is not important here because we don't use Android -specific C/C++ API. +The API level (``--api``) is not important here because we don't use +Android specific C/C++ API. The dependent libraries, such as OpenSSL and libev should be built with the toolchain and installed under ``$ANDROID_HOME/usr/local``.