From 722eb6d1f98f979c131cd0a8c4b1944228d91789 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 31 May 2013 23:09:15 +0200 Subject: [PATCH] Added -uclibc for Android --- src/build/compile.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/build/compile.sh b/src/build/compile.sh index 09f2476a7d..00ee74f673 100755 --- a/src/build/compile.sh +++ b/src/build/compile.sh @@ -41,6 +41,7 @@ elif [ "$1" == "crosscompile" ]; then TOOLCHAIN_PREFIX="arm-none-linux-gnueabi" export CC="$TOOLCHAIN_PREFIX-gcc" CONFIGURE_FLAGS="--host=$TOOLCHAIN_PREFIX" + [ -z "$CFLAGS" ] && CFLAGS="-uclibc"; echo "[INFO] Cross-compiling for Android ARMv6" elif [ "$2" == "android-armv7" ]; then COMPILE_FOR_ANDROID=yes @@ -49,6 +50,7 @@ elif [ "$1" == "crosscompile" ]; then TOOLCHAIN_PREFIX="arm-none-linux-gnueabi" export CC="$TOOLCHAIN_PREFIX-gcc" CONFIGURE_FLAGS="--host=$TOOLCHAIN_PREFIX" + [ -z "$CFLAGS" ] && CFLAGS="-uclibc"; echo "[INFO] Cross-compiling for Android ARMv7" elif [ "$2" == "rpi" ]; then TOOLCHAIN_PREFIX="arm-linux-gnueabihf" @@ -57,6 +59,7 @@ elif [ "$1" == "crosscompile" ]; then [ -z "$CFLAGS" ] && CFLAGS="-mfloat-abi=hard -mfpu=vfp"; export CC="$TOOLCHAIN_PREFIX-gcc" CONFIGURE_FLAGS="--host=$TOOLCHAIN_PREFIX" + [ -z "$CFLAGS" ] && CFLAGS="-uclibc"; echo "[INFO] Cross-compiling for Raspberry Pi ARMv6zk hard float" else echo "Please supply a proper platform [android android-armv6 android-armv7 rpi] to cross-compile"