I need to use prebuilt binaries to compile Android from source. The problem is, that seems like it's using the binaries I do not want it to use. As far as I understand gcc from the first directory in PATH that contains gcc will be used. But it's not.
This is my script for overriding PATH
#!/bin/bash # The directory from which I want to use gcc, c++ etc export PATH=/run/media/doctor/temporary/C811_Build_ICS/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/arm-eabi/bin # Other stuff that I need export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/bin: export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/build-tools/19.0.0/ export PATH=$PATH:/opt/java6/bin:/opt/java6/db/bin export PATH=$PATH:/opt/java6/jre/bin export PATH=$PATH:/opt/android-ndk
These are the contents of the toolchain directory
$ ls -1 /run/media/doctor/temporary/C811_Build_ICS/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/arm-eabi/bin ar as c++ g++ gcc ld nm objcopy objdump ranlib strip
Now I run
$ ./toolchain.sh $ which gcc /usr/bin/gcc
And get the gcc that I don't want.