From fa71bed2882aef0b1b6dde6f11ecbc93a258624a Mon Sep 17 00:00:00 2001 From: kugel Date: Mon, 6 Dec 2010 22:28:22 +0000 Subject: [PATCH] Upgrade ndk requirement to r5 (it ships a better compiler) and cleanup configure accordingly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28755 a1c6a512-1295-4272-9138-f99709370657 --- tools/configure | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/configure b/tools/configure index ac24f5bd43..7098ba2fc8 100755 --- a/tools/configure +++ b/tools/configure @@ -119,7 +119,7 @@ app_get_platform() { exit fi if [ -z "$ANDROID_NDK_PATH" ]; then - echo "ERROR: You need the Android NDK installed and have the ANDROID_NDK_PATH" + echo "ERROR: You need the Android NDK installed (r5 or higher) and have the ANDROID_NDK_PATH" echo "environment variable point to the root directory of the Android NDK." exit fi @@ -478,12 +478,16 @@ mipselcc () { } androidcc () { - gccchoice="4.4.0" - prefixtools $ANDROID_NDK_PATH/build/prebuilt/linux-x86/arm-eabi-$gccchoice/bin/arm-eabi- + gccchoice="4.4.3" + gcctarget="arm-linux-androideabi-" + gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/linux-x86 + PATH=$PATH:$gccprefix/bin prefixtools $gcctarget GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//` - GCCOPTS="$GCCOPTS -ffunction-sections -fno-short-enums -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer" - GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -L$ANDROID_NDK_PATH/build/platforms/android-4/arch-arm/usr/lib/ -Wl,-rpath-link=$ANDROID_NKD_PATH/build/platforms/android-4/arch-arm/usr/lib" - LDOPTS="$LDOPTS -shared -nostdlib -lm -ldl -llog" + GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \ + --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm" + GLOBAL_LDOPTS="$GLOBAL_LDOPTS -nostdlib -lc -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack \ + --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm" + LDOPTS="$LDOPTS -shared -nostdlib -ldl -llog" extradefines="$extradefines -DANDROID" endian="little" SHARED_FLAG="-shared" @@ -3210,10 +3214,6 @@ if test -n "$t_cpu"; then TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/sdl/" TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/hosted/" fi - if [ -n "$app_platform" -a "$app_platform" = "android" ]; then - # android's gcc doesn't add this :/ - TARGET_INC="$TARGET_INC -I$ANDROID_NDK_PATH/build/platforms/android-4/arch-arm/usr/include" - fi TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu/$t_manufacturer" TARGET_INC="$TARGET_INC -I\$(FIRMDIR)/target/$t_cpu" GCCOPTS="$GCCOPTS" -- 2.11.4.GIT