bootstrap gcc for powerpc

Dimi Shahbaz
Tue May 21 16:19:00 GMT 2002

I'm trying to create a bootstrap gcc (3.0.4) on i686, target PPC (see 
thread at ).  
The build fails due to some missing glibc header files.  This appears to 
be the same problem as reported here:

A note there suggests a 'make install_headers' under glibc-2.2.5, 
*before* building the bootstrap gcc.  This works until it reaches:

gcc rpc_main.c -c -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings 
-g -mnew-mnemonics -Wa,-mppc -mpowerpc      -I../include -I. 
-I/home2/dimator/3rdParty/crosstools/glibc-ppc405/sunrpc -I.. 
-I../libio  -I/home2/dimator/3rdParty/crosstools/glibc-ppc405 
-I../sysdeps/powerpc/elf -I../linuxthreads/sysdeps/unix/sysv/linux 
-I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread 
-I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix 
-I../linuxthreads/sysdeps/powerpc -I../sysdeps/unix/sysv/linux/powerpc 
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common 
-I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv 
-I../sysdeps/unix/powerpc -I../sysdeps/unix -I../sysdeps/posix 
-I../sysdeps/powerpc/fpu -I../sysdeps/powerpc -I../sysdeps/wordsize-32 
-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 
-I../sysdeps/powerpc/soft-fp -I../sysdeps/ieee754 
-I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem 
/usr/lib/gcc-lib/i386-linux/2.95.4/include -isystem 
/home2/dimator/opt/ppc405/powerpc-linux/include/ -D_LIBC_REENTRANT 
-include ../include/libc-symbols.h     -D_RPC_THREAD_SAFE_ -o 
In file included from ../string/endian.h:37,
                 from ../include/endian.h:1,
                 from ../posix/sys/types.h:212,
                 from ../include/sys/types.h:1,
                 from ../include/string.h:3,
                 from rpc_main.c:43:
../sysdeps/powerpc/bits/endian.h:34: warning: #warning Cannot determine 
current byte order, assuming big-endian.
cc1: Invalid option `new-mnemonics'
cc1: Invalid option `powerpc'
make[2]: *** 
[/home2/dimator/3rdParty/crosstools/glibc-ppc405/sunrpc/rpc_main.o] Error 1
make[2]: Leaving directory 
make[1]: *** [sunrpc/install-headers] Error 2
make[1]: Leaving directory 
make: *** [install-headers] Error 2

So the 'install-headers' target wants to run gcc too, for some reason. 
 Judging from the cc1 error lines, my guess is that it really wants to 
run the bootstrap gcc, with target=ppc.  Anyone know what I'm doing wrong?

After grappling with this for a week now, I'm thinking of just resorting 
to the following: after building binutils, build a bootstrap gcc using 
gcc 2.95.3 (since that builds OK).  Using that gcc, build glibc.  Once 
glibc is in place, go back and build gcc-3.0.4.  Kind of a drag, but if 
it works, I'll be satisfied.


Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list