Quantcast
Channel: Planet Ubuntu
Viewing all articles
Browse latest Browse all 17727

Alexander Sack: howto build a bare metal linaro gcc (4.6) for android

$
0
0

Continuing my experiments to build the latest linaro gcc 4.6 series for android on ubuntu maverick, I managed to get a first bare metal build going.

Here the instructions that made me succeed:

First use android repo to get stuff from asac’s android toolchain repository on gitorious (yes, before you ask: as soon as I feel a bit more comfortable about what I am doing here, all this will move to git.linaro.org!):

repo init \
    -u git://gitorious.org/asac-android-toolchain/manifest.git \
    -b gcc-linaro-4.6-master
repo sync

Next create an objdir/ on the same directory level and cd into it

mkdir objdir
cd objdir

now ./configure with appropriate versions and build it using multiple cores

../build/configure --target=arm-eabi --prefix=$HOME/linaro-android-arm \
    --with-gcc-version=4.6+linaro --with-binutils-version=2.19 \
    --with-mpfr-version=2.4.1 --disable-libquadmath
make -j4

run make install and try to produce an object file

make install
echo 'int test() {}' > test.c
$HOME/linaro-android-arm/bin/arm-*gcc -c -o test.o test.c

You can also try to produce a binary or -shared library, but that fill fail complaining about missing crt*.o etc. as this is just bare metal build and it doesn’t know about bionic yet …


Viewing all articles
Browse latest Browse all 17727

Trending Articles