Building a cross-compiler for powerpc-eabi
Rask Ingemann Lambertsen
rask@sygehus.dk
Fri Jun 15 12:58:00 GMT 2007
On Fri, Jun 15, 2007 at 09:50:42AM +0200, Timo Kerstan wrote:
> Hello there,
>
> Can anyone tell me how to properly do this?
I suggest you create a combined source tree. This is easiest if you get
the sources using cvs and svn, because then binutils, gdb, newlib and the
simulator are already in a combined tree. But since you probably have the
source tarballs, try something like this:
mkdir src
cd src
tar -jxf gcc-xxx.tar.bz2
tar -jxf newlib-xxx.tar.bz2
tar -jxf binutils-xxx.tar.bz2
tar -jxf gdb-xxx.tar.bz2
...
mkdir combined
cd combined
ln -s ../gcc-xxx/* .
ln -s ../newlib-xxx/*
ln -s ../binutils-xxx/*
ln -s ../gdb-xxx/*
...
cd ../..
mkdir build
cd build
../src/combined/configure --target=powerpc-eabi --prefix=... \
--with-newlib --enable-sim ...
make
make install
There is some overlap (e.g. libiberty) between the source packages, and
normally you want to use what's in the gcc sources. But I've had a case
where libiberty from gcc was too old to compile binutils and then it should
be OK to use the one from the binutils instead.
Btw, the target powerpc-eabisim defaults to a setup suitable for producing
binaries to run on the simulator.
> I tried this http://www.ifp.uiuc.edu/~nakazato/tips/xgcc.html
> But it doesn't work using binutils 2.17, gcc 4.1.2 and newlib 1.15.0...
How do you know it doesn't work[1]?
[1] Always post the error message or something like that.
--
Rask Ingemann Lambertsen
More information about the Gcc-help
mailing list