Bootstrap no longer builds libgcc multilib subdirs in stage2/3

Andreas Schwab schwab@suse.de
Tue Sep 5 09:15:00 GMT 2000


"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:

|> Andreas,
|> 
|> I noticed that bootstraps from last night no longer seem to rebuild
|> multilib subdirs inside libgcc and this was caused by your recent
|> patch to gcc/Makefile.in.

Could you please try this patch?  I have only tested it in a non-multilib
environment.

Andreas.

2000-09-05  Andreas Schwab  <schwab@suse.de>

	* mklibgcc.in: Emit rules for libgcc-stage[1234]-start.
	* Makefile.in (stage1-start, stage2-start, stage3-start,
	stage4-start): Don't handle libgcc here, use libgcc.mk instead.

Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.501
diff -u -a -u -r1.501 gcc/Makefile.in
--- gcc/Makefile.in	2000/09/04 16:04:48	1.501
+++ gcc/Makefile.in	2000/09/05 16:12:26
@@ -2862,13 +2862,13 @@
 # Copy the object files from a particular stage into a subdirectory.
 stage1-start:
 	-if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
-	-for dir in intl libgcc $(SUBDIRS) ; \
+	$(MAKE) -f libgcc.mk libgcc-stage1-start
+	-for dir in intl $(SUBDIRS) ; \
 	 do \
 	   if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
 	 done
 	-mv $(STAGESTUFF) stage1
 	-mv intl/*$(objext) stage1/intl
-	-mv libgcc/*$(objext) stage1/libgcc
 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
 # dir will work properly.
 	-if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage1 ; else true ; fi
@@ -2887,13 +2887,13 @@
 
 stage2-start:
 	-if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
-	-for dir in intl libgcc $(SUBDIRS) ; \
+	$(MAKE) -f libgcc.mk libgcc-stage2-start
+	-for dir in intl $(SUBDIRS) ; \
 	 do \
 	   if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
 	 done
 	-mv $(STAGESTUFF) stage2
 	-mv intl/*$(objext) stage2/intl
-	-mv libgcc/*$(objext) stage2/libgcc
 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
 # dir will work properly.
 	-if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage2 ; else true ; fi
@@ -2912,13 +2912,13 @@
 
 stage3-start:
 	-if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
-	-for dir in intl libgcc $(SUBDIRS) ; \
+	$(MAKE) -f libgcc.mk libgcc-stage3-start
+	-for dir in intl $(SUBDIRS) ; \
 	 do \
 	   if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
 	 done
 	-mv $(STAGESTUFF) stage3
 	-mv intl/*$(objext) stage3/intl
-	-mv libgcc/*$(objext) stage3/libgcc
 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
 # dir will work properly.
 	-if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage3 ; else true ; fi
@@ -2937,13 +2937,13 @@
 
 stage4-start:
 	-if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
-	-for dir in intl libgcc $(SUBDIRS) ; \
+	$(MAKE) -f libgcc.mk libgcc-stage4-start
+	-for dir in intl $(SUBDIRS) ; \
 	 do \
 	   if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
 	 done
 	-mv $(STAGESTUFF) stage4
 	-mv intl/*$(objext) stage4/intl
-	-mv libgcc/*$(objext) stage4/libgcc
 # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
 # dir will work properly.
 	-if [ -f as$(exeext) ] ; then $(LN_S) ../as$(exeext) stage4 ; else true ; fi
Index: gcc/mklibgcc.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/mklibgcc.in,v
retrieving revision 1.15
diff -u -a -u -r1.15 gcc/mklibgcc.in
--- gcc/mklibgcc.in	2000/06/25 22:26:33	1.15
+++ gcc/mklibgcc.in	2000/09/05 16:11:52
@@ -280,6 +280,24 @@
   echo '	else true; fi;'
 done
 
+for stage in stage1 stage2 stage3 stage4; do
+  dirs=libgcc
+  for ml in $MULTILIBS; do
+    dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
+    if [ $dir != . ]; then
+      dirs="$dirs libgcc/${dir}"
+    fi
+  done
+  echo ""
+  echo "libgcc-${stage}-start:"
+  echo "	for dir in ${dirs}; do \\"
+  echo "	  if [ -d ${stage}/\$\$dir ]; then true; else mkdir ${stage}/\$\$dir; fi; \\"
+  echo "	done"
+  echo "	-for dir in ${dirs}; do \\"
+  echo "	  mv \$\$dir/*${objext} ${stage}/\$\$dir; \\"
+  echo "	done"
+done
+
 echo ""
 all=stmp-dirs
 dirs=libgcc

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg


More information about the Gcc-bugs mailing list