Running the toolchain on Android

The Linaro Android toolchain can run on Android itself.

Installation will become easier and binaries will be made available in the future. For now, you have to install from source.

Getting the Source

git clone git://

Building the Source

Make sure you have an Internet connection that doesn't block git://, http:// or ftp:// connections. Then, run

cd native-toolchain

This will create an Android native toolchain build in /tmp/android-native-toolchain (the location can be overwritten by setting the DEST environment variable to where you want the toolchain to be put).


Copy all the files in /tmp/android-native-toolchain/system to the system partition of your Android device/sdcard. The easiest way to do this when using a Linaro Android image that has been released as system.tar.bz2 is:

mkdir /some/new/directory
cd /some/new/directory
tar xf /where/you/put/it/system.tar.bz2
cp -a /tmp/android-native-toolchain/* .
tar cjf system.tar.bz2 system

Then use the newly generated system.tar.bz2 instead of the one you downloaded.


Install a terminal emulator on Android, e.g. AndroidTerm Launch it Then use the toolchain commands like you would on a regular Linux device. Available commands include:


There is no need to use typical Android workarounds like -nostdlib -lc -lm -lstlport, this toolchain has been patched to do the right thing by itself.

Platform/Android/ToolchainOnAndroid (last modified 2012-11-28 11:43:04)