ChangeLog:

PR target/37137
* Makefile.def (flags_to_pass): Remove redundant and incomplete
STAGE1_CFLAGS, STAGE2_CFLAGS, STAGE3_CFLAGS, and STAGE4_CFLAGS.
Add FLAGS_FOR_TARGET and BUILD_CONFIG.
(bootstrap_stage): Remove bootstrap-debug custom stages.  Turn
stage_configureflags, stage_cflags and stage_libcflags into
explicit Makefile macros.
* Makefile.tpl (HOST_EXPORTS, EXTRA_HOST_FLAGS): Pass GCJ and
GFORTRAN.
(POSTSTAGE1_HOST_EXPORTS): Add XGCC_FLAGS_FOR_TARGET and TFLAGS to
CC.  Set CC_FOR_BUILD from CC.
(BASE_TARGET_EXPORTS, RAW_CXX_TARGET_EXPORTS,
NORMAL_TARGET_EXPORTS): Move SYSROOT_CFLAGS_FOR_TARGET and
DEBUG_PREFIX_CFLAGS_FOR_TARGET from CFLAGS and CXXFLAGS to
XGCC_FLAGS_FOR_TARGET.  Add it along with TFLAGS to CC, CXX, GCJ,
and GFORTRAN.
(TFLAGS, STAGE_CFLAGS, STAGE_TFLAGS, STAGE_CONFIGURE_FLAGS): New.
(_LIBCFLAGS): Renamed to _TFLAGS.
(do-compare-debug, do-compare3-debug): Drop.
(CC, GCC_FOR_TARGET, CXX_FOR_TARGET, RAW_CXX_FOR_TARGET,
GCJ_FOR_TARGET, GFORTRAN_FOR_TARGET): Remove FLAGS_FOR_TARGET.
(FLAGS_FOR_TARGET, SYSROOT_CFLAGS_FOR_TARGET,
DEBUG_PREFIX_CFLAGS_FOR_TARGET): Move down.
(XGCC_FLAGS_FOR_TARGET): New.
(BASE_FLAGS_TO_PASS): Pass STAGEid_CFLAGS, STAGEid_TFLAGS and TFLAGS.
(EXTRA_HOST_FLAGS): Pass GCJ and GFORTRAN.
(POSTSTAGE1_FLAGS_TO_PASS): Move SYSROOT_CFLAGS_FOR_TARGET and
DEBUG_PREFIX_CFLAGS_FOR_TARGET from CFLAGS, CXXFLAGS, LIBCFLAGS,
LIBCXXFLAGS to XGCC_FLAGS_FOR_TARGET.    Add it along with TFLAGS
to CC, CXX, GCJ, and GFORTRAN.  Pass XGCC_FLAGS_FOR_TARGET and
TFLAGS.
(BUILD_CONFIG): Include if requested.
(all): Set TFLAGS on bootstrap.
(configure-stageid-prefixmodule): Pass TFLAGS, adjust FLAGS.
(all-stageid-prefixmodule): Likewise.
(do-clean, distclean-stageid): Set TFLAGS.
(restrap): Fix whitespace.
* Makefile.in: Rebuilt.
config/ChangeLog:
* multi.m4: Save CXX, GFORTRAN and GCJ in config.status.
* mt-gnu (CXXFLAGS_FOR_TARGET): Adjust.
* bootstrap-O1.mk: New.
* bootstrap-O3.mk: New.
* bootstrap-debug.mk: New.
This commit is contained in:
Alexandre Oliva 2009-05-12 18:16:01 +00:00
parent cbe54154ef
commit 1b05fbbd2c
10 changed files with 1828 additions and 4044 deletions

View File

