`make bootstrap' broken

Andreas Schwab schwab@suse.de
Mon Aug 14 08:41:00 GMT 2000


Bootstrapping does not work correctly if repeated, because you cannot move
a directory over another one.  This happens if stage?/libgcc already
exists, and has the effect that the libgcc modules are not rebuild in the
next stage.

2000-08-14  Andreas Schwab  <schwab@suse.de>

	* Makefile.in (STAGESTUFF): Remove libgcc.
	(stage1-start, stage2-start, stage3-start): Copy the contents of
	the libgcc directory explicitly.
	(mostlyclean): Clean libgcc.

Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.494
diff -u -a -u -r1.494 gcc/Makefile.in
--- gcc/Makefile.in	2000/08/05 00:50:00	1.494
+++ gcc/Makefile.in	2000/08/14 15:34:50
@@ -722,7 +722,7 @@
  $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) cc1obj$(exeext) \
  enquire$(exeext) protoize$(exeext) unprotoize$(exeext) \
  specs collect2$(exeext) $(USE_COLLECT2) underscore.c tradcpp0$(exeext) \
- gcov$(exeext) *.[0-9][0-9].* *.[si] libcpp.a libbackend.a libgcc libgcc.mk \
+ gcov$(exeext) *.[0-9][0-9].* *.[si] libcpp.a libbackend.a libgcc.mk \
  $(LANG_STAGESTUFF)
 
 # Members of libgcc1.a.
@@ -2127,6 +2127,7 @@
 INTL_MOSTLYCLEAN = intl.mostlyclean
 mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean
 	-rm -f $(STAGESTUFF)
+	-rm -rf libgcc
 # Delete the temporary source copies for cross compilation.
 	-rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
 	-rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
@@ -2854,12 +2855,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 $(SUBDIRS) ; \
+	-for dir in intl libgcc $(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
@@ -2878,12 +2880,13 @@
 
 stage2-start:
 	-if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
-	-for dir in intl $(SUBDIRS) ; \
+	-for dir in intl libgcc $(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
@@ -2902,12 +2905,13 @@
 
 stage3-start:
 	-if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
-	-for dir in intl $(SUBDIRS) ; \
+	-for dir in intl libgcc $(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
@@ -2926,12 +2930,13 @@
 
 stage4-start:
 	-if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
-	-for dir in intl $(SUBDIRS) ; \
+	-for dir in intl libgcc $(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

-- 
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-patches mailing list