This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Two small libgcc fixes


Two problems I found in our internal tester.

With --disable-bootstrap, "all-target" omitted libgcc because the
conditional was libgcc-no-bootstrap instead of
target-libgcc-no-bootstrap.

And with appropriate switches to disable other libraries, "all" did not
used to build target libiberty if it was only building gcc.  No need
to build it just because of libgcc, either.  This happens in our setup
before there are target headers, so lots of #include errors trying to
build target libiberty.

OK?

-- 
Daniel Jacobowitz
CodeSourcery

2007-01-04  Daniel Jacobowitz  <dan@codesourcery.com>

	* Makefile.tpl (all-target): Correct @if conditional for target
	modules.
	* configure.in: Omit libiberty if building only target libgcc.
	* configure, Makefile.in: Regenerated.

Index: Makefile.tpl
===================================================================
--- Makefile.tpl	(revision 120444)
+++ Makefile.tpl	(working copy)
@@ -531,9 +531,10 @@ all-host: maybe-all-[+module+][+ IF boot
 
 .PHONY: all-target
 [+ FOR target_modules +][+ IF bootstrap +]
-@if [+module+]-no-bootstrap[+ ENDIF bootstrap +]
+@if target-[+module+]-no-bootstrap[+ ENDIF bootstrap +]
 all-target: maybe-all-target-[+module+][+ IF bootstrap +]
-@endif [+module+]-no-bootstrap[+ ENDIF bootstrap +][+ ENDFOR target_modules +]
+@endif target-[+module+]-no-bootstrap[+
+  ENDIF bootstrap +][+ ENDFOR target_modules +]
 
 # Do a target for all the subdirectories.  A ``make do-X'' will do a
 # ``make X'' in all subdirectories (because, in general, there is a
Index: configure.in
===================================================================
--- configure.in	(revision 120444)
+++ configure.in	(working copy)
@@ -1439,10 +1439,14 @@ done
 
 # Sometimes the tools are distributed with libiberty but with no other
 # libraries.  In that case, we don't want to build target-libiberty.
+# Don't let libgcc imply libiberty either.
 if test -n "${target_configdirs}" ; then
+  libgcc=
   others=
   for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
-    if test "$i" != "libiberty" ; then
+    if test "$i" = "libgcc"; then
+      libgcc=target-libgcc
+    elif test "$i" != "libiberty" ; then
       if test -r $srcdir/$i/configure ; then
 	others=yes;
 	break;
@@ -1450,7 +1454,7 @@ if test -n "${target_configdirs}" ; then
     fi
   done
   if test -z "${others}" ; then
-    target_configdirs=
+    target_configdirs=$libgcc
   fi
 fi
 


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