Building a cross-compiler for powerpc-eabi
Timo Kerstan
timo.kerstan@uni-paderborn.de
Fri Jun 15 14:29:00 GMT 2007
Hi,
i did everything you described below an get the following message.
I'm building the cross compiler on Mac OS X....
gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -
o size size.o bucomm.o version.o filemode.o ../bfd/.libs/libbfd.a ../
libiberty/libiberty.a ./../intl/libintl.a
/usr/bin/ld: Undefined symbols:
_libiconv
_libiconv_close
_libiconv_open
_libiconv_set_relocation_prefix
collect2: ld returned 1 exit status
make[4]: *** [size] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-binutils] Error 2
make: *** [all] Error 2
Right now i'm building binutils explicitly and will try to compile
the rest as a combined tree...
Am 15.06.2007 um 14:16 schrieb Rask Ingemann Lambertsen:
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4120 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20070615/02061baa/attachment.p7s>
More information about the Gcc-help
mailing list