This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Building a cross-compiler for powerpc-eabi
- From: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- To: Timo Kerstan <timo dot kerstan at uni-paderborn dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 15 Jun 2007 14:16:27 +0200
- Subject: Re: Building a cross-compiler for powerpc-eabi
- References: <AA09BE28-3ABD-4167-8BCC-220A5F6F41B3@uni-paderborn.de>
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