@ -1,3 +1,44 @@
2009-05-12 Alexandre Oliva <aoliva@redhat.com>
PR target/37137
* Makefile.def (flags_to_pass): Remove redundant and incomplete
STAGE1_CFLAGS, STAGE2_CFLAGS, STAGE3_CFLAGS, and STAGE4_CFLAGS.
Add FLAGS_FOR_TARGET and BUILD_CONFIG.
(bootstrap_stage): Remove bootstrap-debug custom stages. Turn
stage_configureflags, stage_cflags and stage_libcflags into
explicit Makefile macros.
* Makefile.tpl (HOST_EXPORTS, EXTRA_HOST_FLAGS): Pass GCJ and
GFORTRAN.
(POSTSTAGE1_HOST_EXPORTS): Add XGCC_FLAGS_FOR_TARGET and TFLAGS to
CC. Set CC_FOR_BUILD from CC.
(BASE_TARGET_EXPORTS, RAW_CXX_TARGET_EXPORTS,
NORMAL_TARGET_EXPORTS): Move SYSROOT_CFLAGS_FOR_TARGET and
DEBUG_PREFIX_CFLAGS_FOR_TARGET from CFLAGS and CXXFLAGS to
XGCC_FLAGS_FOR_TARGET. Add it along with TFLAGS to CC, CXX, GCJ,
and GFORTRAN.
(TFLAGS, STAGE_CFLAGS, STAGE_TFLAGS, STAGE_CONFIGURE_FLAGS): New.
(_LIBCFLAGS): Renamed to _TFLAGS.
(do-compare-debug, do-compare3-debug): Drop.
(CC, GCC_FOR_TARGET, CXX_FOR_TARGET, RAW_CXX_FOR_TARGET,
GCJ_FOR_TARGET, GFORTRAN_FOR_TARGET): Remove FLAGS_FOR_TARGET.
(FLAGS_FOR_TARGET, SYSROOT_CFLAGS_FOR_TARGET,
DEBUG_PREFIX_CFLAGS_FOR_TARGET): Move down.
(XGCC_FLAGS_FOR_TARGET): New.
(BASE_FLAGS_TO_PASS): Pass STAGEid_CFLAGS, STAGEid_TFLAGS and TFLAGS.
(EXTRA_HOST_FLAGS): Pass GCJ and GFORTRAN.
(POSTSTAGE1_FLAGS_TO_PASS): Move SYSROOT_CFLAGS_FOR_TARGET and
DEBUG_PREFIX_CFLAGS_FOR_TARGET from CFLAGS, CXXFLAGS, LIBCFLAGS,
LIBCXXFLAGS to XGCC_FLAGS_FOR_TARGET. Add it along with TFLAGS
to CC, CXX, GCJ, and GFORTRAN. Pass XGCC_FLAGS_FOR_TARGET and
TFLAGS.
(BUILD_CONFIG): Include if requested.
(all): Set TFLAGS on bootstrap.
(configure-stageid-prefixmodule): Pass TFLAGS, adjust FLAGS.
(all-stageid-prefixmodule): Likewise.
(do-clean, distclean-stageid): Set TFLAGS.
(restrap): Fix whitespace.
* Makefile.in: Rebuilt.
2009-04-25 Eric Botcazou <ebotcazou@adacore.com>
* Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Add GNATBIND.

View File

