aboutsummaryrefslogtreecommitdiffstats
path: root/make/scripts
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-12-24 04:05:32 +0100
committerSven Gothel <[email protected]>2019-12-24 04:05:32 +0100
commitaeae740ba2569d839820bfc20c43a8550ab8ed33 (patch)
tree4e1d62603d3353f9f177986dea90e3397b50f286 /make/scripts
parent26d06324312b8fe6980ff29ab9d443cc5ec2657f (diff)
Bug 1417 - Android: Add ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH for arch specific includes like asm/types.h
Also adapt make/lib/gluegen-cpptask-android* files: - Set C++ stdlib = libstdc++ - Set isysroot (same as sysroot) - Add isystem: *_SYSROOT1_INC, *_SYSROOT1_INC_ARCH and *_SYSROOT1_INC/c++/v1
Diffstat (limited to 'make/scripts')
-rw-r--r--make/scripts/setenv-android-tools.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/make/scripts/setenv-android-tools.sh b/make/scripts/setenv-android-tools.sh
index 1742c97..e507940 100644
--- a/make/scripts/setenv-android-tools.sh
+++ b/make/scripts/setenv-android-tools.sh
@@ -44,6 +44,7 @@
# - ANDROID_TOOLCHAIN_SYSROOT0_LIB
# - ANDROID_TOOLCHAIN_SYSROOT1
# - ANDROID_TOOLCHAIN_SYSROOT1_INC
+# - ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH
# - ANDROID_TOOLCHAIN_SYSROOT1_LIB
#
# Android Studio SDK + NDK Filesystem Layout (official)
@@ -64,6 +65,7 @@
# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/bin/clang (*)
# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot (2)
# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android/asm/types.h (*) (2,3)
# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/libc.a (*)
# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/libc.a (*) (2)
# ~/Android/Sdk/ndk/20.1.5948944/platforms/android-24/arch-arm64 (1)
@@ -72,6 +74,7 @@
# (*) tested by this script
# (1) ANDROID_TOOLCHAIN_SYSROOT0 exposes all libs with standard FS layout usr/lib, but no include files
# (2) ANDROID_TOOLCHAIN_SYSROOT1 exposes all libs but without standard FS layout, also exposes include files
+# (3) ANDROID_TOOLCHAIN_SYSROOT1 also exposes the arch dependent include files, i.e. asm/types.h etc
# Native libraries of (1) and (2) are identical
#
# Having
@@ -151,6 +154,7 @@ echo ANDROID_TOOLCHAIN_SYSROOT0 ${ANDROID_TOOLCHAIN_SYSROOT0}
echo ANDROID_TOOLCHAIN_SYSROOT0_LIB ${ANDROID_TOOLCHAIN_SYSROOT0_LIB}
echo ANDROID_TOOLCHAIN_SYSROOT1 ${ANDROID_TOOLCHAIN_SYSROOT1}
echo ANDROID_TOOLCHAIN_SYSROOT1_INC ${ANDROID_TOOLCHAIN_SYSROOT1_INC}
+echo ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH ${ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH}
echo ANDROID_TOOLCHAIN_SYSROOT1_LIB ${ANDROID_TOOLCHAIN_SYSROOT1_LIB}
echo
@@ -245,6 +249,7 @@ ANDROID_TOOLCHAIN_SYSROOT0_LIB=${ANDROID_TOOLCHAIN_SYSROOT0}/usr/lib
ANDROID_TOOLCHAIN_SYSROOT1=${ANDROID_TOOLCHAIN_ROOT}/sysroot
ANDROID_TOOLCHAIN_SYSROOT1_INC=${ANDROID_TOOLCHAIN_SYSROOT1}/usr/include
+ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH=${ANDROID_TOOLCHAIN_SYSROOT1}/usr/include/${ANDROID_TOOLCHAIN_NAME}
ANDROID_TOOLCHAIN_SYSROOT1_LIB=${ANDROID_TOOLCHAIN_SYSROOT1}/usr/lib/${ANDROID_TOOLCHAIN_NAME}/${ANDROID_API_LEVEL}
# ~/Android/Sdk/build-tools/29.0.2/zipalign (*)
@@ -259,6 +264,9 @@ check_exists ${ANDROID_TOOLCHAIN_ROOT}/bin/clang
# ~/Android/Sdk/ndk/20.1.5948944/platforms/android-24/arch-arm64/usr/lib/libc.a (*)
check_exists ${ANDROID_TOOLCHAIN_SYSROOT0_LIB}/libc.a
+# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/aarch64-linux-android/asm/types.h (*) (2)
+check_exists ${ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH}/asm/types.h
+
# ~/Android/Sdk/ndk/20.1.5948944/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/24/libc.a (*)
check_exists ${ANDROID_TOOLCHAIN_SYSROOT1_LIB}/libc.a
@@ -280,6 +288,7 @@ export ANDROID_TOOLCHAIN_SYSROOT0
export ANDROID_TOOLCHAIN_SYSROOT0_LIB
export ANDROID_TOOLCHAIN_SYSROOT1
export ANDROID_TOOLCHAIN_SYSROOT1_INC
+export ANDROID_TOOLCHAIN_SYSROOT1_ARCH
export ANDROID_TOOLCHAIN_SYSROOT1_LIB
echo "Postset-0 (user)"
@@ -303,6 +312,7 @@ echo ANDROID_TOOLCHAIN_SYSROOT0 ${ANDROID_TOOLCHAIN_SYSROOT0}
echo ANDROID_TOOLCHAIN_SYSROOT0_LIB ${ANDROID_TOOLCHAIN_SYSROOT0_LIB}
echo ANDROID_TOOLCHAIN_SYSROOT1 ${ANDROID_TOOLCHAIN_SYSROOT1}
echo ANDROID_TOOLCHAIN_SYSROOT1_INC ${ANDROID_TOOLCHAIN_SYSROOT1_INC}
+echo ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH ${ANDROID_TOOLCHAIN_SYSROOT1_INC_ARCH}
echo ANDROID_TOOLCHAIN_SYSROOT1_LIB ${ANDROID_TOOLCHAIN_SYSROOT1_LIB}
echo