This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cross-compilation documentation
On Sun, Jun 22, 2003 at 01:21:51PM -0400, Andrew Pinski wrote:
>
> On Sunday, Jun 22, 2003, at 13:09 US/Eastern, Peter Barada wrote:
>
> >
> >>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...
>
> That is a bug in the config of rs6000 of gcc which should be fixed,
> I have a patch for it and there is no need for --without-libgcc:
>
> try this patch:
This has been discussed numerous times. The conclusion was that, no,
it is _NOT_ a bug in the rs6000 port to require these headers. I filed
one PR about it which was eventually closed.
Dan's doing it the right way. Building a libgcc which doesn't support
signal unwinding can get you into all sorts of subtle trouble later.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer