From 0022a42f5a39d1f9d3678b42bedfb7d1e1f7f3bc Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 8 Feb 2015 10:34:39 +0100 Subject: [PATCH] Don't build arm and armv7 android targets in the same directory --- dist-build/android-arm.sh | 5 +++-- dist-build/android-armv7.sh | 5 +++-- dist-build/android-build.sh | 4 ++-- dist-build/android-mips.sh | 5 +++-- dist-build/android-x86.sh | 5 +++-- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/dist-build/android-arm.sh b/dist-build/android-arm.sh index 04be368c..eb97828c 100755 --- a/dist-build/android-arm.sh +++ b/dist-build/android-arm.sh @@ -1,3 +1,4 @@ #!/bin/sh -export CFLAGS="-Os -mthumb -marm -march=armv6" -TARGET_ARCH=arm HOST_COMPILER=arm-linux-androideabi "$(dirname "$0")/android-build.sh" +export TARGET_ARCH=armv6 +export CFLAGS="-Os -mthumb -marm -march=${TARGET_ARCH}" +ARCH=arm HOST_COMPILER=arm-linux-androideabi "$(dirname "$0")/android-build.sh" diff --git a/dist-build/android-armv7.sh b/dist-build/android-armv7.sh index eb2ec7a0..a8725082 100755 --- a/dist-build/android-armv7.sh +++ b/dist-build/android-armv7.sh @@ -1,3 +1,4 @@ #!/bin/sh -export CFLAGS="-Os -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -marm -march=armv7-a" -TARGET_ARCH=arm HOST_COMPILER=arm-linux-androideabi "$(dirname "$0")/android-build.sh" +export TARGET_ARCH=armv7-a +export CFLAGS="-Os -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -marm -march=${TARGET_ARCH}" +ARCH=arm HOST_COMPILER=arm-linux-androideabi "$(dirname "$0")/android-build.sh" diff --git a/dist-build/android-build.sh b/dist-build/android-build.sh index b76dfd6c..babbcc05 100755 --- a/dist-build/android-build.sh +++ b/dist-build/android-build.sh @@ -11,7 +11,7 @@ if [ ! -f ./configure ]; then exit 1 fi -if [ "x$TARGET_ARCH" = 'x' ] || [ "x$HOST_COMPILER" = 'x' ]; then +if [ "x$TARGET_ARCH" = 'x' ] || [ "x$ARCH" = 'x' ] || [ "x$HOST_COMPILER" = 'x' ]; then echo "You shouldn't use android-build.sh directly, use android-[arch].sh instead" exit 1 fi @@ -26,7 +26,7 @@ export PATH="${PATH}:${TOOLCHAIN_DIR}/bin" rm -rf "${TOOLCHAIN_DIR}" "${PREFIX}" bash $MAKE_TOOLCHAIN --platform="${NDK_PLATFORM:-android-14}" \ - --arch="$TARGET_ARCH" \ + --arch="$ARCH" \ --install-dir="$TOOLCHAIN_DIR" && \ ./configure --host="${HOST_COMPILER}" \ --with-sysroot="${TOOLCHAIN_DIR}/sysroot" \ diff --git a/dist-build/android-mips.sh b/dist-build/android-mips.sh index 0fb04312..7242cb90 100755 --- a/dist-build/android-mips.sh +++ b/dist-build/android-mips.sh @@ -1,3 +1,4 @@ #!/bin/sh -export CFLAGS="-Os" -TARGET_ARCH=mips HOST_COMPILER=mipsel-linux-android "$(dirname "$0")/android-build.sh" +export TARGET_ARCH=mipsel +export CFLAGS="-Os -march=${TARGET_ARCH}" +ARCH=mips HOST_COMPILER=mipsel-linux-android "$(dirname "$0")/android-build.sh" diff --git a/dist-build/android-x86.sh b/dist-build/android-x86.sh index 428511bd..f21fe472 100755 --- a/dist-build/android-x86.sh +++ b/dist-build/android-x86.sh @@ -1,3 +1,4 @@ #!/bin/sh -export CFLAGS="-Os" -TARGET_ARCH=x86 HOST_COMPILER=i686-linux-android "$(dirname "$0")/android-build.sh" +export TARGET_ARCH=i686 +export CFLAGS="-Os -march=${TARGET_ARCH}" +ARCH=x86 HOST_COMPILER=i686-linux-android "$(dirname "$0")/android-build.sh"