summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-01-25 10:45:29 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-02-16 20:32:46 +0000
commit7e4ffea3187534326232588860e335989602e90b (patch)
tree512b98625dc1ea86675af26c270a1d1b7b67860e /configure.ac
parentd07962c0b1395aa5edf21ba2ddbbc0574bf464b7 (diff)
android: Use libc++_shared path that works for NDK 25, too
While e.g. NDK 23.0.7599858 has both, `$HOME/Android/Sdk/ndk/23.0.7599858/sources/cxx-stl/llvm-libc++/libs/x86/libc++_shared.so` and `$HOME/Android/Sdk/ndk/23.0.7599858/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/i686-linux-android/libc++_shared.so` (with the same content), NDK 25.1.8937393 no longer ships that under the former path scheme, just the latter. Therefore, use that one when copying the library, in preparation to add support for NDK 24 and 25. Change-Id: I20894701f4f436f41781467b57ec4f5311a8317f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146133 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 8 insertions, 2 deletions
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