cross-compilation documentation
Peter Barada
peter@baradas.org
Sun Jun 22 17:35:00 GMT 2003
>No you do not have install the headers because you can pass to gcc
>--without-headers and that will make sure that you do not compile
>the sources that require glibc's headers.
>
>So total process is:
>cd gccobjdir
>.../gcc-sources/configure --without-headers --target=???-linux-gnu
>--prefix=??? --enable-languages=c
That doesn't work (at least for ppc-linux) since
gcc-3.3/config/rs6000/linux.h #includes <signal.h> when building
libgcc2, which causes it to fail since there are no headers(yet).
The *real* solution is to suppress building libgcc as part of the
cross compilation bootstrap so the circular dependency of
compiler-headers-compiler is broken.
I have succeeded in building a ppc-linux target by tweaking the
obj/gcc-bootstrap/gcc/Makefile to suppress the definitions of LIBGCC
and INSTALL_LIBGCC(the following fragment from my master build Makefile):
fix-bootstrap1-makefile:
cd ${BOOTSTRAP1_BUILDDIR}/gcc ; \
sed -e '1,$$s/^LIBGCC =/# LIBGCC =/;1,$$s/^INSTALL_LIBGCC =/# INSTALL_LIBGCC =/' < Makefile > Makefile.new ; \
mv Makefile.new Makefile
I'm working(slowly) on adding a --without-libgcc to gcc/configure to
do this...
--
Peter Barada
peter@baradas.org
More information about the Gcc
mailing list