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++.
This commit is contained in:
Tatsuhiro Tsujikawa 2016-07-17 23:39:58 +09:00
parent f857b63986
commit a00442bee6
2 changed files with 7 additions and 13 deletions

View File

@ -39,9 +39,8 @@ PATH="$TOOLCHAIN"/bin:"$PATH"
--without-libxml2 \ --without-libxml2 \
--disable-python-bindings \ --disable-python-bindings \
--disable-examples \ --disable-examples \
--enable-werror \ CC="$TOOLCHAIN"/bin/arm-linux-androideabi-gcc \
CC="$TOOLCHAIN"/bin/clang \ CXX="$TOOLCHAIN"/bin/arm-linux-androideabi-g++ \
CXX="$TOOLCHAIN"/bin/clang++ \
CPPFLAGS="-fPIE -I$PREFIX/include" \ CPPFLAGS="-fPIE -I$PREFIX/include" \
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \ PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig" \
LDFLAGS="-fPIE -pie -L$PREFIX/lib" LDFLAGS="-fPIE -pie -L$PREFIX/lib"

View File

@ -21,17 +21,12 @@ unpacked:
.. code-block:: text .. code-block:: text
$ build/tools/make-standalone-toolchain.sh \ $ build/tools/make_standalone_toolchain.py \
--install-dir=$ANDROID_HOME/toolchain \ --arch arm --api 16 --stl gnustl
--toolchain=arm-linux-androideabi-4.9 \ --install-dir $ANDROID_HOME/toolchain
--llvm-version=3.5 \
--platform=android-16
The additional flag ``--system=linux-x86_64`` may be required if you The API level (``--api``) is not important here because we don't use
are using x86_64 system. Android specific C/C++ API.
The platform level 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 The dependent libraries, such as OpenSSL and libev should be built
with the toolchain and installed under ``$ANDROID_HOME/usr/local``. with the toolchain and installed under ``$ANDROID_HOME/usr/local``.