From 51e6a59b8dc3f22323f7a1b182eeea4de5716100 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 20 May 2017 19:16:05 +0200 Subject: [PATCH] Android: use PLATFORM 16 by default, don't bother with compat for API 21 --- dist-build/android-armv8-a.sh | 2 +- dist-build/android-build.sh | 12 +++++++----- dist-build/android-mips64.sh | 2 +- dist-build/android-x86_64.sh | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/dist-build/android-armv8-a.sh b/dist-build/android-armv8-a.sh index 14e61ef2..1bf13ae8 100755 --- a/dist-build/android-armv8-a.sh +++ b/dist-build/android-armv8-a.sh @@ -1,4 +1,4 @@ #!/bin/sh export TARGET_ARCH=armv8-a export CFLAGS="-Os -march=${TARGET_ARCH}" -NDK_PLATFORM_COMPAT=android-21 ARCH=arm64 HOST_COMPILER=aarch64-linux-android "$(dirname "$0")/android-build.sh" +NDK_PLATFORM=android-21 ARCH=arm64 HOST_COMPILER=aarch64-linux-android "$(dirname "$0")/android-build.sh" diff --git a/dist-build/android-build.sh b/dist-build/android-build.sh index 42422411..c1ff9b95 100755 --- a/dist-build/android-build.sh +++ b/dist-build/android-build.sh @@ -1,11 +1,9 @@ #! /bin/sh if [ -z "$NDK_PLATFORM" ]; then - export NDK_PLATFORM="android-24" - export NDK_PLATFORM_COMPAT="${NDK_PLATFORM_COMPAT:-android-16}" -else - export NDK_PLATFORM_COMPAT="${NDK_PLATFORM_COMPAT:-${NDK_PLATFORM}}" + export NDK_PLATFORM="android-16" fi +export NDK_PLATFORM_COMPAT="${NDK_PLATFORM_COMPAT:-${NDK_PLATFORM}}" export NDK_API_VERSION=$(echo "$NDK_PLATFORM" | sed 's/^android-//') export NDK_API_VERSION_COMPAT=$(echo "$NDK_PLATFORM_COMPAT" | sed 's/^android-//') @@ -36,7 +34,11 @@ export CC=${CC:-"${HOST_COMPILER}-clang"} rm -rf "${TOOLCHAIN_DIR}" "${PREFIX}" echo -echo "Building for platform [${NDK_PLATFORM}], retaining compatibility with platform [${NDK_PLATFORM_COMPAT}]" +if [ "$NDK_PLATFORM" != "$NDK_PLATFORM_COMPAT" ]; then + echo "Building for platform [${NDK_PLATFORM}], retaining compatibility with platform [${NDK_PLATFORM_COMPAT}]" +else + echo "Building for platform [${NDK_PLATFORM}]" +fi echo env - PATH="$PATH" \ diff --git a/dist-build/android-mips64.sh b/dist-build/android-mips64.sh index f4f3385f..75dd6eaa 100755 --- a/dist-build/android-mips64.sh +++ b/dist-build/android-mips64.sh @@ -1,4 +1,4 @@ #!/bin/sh export TARGET_ARCH=mips64r6 export CFLAGS="-Os -march=${TARGET_ARCH}" -CC="mips64el-linux-android-gcc" NDK_PLATFORM_COMPAT=android-21 ARCH=mips64 HOST_COMPILER=mips64el-linux-android "$(dirname "$0")/android-build.sh" +CC="mips64el-linux-android-gcc" NDK_PLATFORM=android-21 ARCH=mips64 HOST_COMPILER=mips64el-linux-android "$(dirname "$0")/android-build.sh" diff --git a/dist-build/android-x86_64.sh b/dist-build/android-x86_64.sh index 5314d5e9..9f2b4f0a 100755 --- a/dist-build/android-x86_64.sh +++ b/dist-build/android-x86_64.sh @@ -1,4 +1,4 @@ #!/bin/sh export TARGET_ARCH=westmere export CFLAGS="-Os -march=${TARGET_ARCH}" -NDK_PLATFORM_COMPAT=android-21 ARCH=x86_64 HOST_COMPILER=x86_64-linux-android "$(dirname "$0")/android-build.sh" +NDK_PLATFORM=android-21 ARCH=x86_64 HOST_COMPILER=x86_64-linux-android "$(dirname "$0")/android-build.sh"