Trying to make powerpc crosscompiler
Peter Popov
ppopov@redcreek.com
Mon May 8 19:50:00 GMT 2000
Joris Baijens wrote:
>
> Hello,
>
> I'm trying to make a cross-compiler for powerpc on a Linux host.
> (Also on FreeBSD 4.0, but it gives the same error)
>
> I get the following output from the gcc compile:
>
> /usr/home/jorisb/comgcc/gcc/xgcc -B/usr/home/jorisb/comgcc/gcc/ -B/home/jorisb/powerpc-*-elf/bin/ -I/home/jorisb/powerpc-*-elf/include -DCROSS_COMPILE -DIN_GCC -DHAIFA -g -O2 -I./include -c ../../gcc-2.95.2/gcc/libgcc1-test.c
> ../../gcc-2.95.2/gcc/libgcc1-test.c:101: warning: conflicting types for built-in function `memcpy'
> Testing libgcc1. Ignore linker warning messages.
> /usr/home/jorisb/comgcc/gcc/xgcc -B/usr/home/jorisb/comgcc/gcc/ -B/home/jorisb/powerpc-*-elf/bin/ -I/home/jorisb/powerpc-*-elf/include -DCROSS_COMPILE -DIN_GCC -DHAIFA -g -O2 -I./include libgcc1-test.o -o libgcc1-test -nostartfiles -nostdlib `/usr/home/jorisb/comgcc/gcc/xgcc -B/usr/home/jorisb/comgcc/gcc/ -B/home/jorisb/powerpc-*-elf/bin/ -I/home/jorisb/powerpc-*-elf/include --print-libgcc-file-name`
> /home/jorisb/powerpc-*-elf/bin/ld:built in linker script:5: parse error
> collect2: ld returned 1 exit status
> *** Error code 1
>
> Stop.
>
> What I have done is this:
>
> build and installed binutils-2.9.1 with options --target=powerpc-*-elf --target=/home/jorisb
> configured gcc in objdir with options --target=powerpc-*-elf --with-newlib --target=/home/jorisb
I assume the second "--target" statement you listed above was a typo in
the email. Otherwise the second "--target" statement should be
"--prefix". I've built a powerpc-eabi cross compiler running on linux
with gcc-2.95.2 and binutils-2.9.1 (one of three cross compilers we're
using, and I've always had to twick something). Keep in mind that
bintutils-2.9.1 is broken, at least when you build a powerpc-eabi cross
compiler. The linker puts multiple .bss variables at the same address.
I had to rebuild binutils from one of the later snapshots. You might
consider downloading the same sources that MontaVista is using for their
PowerPC CDK, that way you're reasonably assured that the compiler or
linker won't be broken.
Pete
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list