powerpc-linux-gnu cross compiler can't be built
David Ashley
dash@xdr.com
Fri Mar 7 22:36:00 GMT 2003
>You also need to tell GCC to use a PowerPC assembler instead of your
>system assembler. Have you installed binutils with the same prefix and
>--target? If so, it should be automatic.
I dug up this url:
http://sources.redhat.com/ml/crossgcc/2001-06/msg00039/cross-compiler-HOWTO.pdf
It's a pdf file telling how to build gcc as a cross compiler, it is very
specific. When I follow the instructions, gcc fails with the same problems
mentioned earlier. I was able to build + install the latest binutils though.
Here is what is supposed to happen, according to the pdf file:
cd to binutils
./configure --target=ppc-elf-linux --program-prefix=ppc-
make
make install
This all works fine and the ppc-* files end up in /usr/local/bin as expected.
Now for gcc:
./configure --target=ppc-elf-linux --prefix=/usr/local --program-prefix=ppc-
--program-suffix=
make LANGUAGES=c
It then fails with the rs6000 header file bug, but then I can comment that
include and get it further, then it fails with this:
-f libgcc.mk all
make[2]: Entering directory `/tmp/ppc-cross-compiler/xgcc/gcc'
for d in libgcc nof libgcc/nof; do \
if [ -d $d ]; then true; else /bin/sh ../../gcc-3.2.2/gcc/mkinstalldirs $d; fi; \
done
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/tmp/ppc-cross-compiler/xgcc/gcc/xgcc -B/tmp/ppc-cross-compiler/xgcc/gcc/ -B/usr/local/ppc-elf-linux/bin/ -B/usr/local/ppc-elf-linux/lib/ -isystem /usr/local/ppc-elf-linux/include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-3.2.2/gcc -I../../gcc-3.2.2/gcc/. -I../../gcc-3.2.2/gcc/config -I../../gcc-3.2.2/gcc/../include -fPIC -mstrict-align -DL_muldi3 -c ../../gcc-3.2.2/gcc/libgcc2.c -o libgcc/./_muldi3.o
as: unrecognized option `-mppc'
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/tmp/ppc-cross-compiler/xgcc/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/tmp/ppc-cross-compiler/xgcc/gcc'
make: *** [all-gcc] Error 2
I'd be willing to assemble a new machine, install any version of redhat
slackware/whatever, install source, whatever, to get this built. All I need
are step by step instructions that would work.
Thanks--
Dave
More information about the Gcc-bugs
mailing list