Why does libiberty have to build before a C library?

Daniel Jacobowitz drow@mvista.com
Tue Jun 10 06:07:00 GMT 2003


On Tue, Jun 10, 2003 at 12:44:48AM -0400, Nathanael Nerode wrote:
> >Well, why not arrange, when using a combined tree and a newlib target, for
> >libiberty to be built after newlib?  Is this even an issue?  We 
> 
> Which libiberty?  It's built (up to) three times.
> 
> build-libiberty is fine, since presumably the build machine has a C 
> library.
> 
> host-libiberty may be built using a cross compiler from the build 
> machine to the host.  We can, I suppose, assume that the builder has 
> supplied a C library for the host.  (Otherwise we won't be able to finish 
> building GCC, GDB, gas, or anything else, anyway.)
> 
> target-libiberty could indeed be built after newlib.  Give the following
> (untested) patch a try.  You'll have to regenerate Makefile.in and 
> configure.  
> 
> Of course, in the non-newlib ordinary cross-compiler case, a 
> C library for the target would have to be supplied in order to build 
> target libraries, and worse, the cross-compiler would have to *know* 
> about the C library somehow.  If we can guarantee that it *would* know 
> about it in an easy manner, then this is probably a very reasonable 
> suggestion...

This is already necessary in a lot of cases: for instance, anything
with shared libraries.

I'm of the opinion it should always be necessary, and we should
document it as such.  I'd love to hear any reasons to the contrary.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gcc mailing list