egcs-970929: Small changes to bootstrap handling.
Manfred Hollstein
manfred@s-direktnet.de
Sun Oct 5 09:05:00 GMT 1997
Hi there,
the recent introduction of the new bootstrap*-lean goals was a big
ease for building more compilers in parallel. But, I don't like
duplicating nearly identical stuff; my patch uses the make target
macro "$@" to avoid this duplication.
In addition, it introduces one more bootstrap4 target if the stage3
compiler isn't enough.
Sun Oct 5 17:29:00 1997 Manfred Hollstein (manfred@s-direktnet.de)
* Makefile.in (bootstrap-lean): Combined with `normal' bootstrap
targets using "$@" to provide support for similar but not identical
targets without having to duplicate code.
* gcc/Makefile.in (bootstrap-lean): Combined with `normal' bootstrap
targets using "$@" to provide support for similar but not identical
targets without having to duplicate code.
(bootstrap4): New goal.
diff --context --recursive --show-c-function -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-970929.orig/Makefile.in egcs-970929/Makefile.in
*** egcs-970929.orig/Makefile.in Mon Sep 29 08:37:07 1997
--- egcs-970929/Makefile.in Sun Oct 5 15:25:34 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 bootstrap-lean bootstrap2 bootstrap3 bootstrap4
! bootstrap bootstrap-lean bootstrap2 bootstrap3 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,1315 ****
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
!
! .PHONY: bootstrap-lean
! bootstrap-lean: 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) \
! echo "Bootstrapping the compiler"; \
! 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-lean
@echo "Building runtime libraries"; \
$(MAKE) all
--- 1292,1308 ----
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 ;; \
+ *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \
+ compare=compare-lean ;; \
+ * ) 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-970929.orig/gcc/Makefile.in egcs-970929/gcc/Makefile.in
*** egcs-970929.orig/gcc/Makefile.in Mon Sep 29 08:37:11 1997
--- egcs-970929/gcc/Makefile.in Sat Oct 4 13:52:30 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 bootstrap-lean: 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
*** 2574,2595 ****
# 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)"
!
! bootstrap-lean: 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.
! $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES="$(BOOT_LANGUAGES)"
! $(MAKE) stage1
! # This used to define ALLOCA as empty, but that would lead to bad results
! # for a subsequent `make install' since that would not have ALLOCA empty.
! # To prevent `make install' from compiling alloca.o and then relinking cc1
! # 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
! rm -rf stage1
$(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
bootstrap2: force
--- 2574,2580 ----
# 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
! -if test $@ = bootstrap-lean; then rm -rf stage1; else true; fi
$(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
bootstrap2: force
*************** bootstrap2: force
*** 2600,2605 ****
--- 2585,2593 ----
bootstrap3: force
$(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
+ 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.
--
Manfred Hollstein If you have any questions about GNU software:
Hindenburgstr. 13/1 < mailto:manfred@s-direktnet.de >
75446 Wiernsheim, FRG < http://www.s-direktnet.de/HomePages/manfred/ >
PGP key: < http://www.s-direktnet.de/HomePages/manfred/manfred.asc >
More information about the Gcc-bugs
mailing list