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
This commit is contained in:
Dominik Riebeling 2011-01-23 22:09:44 +00:00
parent eb9ca72388
commit 4f787ba7dc

6
tools/configure vendored
View file

@ -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"