@ -255,12 +255,8 @@ flags_to_pass = { flag= CXXFLAGS ; };
flags_to_pass = { flag= LDFLAGS ; };
flags_to_pass = { flag= LIBCFLAGS ; };
flags_to_pass = { flag= LIBCXXFLAGS ; };
flags_to_pass = { flag= STAGE1_CFLAGS ; };
flags_to_pass = { flag= STAGE1_CHECKING ; };
flags_to_pass = { flag= STAGE1_LANGUAGES ; };
flags_to_pass = { flag= STAGE2_CFLAGS ; };
flags_to_pass = { flag= STAGE3_CFLAGS ; };
flags_to_pass = { flag= STAGE4_CFLAGS ; };
flags_to_pass = { flag= GNATBIND ; };
flags_to_pass = { flag= GNATMAKE ; };
@ -273,6 +269,7 @@ flags_to_pass = { flag= CPPFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= CXX_FOR_TARGET ; };
flags_to_pass = { flag= CXXFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= DLLTOOL_FOR_TARGET ; };
flags_to_pass = { flag= FLAGS_FOR_TARGET ; };
flags_to_pass = { flag= GCJ_FOR_TARGET ; };
flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; };
flags_to_pass = { flag= LD_FOR_TARGET ; };
@ -288,6 +285,7 @@ flags_to_pass = { flag= WINDRES_FOR_TARGET ; };
flags_to_pass = { flag= WINDMC_FOR_TARGET ; };
// Miscellaneous
flags_to_pass = { flag= BUILD_CONFIG ; };
flags_to_pass = { flag= LANGUAGES ; optional=true ; };
flags_to_pass = { flag= LEAN ; };
@ -555,62 +553,21 @@ languages = { language=objc; gcc-check-target=check-objc;
languages = { language=obj-c++; gcc-check-target=check-obj-c++; };
// Toplevel bootstrap
bootstrap_stage = {
id=1 ;
// * We force-disable intermodule optimizations, even if
// --enable-intermodule was passed, since the installed compiler
// probably can't handle them. Luckily, autoconf always respects
// the last argument when conflicting --enable arguments are passed.
// * Likewise, we force-disable coverage flags, since the installed
// compiler probably has never heard of them.
stage_configure_flags='--disable-intermodule $(STAGE1_CHECKING) \
--disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"' ;
stage_cflags='$(STAGE1_CFLAGS)' ;
stage_libcflags='$(STAGE1_LIBCFLAGS)' ; };
bootstrap_stage = { id=1 ; };
bootstrap_stage = {
id=2 ; prev=1 ;
bootstrap_target=bootstrap2 ;
stage_configure_flags="@stage2_werror_flag@" ;
stage_cflags="$(STAGE2_CFLAGS)" ;
stage_libcflags="$(STAGE2_LIBCFLAGS)" ; };
bootstrap_stage = {
id=b2g0 ; prev=1 ;
bootstrap_target=bootstrap2-debug ;
stage_configure_flags="@stage2_werror_flag@" ;
stage_cflags="$(STAGE2_CFLAGS) -g0" ;
stage_libcflags="$(STAGE2_LIBCFLAGS) -g0" ; };
bootstrap_target=bootstrap2 ; };
bootstrap_stage = {
id=3 ; prev=2 ; lean=1 ;
compare_target=compare ;
bootstrap_target=bootstrap ;
cleanstrap_target=cleanstrap ;
stage_configure_flags="@stage2_werror_flag@" ;
stage_cflags="$(STAGE3_CFLAGS)" ;
stage_libcflags="$(STAGE3_LIBCFLAGS)" ; };
bootstrap_stage = {
id=b3g2 ; prev=b2g0 ; lean=1 ;
compare_target=compare-debug ;
bootstrap_target=bootstrap-debug ;
cleanstrap_target=cleanstrap-debug ;
stage_configure_flags="@stage2_werror_flag@" ;
stage_cflags="$(STAGE3_CFLAGS) -g2" ;
stage_libcflags="$(STAGE3_LIBCFLAGS) -g2" ; };
cleanstrap_target=cleanstrap ; };
bootstrap_stage = {
id=4 ; prev=3 ; lean=2 ;
compare_target=compare3 ;
bootstrap_target=bootstrap4 ;
stage_configure_flags="@stage2_werror_flag@" ;
stage_cflags="$(STAGE4_CFLAGS)" ;
stage_libcflags="$(STAGE4_CFLAGS)" ; };
bootstrap_target=bootstrap4 ; };
bootstrap_stage = {
id=profile ; prev=1 ;
stage_configure_flags="@stage2_werror_flag@" ;
stage_cflags='$(STAGE2_CFLAGS) -fprofile-generate' ;
stage_libcflags='$(STAGE2_LIBCFLAGS)' ; };
id=profile ; prev=1 ; };
bootstrap_stage = {
id=feedback ; prev=profile ;
bootstrap_target=profiledbootstrap ;
stage_configure_flags="@stage2_werror_flag@" ;
stage_cflags='$(STAGE3_CFLAGS) -fprofile-use' ;
stage_libcflags='$(STAGE3_LIBCFLAGS) -fprofile-use' ; };
bootstrap_target=profiledbootstrap ; };

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,8 @@ in
#
# Makefile for directory with subdirs to build.
# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation
# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Free Software Foundation
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -177,6 +178,8 @@ HOST_EXPORTS = \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CXX="$(CXX)"; export CXX; \
CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
GCJ="$(GCJ)"; export GCJ; \
GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
AR="$(AR)"; export AR; \
AS="$(AS)"; export AS; \
CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
@ -212,11 +215,9 @@ HOST_EXPORTS = \
POSTSTAGE1_HOST_EXPORTS = \
$(HOST_EXPORTS) \
CC="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
-B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/"; export CC; \
CC_FOR_BUILD="$(STAGE_CC_WRAPPER) \
$$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
-B$$r/$(HOST_SUBDIR)/prev-gcc/ \
-B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \
-B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ \
$(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
CC_FOR_BUILD="$$CC"; export CC_FOR_BUILD; \
GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND \
LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS;
@ -231,13 +232,13 @@ BASE_TARGET_EXPORTS = \
$(BASE_EXPORTS) \
AR="$(AR_FOR_TARGET)"; export AR; \
AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
CC="$(CC_FOR_TARGET)"; export CC; \
CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \
GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
@ -253,11 +254,11 @@ BASE_TARGET_EXPORTS = \
RAW_CXX_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;
CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
NORMAL_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
CXX="$(CXX_FOR_TARGET)"; export CXX;
CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
# Where to find GMP
HOST_GMPLIBS = @gmplibs@
@ -357,48 +358,65 @@ LIBCFLAGS = $(CFLAGS)
CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
TFLAGS =
# Defaults for all stages; some are overridden below.
STAGE_CFLAGS = $(BOOT_CFLAGS)
STAGE_TFLAGS = $(TFLAGS)
STAGE_CONFIGURE_FLAGS=@stage2_werror_flag@
[+ FOR bootstrap-stage +]
# Defaults for stage [+id+]; some are overridden below.
STAGE[+id+]_CFLAGS = $(STAGE_CFLAGS)
STAGE[+id+]_TFLAGS = $(STAGE_TFLAGS)
STAGE[+id+]_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
[+ ENDFOR bootstrap-stage +]
# 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. STAGE1_CFLAGS (via CFLAGS),
# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
# overrideable (for a bootstrap build stage1 also builds gcc.info).
STAGE1_CFLAGS = @stage1_cflags@
STAGE1_CHECKING=@stage1_checking@
STAGE1_LANGUAGES=@stage1_languages@
# * We force-disable intermodule optimizations, even if
# --enable-intermodule was passed, since the installed compiler
# probably can't handle them. Luckily, autoconf always respects
# the last argument when conflicting --enable arguments are passed.
# * Likewise, we force-disable coverage flags, since the installed
# compiler probably has never heard of them.
STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \
--disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
STAGE1_CFLAGS=@stage1_cflags@
STAGE2_CFLAGS=$(BOOT_CFLAGS)
STAGE3_CFLAGS=$(BOOT_CFLAGS)
STAGE4_CFLAGS=$(BOOT_CFLAGS)
STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate
STAGEprofile_TFLAGS = $(STAGE2_TFLAGS)
STAGE1_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
STAGE2_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
STAGE3_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
STAGE4_LIBCFLAGS=$(CFLAGS_FOR_TARGET)
STAGEfeedback_CFLAGS = $(STAGE3_CFLAGS) -fprofile-use
STAGEfeedback_TFLAGS = $(STAGE3_TFLAGS)
do-compare = @do_compare@
do-compare3 = $(do-compare)
do-compare-debug = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2
# -----------------------------------------------
# Programs producing files for the TARGET machine
# -----------------------------------------------
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
AR_FOR_TARGET=@AR_FOR_TARGET@
AS_FOR_TARGET=@AS_FOR_TARGET@
CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ $(FLAGS_FOR_TARGET)
CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@
# If GCC_FOR_TARGET is not overriden on the command line, then this
# variable is passed down to the gcc Makefile, where it is used to
# build libgcc2.a. We define it here so that it can itself be
# overridden on the command line.
GCC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCC_FOR_TARGET@ $(FLAGS_FOR_TARGET)
CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET)
GCC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCC_FOR_TARGET@
CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@
RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@
GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@
GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
LD_FOR_TARGET=@LD_FOR_TARGET@
@ -416,13 +434,17 @@ COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@
CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@
CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
LDFLAGS_FOR_TARGET =
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
XGCC_FLAGS_FOR_TARGET = $(FLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
# ------------------------------------
# Miscellaneous targets and flag lists
# ------------------------------------
@ -472,7 +494,10 @@ HOST_LIB_PATH_[+module+] = \
# Flags to pass down to all sub-makes.
BASE_FLAGS_TO_PASS =[+ FOR flags_to_pass +][+ IF optional +] \
"`echo '[+flag+]=$([+flag+])' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"[+ ELSE optional +] \
"[+flag+]=$([+flag+])"[+ ENDIF optional+][+ ENDFOR flags_to_pass +] \
"[+flag+]=$([+flag+])"[+ ENDIF optional+][+ ENDFOR flags_to_pass +][+ FOR bootstrap-stage +] \
"STAGE[+id+]_CFLAGS=$(STAGE[+id+]_CFLAGS)" \
"STAGE[+id+]_TFLAGS=$(STAGE[+id+]_TFLAGS)"[+ ENDFOR bootstrap-stage +] \
"TFLAGS=$(TFLAGS)" \
"CONFIG_SHELL=$(SHELL)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)"
@ -487,6 +512,8 @@ EXTRA_HOST_FLAGS = \
'CC=$(CC)' \
'CXX=$(CXX)' \
'DLLTOOL=$(DLLTOOL)' \
'GCJ=$(GCJ)' \
'GFORTRAN=$(GFORTRAN)' \
'LD=$(LD)' \
'LIPO=$(LIPO)' \
'NM=$(NM)' \
@ -525,20 +552,24 @@ POSTSTAGE1_FLAGS_TO_PASS = \
EXTRA_TARGET_FLAGS = \
'AR=$$(AR_FOR_TARGET)' \
'AS=$(COMPILER_AS_FOR_TARGET)' \
'CC=$$(CC_FOR_TARGET)' \
'CFLAGS=$$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
'CXX=$$(CXX_FOR_TARGET)' \
'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
'CC=$$(CC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
'CXX=$$(CXX_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
'GCJ=$$(GCJ_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'LD=$(COMPILER_LD_FOR_TARGET)' \
'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
'NM=$(COMPILER_NM_FOR_TARGET)' \
'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)' \
'WINDMC=$$(WINDMC_FOR_TARGET)'
'WINDMC=$$(WINDMC_FOR_TARGET)' \
'XGCC_FLAGS_FOR_TARGET=$(XGCC_FLAGS_FOR_TARGET)' \
"TFLAGS=$$TFLAGS"
TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
@ -558,6 +589,13 @@ EXTRA_GCC_FLAGS = \
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS)
@if gcc
BUILD_CONFIG =
ifneq ($(BUILD_CONFIG),)
include $(foreach CONFIG, $(BUILD_CONFIG), $(srcdir)/config/$(CONFIG).mk)
endif
@endif gcc
.PHONY: configure-host
configure-host: [+
FOR host_modules +] \
@ -581,11 +619,17 @@ all:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
if [ -f stage_last ]; then \
@if gcc-bootstrap
if [ -f stage_last ]; then : ; \
TFLAGS="$(STAGE$(shell sed s,^stage,, stage_last)_TFLAGS)"; \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \
else \
@endif gcc-bootstrap
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target; \
fi
@if gcc-bootstrap
fi; \
@endif gcc-bootstrap
:
.PHONY: all-build
[+ FOR build_modules +]
@ -866,6 +910,7 @@ configure-stage[+id+]-[+prefix+][+module+]:
@$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+]
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
[+ IF check_multilibs
+]echo "Checking multilib configuration for [+module+]..."; \
$(CC_FOR_TARGET) --print-multi-lib > [+subdir+]/[+module+]/multilib.tmp 2> /dev/null ; \
@ -881,11 +926,14 @@ configure-stage[+id+]-[+prefix+][+module+]:
fi; \
[+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
[+exports+][+ IF prev +] \
[+poststage1_exports+][+ ENDIF prev +] [+ IF prefix +] \
CFLAGS="[+stage_libcflags+] $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="[+stage_libcflags+] $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; [+ ELSE +] \
CFLAGS="[+stage_cflags+]"; export CFLAGS; \
CXXFLAGS="[+stage_cflags+]"; export CXXFLAGS; [+ ENDIF +] \
[+poststage1_exports+][+ ENDIF prev +][+ IF prefix +] \
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"; export LIBCFLAGS;[+ ELSE prefix +] \
CFLAGS="$(STAGE[+id+]_CFLAGS)"; export CFLAGS; \
CXXFLAGS="$(STAGE[+id+]_CFLAGS)"; export CXXFLAGS;[+ IF prev +] \
LIBCFLAGS="$(STAGE[+id+]_CFLAGS)"[+ ELSE prev +] \
LIBCFLAGS="$(LIBCFLAGS)"[+ ENDIF prev +]; export LIBCFLAGS;[+ ENDIF prefix +] \
echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \
$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
cd [+subdir+]/[+module+] || exit 1; \
@ -898,9 +946,10 @@ configure-stage[+id+]-[+prefix+][+module+]:
libsrcdir="$$s/[+module+]"; \
$(SHELL) $${libsrcdir}/configure \
[+args+] --build=${build_alias} --host=[+host_alias+] \
--target=[+target_alias+] $${srcdiroption} \
[+ IF prev +]--with-build-libsubdir=$(HOST_SUBDIR)[+ ENDIF prev +] \
[+stage_configure_flags+] [+extra_configure_flags+]
--target=[+target_alias+] $${srcdiroption} [+ IF prev +]\
--with-build-libsubdir=$(HOST_SUBDIR) [+ ENDIF prev +]\
$(STAGE[+id+]_CONFIGURE_FLAGS)[+ IF extra_configure_flags +] \
[+extra_configure_flags+][+ ENDIF extra_configure_flags +]
@endif [+prefix+][+module+]-bootstrap
[+ ENDFOR bootstrap_stage +]
[+ ENDIF bootstrap +]
@ -940,16 +989,25 @@ all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
@[ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
[+exports+][+ IF prev +] \
[+poststage1_exports+][+ ENDIF prev +] \
cd [+subdir+]/[+module+] && \
$(MAKE) $(BASE_FLAGS_TO_PASS) \
CFLAGS="[+stage_cflags+]" CXXFLAGS="[+stage_cflags+]" \
LIBCFLAGS="[+stage_libcflags+]" \
CFLAGS_FOR_TARGET="[+stage_libcflags+]" \
CXXFLAGS_FOR_TARGET="[+stage_libcflags+]" [+args+] [+
$(MAKE) $(BASE_FLAGS_TO_PASS)[+ IF prefix +] \
CFLAGS="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)"[+ ELSE prefix +] \
CFLAGS="$(STAGE[+id+]_CFLAGS)" \
CXXFLAGS="$(STAGE[+id+]_CFLAGS)"[+ IF prev +] \
LIBCFLAGS="$(STAGE[+id+]_CFLAGS)"[+ ELSE prev +] \
LIBCFLAGS="$(LIBCFLAGS)"[+ ENDIF prev +][+ ENDIF prefix +] \
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
[+args+] [+
IF prev +][+poststage1_args+][+ ENDIF prev
+] [+extra_make_flags+] \
TFLAGS="$(STAGE[+id+]_TFLAGS)" \
$(TARGET-stage[+id+]-[+prefix+][+module+])
maybe-clean-stage[+id+]-[+prefix+][+module+]: clean-stage[+id+]-[+prefix+][+module+]
@ -1407,6 +1465,7 @@ do-clean: clean-stage[+id+]
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
[+bootstrap-target+]-lean:
@ -1417,6 +1476,7 @@ do-clean: clean-stage[+id+]
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
[+ ENDIF bootstrap-target +]
@ -1439,6 +1499,7 @@ distclean-stage[+id+]::
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
TFLAGS="$(STAGE[+id+]_TFLAGS)"; \
$(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
[+ ENDIF cleanstrap-target +]
@endif gcc-bootstrap
@ -1476,8 +1537,8 @@ stage_current:
.PHONY: restrap
restrap::
@: $(MAKE); $(stage)
rm -rf stage1-$(TARGET_SUBDIR) [+ FOR bootstrap-stage +][+ IF prev
+]stage[+id+]-* [+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
rm -rf stage1-$(TARGET_SUBDIR)[+ FOR bootstrap-stage +][+ IF prev
+] stage[+id+]-*[+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
restrap:: all
@endif gcc-bootstrap

View File

@ -1,3 +1,11 @@
2009-05-12 Alexandre Oliva <aoliva@redhat.com>
* multi.m4: Save CXX, GFORTRAN and GCJ in config.status.
* mt-gnu (CXXFLAGS_FOR_TARGET): Adjust.
* bootstrap-O1.mk: New.
* bootstrap-O3.mk: New.
* bootstrap-debug.mk: New.
2009-02-02 Doug Evans <dje@google.com>
* tcl.m4 (SC_PATH_TCLCONFIG): Don't exit 0 if tclconfig fails.

1
config/bootstrap-O1.mk Normal file
View File

@ -0,0 +1 @@
BOOT_CFLAGS := -O1 $(filter-out -O%, $(BOOT_CFLAGS))

1
config/bootstrap-O3.mk Normal file
View File

@ -0,0 +1 @@
BOOT_CFLAGS := -O3 $(filter-out -O%, $(BOOT_CFLAGS))

View File

@ -0,0 +1,2 @@
STAGE2_CFLAGS += -g0
do-compare = $(SHELL) $(srcdir)/contrib/compare-debug $$f1 $$f2

View File

@ -1,2 +1 @@
CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) \
$(DEBUG_PREFIX_CFLAGS_FOR_TARGET) -D_GNU_SOURCE
CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE

View File

@ -1,5 +1,5 @@
## -*- Autoconf -*-
# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2008
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@ -62,4 +62,7 @@ with_target_subdir="$with_target_subdir"
ac_configure_args="${multilib_arg} ${ac_configure_args}"
multi_basedir="$multi_basedir"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
CC="$CC"])])dnl
CC="$CC"
CXX="$CXX"
GFORTRAN="$GFORTRAN"
GCJ="$GCJ"])])dnl