Why does libiberty have to build before a C library?

Nathanael Nerode neroden@twcny.rr.com
Tue Jun 10 04:47:00 GMT 2003


>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...

Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.237
diff -u -r1.237 configure.in
--- configure.in	3 Jun 2003 20:42:13 -0000	1.237
+++ configure.in	10 Jun 2003 04:32:41 -0000
@@ -136,9 +136,9 @@
 # these libraries are built for the target environment, and are built after
 # the host libraries and the host tools (which may be a cross compiler)
 #
-target_libs="target-libiberty \
+target_libs="target-newlib \
 		target-libgloss \
-		target-newlib \
+		target-libiberty \
 		target-libstdc++-v3 \
 		target-libf2c \
 		${libgcj} \
Index: Makefile.tpl
===================================================================
RCS file: /cvs/gcc/gcc/Makefile.tpl,v
retrieving revision 1.55
diff -u -r1.55 Makefile.tpl
--- Makefile.tpl	10 Jun 2003 02:09:34 -0000	1.55
+++ Makefile.tpl	10 Jun 2003 04:34:25 -0000
@@ -1447,7 +1447,7 @@
 configure-target-examples: $(ALL_GCC_C)
 configure-target-libgloss: $(ALL_GCC)
 all-target-libgloss: maybe-configure-target-newlib
-configure-target-libiberty: $(ALL_GCC)
+configure-target-libiberty: $(ALL_GCC_C)
 configure-target-libtermcap: $(ALL_GCC_C)
 configure-target-newlib: $(ALL_GCC)
 configure-target-rda: $(ALL_GCC_C)



More information about the Gcc mailing list