Fixes for bootstrap handling

Manfred Hollstein manfred@ks.sel.alcatel.de
Wed Oct 1 07:49:00 GMT 1997


Hi there,

I just  tried to bootstrap  egcs-970924 for four  different systems in
parallel; of course, the  disk space was not  sufficient. To cope with
this  I made  the   appended changes which  simply  remove  the stage1
directory. They  also add support, if  comparing the stage2 and stage3
compilers yield differences.

Wed Oct  1 16:39:00 1997  Manfred Hollstein  (manfred@lts.sel.alcatel.de)

	* Makefile.in (bootstrap): New goals bootstrap4, lean-bootstrap,
	lean-bootstrap{2,3,4} added.
	* gcc/Makefile.in (bootstrap): New goal lean-bootstrap added.
	If actual goal is lean-bootstrap remove stage1 when appropriate.
	(bootstrap2): Ditto.
	(bootstrap3): Ditto.
	(bootstrap4, lean-bootstrap4): New goal when building the stage4
	compiler is necessary.

diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-970924.orig/Makefile.in egcs-970924/Makefile.in
*** egcs-970924.orig/Makefile.in	Fri Sep 19 07:56:16 1997
--- egcs-970924/Makefile.in	Wed Oct  1 09:21:50 1997
*************** all-gcc:
*** 1283,1290 ****
  # In theory, on an SMP all those dependencies can be resolved
  # in parallel.
  #
! .PHONY: bootstrap bootstrap2 bootstrap3
! bootstrap bootstrap2 bootstrap3: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
  	@r=`pwd`; export r; \
  	s=`cd $(srcdir); pwd`; export s; \
  	$(SET_LIB_PATH) \
--- 1283,1290 ----
  # In theory, on an SMP all those dependencies can be resolved
  # in parallel.
  #
! .PHONY: bootstrap bootstrap2 bootstrap3 bootstrap4 lean-bootstrap lean-bootstrap2 lean-bootstrap3 lean-bootstrap4
! bootstrap bootstrap2 bootstrap3 bootstrap4 lean-bootstrap lean-bootstrap2 lean-bootstrap3 lean-bootstrap4: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
  	@r=`pwd`; export r; \
  	s=`cd $(srcdir); pwd`; export s; \
  	$(SET_LIB_PATH) \
*************** bootstrap bootstrap2 bootstrap3: all-tex
*** 1292,1300 ****
  	cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@
  	@r=`pwd`; export r; \
  	s=`cd $(srcdir); pwd`; export s; \
  	$(SET_LIB_PATH) \
! 	echo "Comparing stage2 and stage3 of the compiler"; \
! 	cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) compare
  	@echo "Building runtime libraries"; \
  	$(MAKE) all
  
--- 1292,1306 ----
  	cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $@
  	@r=`pwd`; export r; \
  	s=`cd $(srcdir); pwd`; export s; \
+ 	case "$@" in \
+ 	  *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \
+ 	  		compare=compare3 ;; \
+ 	  * )		msg="Comparing stage2 and stage3 of the compiler"; \
+ 	  		compare=compare ;; \
+ 	esac; \
  	$(SET_LIB_PATH) \
! 	echo "$$msg"; \
! 	cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
  	@echo "Building runtime libraries"; \
  	$(MAKE) all
  
diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-970924.orig/gcc/Makefile.in egcs-970924/gcc/Makefile.in
*** egcs-970924.orig/gcc/Makefile.in	Fri Sep 19 07:21:34 1997
--- egcs-970924/gcc/Makefile.in	Wed Oct  1 09:17:20 1997
*************** diff:
*** 2561,2567 ****
  	  $(LANG_DIFF_EXCLUDES) \
  	  gcc-$(oldversion) gcc-$(version) > diffs
  
! bootstrap: force
  # Only build the C compiler for stage1, because that is the only one that
  # we can guarantee will build with the native compiler, and also it is the
  # only thing useful for building stage2.
--- 2561,2567 ----
  	  $(LANG_DIFF_EXCLUDES) \
  	  gcc-$(oldversion) gcc-$(version) > diffs
  
! bootstrap lean-bootstrap: force
  # Only build the C compiler for stage1, because that is the only one that
  # we can guarantee will build with the native compiler, and also it is the
  # only thing useful for building stage2.
*************** bootstrap: force
*** 2573,2588 ****
  # because alloca.o is newer, we permit these recursive makes to compile
  # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  	$(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
  	$(MAKE) stage2
  	$(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  
! bootstrap2: force
  	$(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
  	$(MAKE) stage2
  	$(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  
! bootstrap3: force
  	$(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  
  # Compare the object files in the current directory with those in the
  # stage2 directory.
--- 2573,2593 ----
  # because alloca.o is newer, we permit these recursive makes to compile
  # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  	$(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
+ 	-if test $@ = lean-bootstrap; then rm -rf stage1; else true; fi
  	$(MAKE) stage2
  	$(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  
! bootstrap2 lean-bootstrap2: force
  	$(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
+ 	-if test $@ = lean-bootstrap2; then rm -rf stage1; else true; fi
  	$(MAKE) stage2
  	$(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  
! bootstrap3 lean-bootstrap3: force
  	$(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
+ 
+ bootstrap4 lean-bootstrap4: force
+ 	$(MAKE) CC="stage3/xgcc -Bstage3/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage3/ LANGUAGES="$(LANGUAGES)"
  
  # Compare the object files in the current directory with those in the
  # stage2 directory.


Best wishes
--
 Manfred Hollstein                               Alcatel, Dept. US/EC4
 < mailto:manfred@lts.sel.alcatel.de >             Lorenzstrasse 10
                                                 70435 Stuttgart
 Public PGP key on request                       Germany



More information about the Gcc-bugs mailing list