This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using glibc headers to build bootstrap gcc?


On Tue, 4 Oct 2005, Ralf Corsepius wrote:

> On Tue, 2005-10-04 at 11:36 -0400, Robert P. J. Day wrote:
> >   there appear to be at least three different variations for how to
> > use the glibc headers to build the bootstrap gcc phase of the
> > toolchain.
> >
> >   first, yaghmour's book orders the phases of the build so that the
> > bootstrap compiler is done before *any* of the glibc stuff.  because
> > of that, his bootstrap configuration uses the option
> > "--without-headers".
> That's a band-aid to getting started bootstrapping, but a functional GCC.
>
> >   if you have already installed the glibc headers, though, another
> > approach seems to be using a
> > variation of "--with-headers=${SYSROOT}/usr/include".
> >
> >   and crosstool takes yet another approach, using the config option
> > "--with-local-prefix=", which i'm going to guess subsumes
> > --with-headers=.
> >
> >   are there substantial differences in the ultimate effect of using
> > one or the other of the above?

> Yes, a GCC having been built with --without-headers is not a fully
> functional GCC. It uses hard-coded assumptions on libc's capability
> and does not reflect your actual setup. Normally it's only build for
> languages=c.
>
> It's meant to be a band-aid to break the vicious build dependency
> circle between GCC and libc, when bootstrapping GCC+libc from
> scratch.

ah, i think i follow that.  so, in the case of the bootstrap gcc, it's
adequate since that's the only language that the bootstrap gcc is
being created to process, anyway.  however, if you happen to have the
glibc headers lying around, that's the recommended approach, is it?

in any event, if you examine the bootstrap gcc configure phase in
crosstool when using sysroot, there is no mention of *either* option
--with-headers or --without-headers, but there is the --with-sysroot
option.  does that latter option effectively define the headers
directory that would be found in ${SYSROOT}/usr/include?

> --with-local-prefix is something completely different. It can be
> used to redirect /usr/local/{lib|include}. IIRC, GCC automatically
> switches it off for cross compilers, because it's normally not "that
> useful" for cross-compilers.

ok, i'll think about that one.

rday

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]