summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--android/Bootstrap/Makefile.shared2
-rw-r--r--config_host.mk.in2
-rw-r--r--configure.ac10
3 files changed, 11 insertions, 3 deletions
diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared
index aec361ff24c0..951ee1450ec7 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -71,7 +71,7 @@ $(SODEST)/nss-libraries :
mkdir -p $(SODEST)
$(foreach lib,$(NSSLIBS),$(STRIP) -o $(SODEST)/lib$(lib).so $(INSTDIR)/$(LIBO_LIB_FOLDER)/lib$(lib).so;)
-$(SODEST)/libc++_shared.so : $(ANDROID_NDK_DIR)/sources/cxx-stl/llvm-libc++/libs/$(ANDROID_APP_ABI)/libc++_shared.so
+$(SODEST)/libc++_shared.so : $(ANDROID_TOOLCHAIN)/sysroot/usr/lib/$(ANDROID_SYSROOT_PLATFORM)/libc++_shared.so
mkdir -p $(SODEST)
cp $< $@
diff --git a/config_host.mk.in b/config_host.mk.in
index b400827a2ce9..847e5af06a46 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -19,7 +19,9 @@ export ANDROID_NDK_DIR=@ANDROID_NDK_DIR@
export ANDROID_API_LEVEL=@ANDROID_API_LEVEL@
export ANDROID_APP_ABI=@ANDROID_APP_ABI@
export ANDROID_SDK_DIR=@ANDROID_SDK_DIR@
+export ANDROID_SYSROOT_PLATFORM=@ANDROID_SYSROOT_PLATFORM@
export ANDROID_PACKAGE_NAME=@ANDROID_PACKAGE_NAME@
+export ANDROID_TOOLCHAIN=@ANDROID_TOOLCHAIN@
export ANDROID_GCC_TOOLCHAIN_VERSION=@ANDROID_GCC_TOOLCHAIN_VERSION@
export ANT=@ANT@
export ANT_HOME=@ANT_HOME@
diff --git a/configure.ac b/configure.ac
index 0d4dca6516b1..6707b808ef18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -721,10 +721,12 @@ if test -n "$with_android_ndk"; then
if test $host_cpu = arm; then
LLVM_TRIPLE=armv7a-linux-androideabi
+ ANDROID_SYSROOT_PLATFORM=arm-linux-androideabi
ANDROID_APP_ABI=armeabi-v7a
ANDROIDCFLAGS="-mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon -Wl,--fix-cortex-a8"
elif test $host_cpu = aarch64; then
LLVM_TRIPLE=aarch64-linux-android
+ ANDROID_SYSROOT_PLATFORM=$LLVM_TRIPLE
# minimum android version that supports aarch64
if test "$ANDROID_API_LEVEL" -lt "21" ; then
ANDROID_API_LEVEL=21
@@ -732,6 +734,7 @@ if test -n "$with_android_ndk"; then
ANDROID_APP_ABI=arm64-v8a
elif test $host_cpu = x86_64; then
LLVM_TRIPLE=x86_64-linux-android
+ ANDROID_SYSROOT_PLATFORM=$LLVM_TRIPLE
# minimum android version that supports x86_64
ANDROID_API_LEVEL=21
ANDROID_APP_ABI=x86_64
@@ -739,6 +742,7 @@ if test -n "$with_android_ndk"; then
# host_cpu is something like "i386" or "i686" I guess, NDK uses
# "x86" in some contexts
LLVM_TRIPLE=i686-linux-android
+ ANDROID_SYSROOT_PLATFORM=$LLVM_TRIPLE
ANDROID_APP_ABI=x86
fi
@@ -770,8 +774,8 @@ if test -n "$with_android_ndk"; then
# ndk would also support windows and windows-x86_64
;;
esac
- android_TOOLCHAIN=$ANDROID_NDK_DIR/toolchains/llvm/prebuilt/$android_HOST_TAG
- ANDROID_COMPILER_BIN=$android_TOOLCHAIN/bin
+ ANDROID_TOOLCHAIN=$ANDROID_NDK_DIR/toolchains/llvm/prebuilt/$android_HOST_TAG
+ ANDROID_COMPILER_BIN=$ANDROID_TOOLCHAIN/bin
test -z "$AR" && AR=$ANDROID_COMPILER_BIN/llvm-ar
test -z "$NM" && NM=$ANDROID_COMPILER_BIN/llvm-nm
@@ -802,6 +806,8 @@ AC_SUBST(ANDROID_NDK_DIR)
AC_SUBST(ANDROID_API_LEVEL)
AC_SUBST(ANDROID_APP_ABI)
AC_SUBST(ANDROID_GCC_TOOLCHAIN_VERSION)
+AC_SUBST(ANDROID_SYSROOT_PLATFORM)
+AC_SUBST(ANDROID_TOOLCHAIN)
dnl ===================================================================
dnl --with-android-sdk