summaryrefslogtreecommitdiff
path: root/android-config
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2019-09-15 11:15:29 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2019-09-15 11:15:29 +0900
commit9f5758570a51feca6a468aea6a29377566addd87 (patch)
tree66f309325e748781bee6e62f35f7e4dadc51f6fe /android-config
parent7f6578aa7d9b2618aed13917c5681b93683a37a7 (diff)
Update android build dependencies
Update android build dependencies. Use android NDK r20 and build aarch64 binary.
Diffstat (limited to 'android-config')
-rwxr-xr-xandroid-config20
1 files changed, 14 insertions, 6 deletions
diff --git a/android-config b/android-config
index 0f065335..71914045 100755
--- a/android-config
+++ b/android-config
@@ -35,12 +35,15 @@ if [ -z "$ANDROID_HOME" ]; then
echo 'No $ANDROID_HOME specified.'
exit 1
fi
+if [ -z "$NDK" ]; then
+ echo 'No $NDK specified.'
+ exit 1
+fi
PREFIX=$ANDROID_HOME/usr/local
-TOOLCHAIN=$ANDROID_HOME/toolchain
-PATH=$TOOLCHAIN/bin:$PATH
+TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
./configure \
- --host=arm-linux-androideabi \
+ --host=aarch64-linux-android \
--build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` \
--disable-nls \
--without-gnutls \
@@ -51,10 +54,15 @@ PATH=$TOOLCHAIN/bin:$PATH
--with-libcares \
--with-libz \
--with-libssh2 \
- CC="$TOOLCHAIN"/bin/arm-linux-androideabi-clang \
- CXX="$TOOLCHAIN"/bin/arm-linux-androideabi-clang++ \
+ AR=$TOOLCHAIN/bin/aarch64-linux-android-ar \
+ AS=$TOOLCHAIN/bin/aarch64-linux-android-as \
+ CC=$TOOLCHAIN/bin/aarch64-linux-android29-clang \
+ CXX=$TOOLCHAIN/bin/aarch64-linux-android29-clang++ \
+ LD=$TOOLCHAIN/bin/aarch64-linux-android-ld \
+ RANLIB=$TOOLCHAIN/bin/aarch64-linux-android-ranlib \
+ STRIP=$TOOLCHAIN/bin/aarch64-linux-android-strip \
CXXFLAGS="-Os -g" \
CFLAGS="-Os -g" \
CPPFLAGS="-fPIE" \
- LDFLAGS="-fPIE -pie -L$PREFIX/lib" \
+ LDFLAGS="-fPIE -pie -L$PREFIX/lib -static-libstdc++" \
PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig"