Use clang to compile for Android. Except on mips64, where we have to stick to gcc.

This commit is contained in:
Frank Denis 2017-03-06 16:53:08 +01:00
parent 2abe6b9e05
commit eaf19f25d0
3 changed files with 5 additions and 3 deletions

View File

@ -31,6 +31,8 @@ export PREFIX="$(pwd)/libsodium-android-${TARGET_ARCH}"
export TOOLCHAIN_DIR="$(pwd)/android-toolchain-${TARGET_ARCH}"
export PATH="${PATH}:${TOOLCHAIN_DIR}/bin"
export CC=${CC:-"${HOST_COMPILER}-clang"}
rm -rf "${TOOLCHAIN_DIR}" "${PREFIX}"
echo

View File

@ -1,4 +1,4 @@
#!/bin/sh
export TARGET_ARCH=mips32
export CFLAGS="-Os -march=${TARGET_ARCH}"
ARCH=mips HOST_COMPILER=mipsel-linux-android "$(dirname "$0")/android-build.sh"
export CFLAGS="-Os"
ARCH=mips HOST_COMPILER=mips64el-linux-android "$(dirname "$0")/android-build.sh"

View File

@ -1,4 +1,4 @@
#!/bin/sh
export TARGET_ARCH=mips64r6
export CFLAGS="-Os -march=${TARGET_ARCH}"
NDK_PLATFORM_COMPAT=android-21 ARCH=mips64 HOST_COMPILER=mips64el-linux-android "$(dirname "$0")/android-build.sh"
CC="mips64el-linux-android-gcc" NDK_PLATFORM_COMPAT=android-21 ARCH=mips64 HOST_COMPILER=mips64el-linux-android "$(dirname "$0")/android-build.sh"