From dd363889c0a20171a2c76ffb66264a1bc44ecfee Mon Sep 17 00:00:00 2001 From: bluebrother Date: Sun, 23 Jan 2011 22:09:44 +0000 Subject: [PATCH] Fix configure using the correct compiler for Android on Mac. On Mac the folder holding the prebuilt compiler is darwin-x86, not linux-x86. The extension of PATH to hold the compiler path below ANDROID_NDK_PATH needs to be present when findtool searches for the compiler, so applying it to the prefixtool call is not sufficient. OS X has a different behaviour to Linux which keeps the set value even if it's applied to the prefixtool call only. Might be caused by OS X coming with an older version of bash. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29125 a1c6a512-1295-4272-9138-f99709370657 --- tools/configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/configure b/tools/configure index db10d1bf6..aa37ef7d7 100755 --- a/tools/configure +++ b/tools/configure @@ -478,10 +478,12 @@ mipselcc () { } androidcc () { + buildhost=`uname | tr [:upper:] [:lower:]` gccchoice="4.4.3" gcctarget="arm-linux-androideabi-" - gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/linux-x86 - PATH=$PATH:$gccprefix/bin prefixtools $gcctarget + gccprefix=$ANDROID_NDK_PATH/toolchains/$gcctarget$gccchoice/prebuilt/$buildhost-x86 + PATH=$PATH:$gccprefix/bin + prefixtools $gcctarget GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//` GCCOPTS="$GCCOPTS -ffunction-sections -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer \ --sysroot=$ANDROID_NDK_PATH/platforms/android-4/arch-arm" -- 2.11.4.GIT