build cross gcc for ppc-linux
Rupert Wood
me@rupey.net
Thu Apr 18 17:15:00 GMT 2002
Harry Lin wrote:
> On host : i686-pc-linux-gnu (Redhat 7.1)
> to build powerpc-linux-gnu cross gcc 3.0.4, with binutils 2.12
> ./configure --target=powerpc-ibm-linux-gnu --with-newlib
You shouldn't use newlib if you're targeting a specific OS; you should
install or build headers and libraries specific to the OS. In this case,
you should build glibc for your target or extract the headers and basic
libraries from a binary PPC gnu/linux distribution. I'm afraid I don't
know the specifics of doing this; you might have to build a powerpc-elf
cross-compiler using newlib and then use that to build glibc for
powerpc-linux-gnu, or there might be an easier way (integrate glibc into
the sources tree and build in parallel?) but I'm not sure.
In addition to glibc, you'll also need the linux/ and asm/ headers from
the kernel source.
> seeing errors of files not exist while compiling in rs6000/linux.h
> about <signal.h> and <sys/ucontext.h>, while there are such files
> right there under /usr/include.
These headers belong to the compile host and should not be used for the
cross target. In you case, it's using only the headers provided with
newlib.
Good luck,
Rup.
More information about the Gcc-help
mailing list