aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorbonzini <>2005-12-05 15:00:27 +0000
committerbonzini <>2005-12-05 15:00:27 +0000
commit4ec24cedd530c9601574315bec82298e480189e0 (patch)
tree05cc5ce809715a6dd302c3a48e97b1407f60db9d /Makefile.in
parent6443219d6b7867013fc3e8160c3d536933a06ab2 (diff)
toplevel:
2005-12-05 Paolo Bonzini <bonzini@gnu.org> * configure.in (CONFIGURED_BISON, CONFIGURED_YACC, CONFIGURED_M4, CONFIGURED_FLEX, CONFIGURED_LEX, CONFIGURED_MAKEINFO): Remove "CONFIGURED_" from the AC_CHECK_PROGS invocation. Move below. Find in-tree tools if available. (EXPECT, RUNTEST, LIPO, STRIP): Find them and substitute them. (CONFIGURED_*_FOR_TARGET): Don't set nor substitute. (*_FOR_TARGET): Set them with GCC_TARGET_TOOL. (COMPILER_*_FOR_TARGET): New. * Makefile.tpl (HOST_EXPORTS): Add *_FOR_TARGET symbols that gcc needs. (BASE_TARGET_EXPORTS): Use COMPILER_*_FOR_TARGET symbols. (CONFIGURED_*, USUAL_*): Remove. (BISON, YACC, FLEX, LEX, M4, MAKEINFO, EXPECT, RUNTEST, LIPO, STRIP): Use autoconf substitutions. (COMPILER_AS_FOR_TARGET, COMPILER_LD_FOR_TARGET, COMPILER_NM_FOR_TARGET): New. (EXTRA_HOST_FLAGS): Pass LIPO and STRIP. (all): Make all-host and all-target in parallel. (do-[+make_target+], do-check, install, [+compare-target+]): Ensure that $$r and $$s are set before invoking a recursive make. (stage[+id+]-bubble): Likewise, and invoke the comparison at the end. ([+bootstrap-target+]): Inline most of the `all' target. config: 2005-12-05 Paolo Bonzini <bonzini@gnu.org> * acx.m4 (GCC_TARGET_TOOL): New.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in433
1 files changed, 109 insertions, 324 deletions
diff --git a/Makefile.in b/Makefile.in
index e84c5d23a71..5bedd9e98cb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -133,7 +133,8 @@ HOST_CONFIGARGS = @host_configargs@
# with srcdir=..
HOST_SUBDIR = @host_subdir@
# This is the list of variables to export in the environment when
-# configuring subdirectories for the host system.
+# configuring subdirectories for the host system. We need to pass
+# some to the GCC configure because of its hybrid host/target nature.
HOST_EXPORTS = \
$(BASE_EXPORTS) \
CC="$(CC)"; export CC; \
@@ -152,6 +153,13 @@ HOST_EXPORTS = \
WINDRES="$(WINDRES)"; export WINDRES; \
OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ AR_FOR_TARGET="$(AR_FOR_TARGET)"; export AR_FOR_TARGET; \
+ AS_FOR_TARGET="$(AS_FOR_TARGET)"; export AS_FOR_TARGET; \
+ GCC_FOR_TARGET="$(GCC_FOR_TARGET)"; export GCC_FOR_TARGET; \
+ LD_FOR_TARGET="$(LD_FOR_TARGET)"; export LD_FOR_TARGET; \
+ NM_FOR_TARGET="$(NM_FOR_TARGET)"; export NM_FOR_TARGET; \
+ OBJDUMP_FOR_TARGET="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP_FOR_TARGET; \
+ RANLIB_FOR_TARGET="$(RANLIB_FOR_TARGET)"; export RANLIB_FOR_TARGET; \
TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \
GMPINC="$(HOST_GMPINC)"; export GMPINC; \
@@ -183,7 +191,7 @@ TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)"
BASE_TARGET_EXPORTS = \
$(BASE_EXPORTS) \
AR="$(AR_FOR_TARGET)"; export AR; \
- AS="$(AS_FOR_TARGET)"; export AS; \
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
CC="$(CC_FOR_TARGET)"; export CC; \
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
@@ -192,10 +200,10 @@ BASE_TARGET_EXPORTS = \
GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
- LD="$(LD_FOR_TARGET)"; export LD; \
+ LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
LIPO="$(LIPO_FOR_TARGET)"; export LIPO; \
- NM="$(NM_FOR_TARGET)"; export NM; \
+ NM="$(COMPILER_NM_FOR_TARGET)"; export NM; \
OBJDUMP="$(OBJDUMP_FOR_TARGET)"; export OBJDUMP; \
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
@@ -245,47 +253,14 @@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@
# here so that they can be overridden by Makefile fragments.
BOOT_CFLAGS= -g -O2
-CONFIGURED_BISON = @CONFIGURED_BISON@
-BISON = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \
- echo $$r/$(BUILD_SUBDIR)/bison/tests/bison ; \
- else \
- echo ${CONFIGURED_BISON} ; \
- fi`
-
-CONFIGURED_YACC = @CONFIGURED_YACC@
-YACC = `if [ -f $$r/$(BUILD_SUBDIR)/bison/tests/bison ] ; then \
- echo $$r/$(BUILD_SUBDIR)/bison/tests/bison -y ; \
- elif [ -f $$r/$(BUILD_SUBDIR)/byacc/byacc ] ; then \
- echo $$r/$(BUILD_SUBDIR)/byacc/byacc ; \
- else \
- echo ${CONFIGURED_YACC} ; \
- fi`
-
-CONFIGURED_FLEX = @CONFIGURED_FLEX@
-FLEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \
- then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \
- else echo ${CONFIGURED_FLEX} ; fi`
-
-CONFIGURED_LEX = @CONFIGURED_LEX@
-LEX = `if [ -f $$r/$(BUILD_SUBDIR)/flex/flex ] ; \
- then echo $$r/$(BUILD_SUBDIR)/flex/flex ; \
- else echo ${CONFIGURED_LEX} ; fi`
-
-CONFIGURED_M4 = @CONFIGURED_M4@
-M4 = `if [ -f $$r/$(BUILD_SUBDIR)/m4/m4 ] ; \
- then echo $$r/$(BUILD_SUBDIR)/m4/m4 ; \
- else echo ${CONFIGURED_M4} ; fi`
-
-# For an installed makeinfo, we require it to be from texinfo 4.2 or
-# higher, else we use the "missing" dummy. We also pass the subdirectory
-# makeinfo even if only the Makefile is there, because Texinfo builds its
-# manual when made, and it requires its own version.
-CONFIGURED_MAKEINFO = @CONFIGURED_MAKEINFO@
-MAKEINFO = `if [ -f $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/Makefile ] ; \
- then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \
- else if (${CONFIGURED_MAKEINFO} --version \
- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
- then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi`
+BISON = @BISON@
+YACC = @YACC@
+FLEX = @FLEX@
+LEX = @LEX@
+M4 = @M4@
+MAKEINFO = @MAKEINFO@
+EXPECT = @EXPECT@
+RUNTEST = @RUNTEST@
# This just becomes part of the MAKEINFO definition passed down to
# sub-makes. It lets flags be given on the command line while still
@@ -293,43 +268,28 @@ MAKEINFO = `if [ -f $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/Makefile ] ; \
# (Default to avoid splitting info files by setting the threshold high.)
MAKEINFOFLAGS = --split-size=5000000
-# FIXME: expect may become a build tool?
-EXPECT = `if [ -f $$r/$(HOST_SUBDIR)/expect/expect ] ; \
- then echo $$r/$(HOST_SUBDIR)/expect/expect ; \
- else echo expect ; fi`
-
-RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
- then echo $$s/dejagnu/runtest ; \
- else echo runtest ; fi`
-
# ---------------------------------------------
# Programs producing files for the HOST machine
# ---------------------------------------------
AS = @AS@
-
AR = @AR@
AR_FLAGS = rc
-
CC = @CC@
-CFLAGS = @CFLAGS@
-LIBCFLAGS = $(CFLAGS)
-
CXX = @CXX@
-CXXFLAGS = @CXXFLAGS@
-LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
-
DLLTOOL = @DLLTOOL@
-
-NM = @NM@
-
LD = @LD@
-LDFLAGS =
-
+LIPO = @LIPO@
+NM = @NM@
RANLIB = @RANLIB@
-
+STRIP = @STRIP@
WINDRES = @WINDRES@
+CFLAGS = @CFLAGS@
+LDFLAGS =
+LIBCFLAGS = $(CFLAGS)
+CXXFLAGS = @CXXFLAGS@
+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
PICFLAG =
# -----------------------------------------------
@@ -339,242 +299,42 @@ PICFLAG =
FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
AR_FOR_TARGET=@AR_FOR_TARGET@
-CONFIGURED_AR_FOR_TARGET=@CONFIGURED_AR_FOR_TARGET@
-USUAL_AR_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/binutils/ar ] ; then \
- echo $$r/$(HOST_SUBDIR)/binutils/ar ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(AR); \
- else \
- echo $(CONFIGURED_AR_FOR_TARGET) ; \
- fi; \
- fi`
-
AS_FOR_TARGET=@AS_FOR_TARGET@
-CONFIGURED_AS_FOR_TARGET=@CONFIGURED_AS_FOR_TARGET@
-USUAL_AS_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/gas/as-new ] ; then \
- echo $$r/$(HOST_SUBDIR)/gas/as-new ; \
- elif [ -f $$r/$(HOST_SUBDIR)/gcc/as ]; then \
- echo $$r/$(HOST_SUBDIR)/gcc/as ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(AS); \
- else \
- echo $(CONFIGURED_AS_FOR_TARGET) ; \
- fi; \
- fi`
-
CC_FOR_TARGET=$(STAGE_CC_WRAPPER) @CC_FOR_TARGET@ $(FLAGS_FOR_TARGET)
-CONFIGURED_CC_FOR_TARGET=@CONFIGURED_CC_FOR_TARGET@
-USUAL_CC_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \
- echo $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/ ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(CC); \
- else \
- echo $(CONFIGURED_CC_FOR_TARGET) ; \
- fi; \
- fi`
-
-# During gcc bootstrap, if we use some random cc for stage1 then
-# CFLAGS will be just -g. We want to ensure that TARGET libraries
-# (which we know are built with gcc) are built with optimizations so
-# prepend -O2 when setting CFLAGS_FOR_TARGET.
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
-SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_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=@GCC_FOR_TARGET@
-CONFIGURED_GCC_FOR_TARGET=@CONFIGURED_GCC_FOR_TARGET@
-USUAL_GCC_FOR_TARGET = $(STAGE_CC_WRAPPER) \
- $$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/ $(FLAGS_FOR_TARGET)
-LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
-
+GCC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCC_FOR_TARGET@ $(FLAGS_FOR_TARGET)
CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
-CONFIGURED_CXX_FOR_TARGET=@CONFIGURED_CXX_FOR_TARGET@
-USUAL_CXX_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/gcc/g++ ] ; then \
- (echo $$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++; \
- test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes; \
- echo -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs) | tr '\015\012' ' '; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(CXX); \
- else \
- echo $(CONFIGURED_CXX_FOR_TARGET) ; \
- fi; \
- fi`
-
RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ $(FLAGS_FOR_TARGET)
-USUAL_RAW_CXX_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/gcc/xgcc ] ; then \
- echo $$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(CXX); \
- else \
- echo $(CONFIGURED_CXX_FOR_TARGET) ; \
- fi; \
- fi`
-
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
-LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
-
GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
-CONFIGURED_GCJ_FOR_TARGET=@CONFIGURED_GCJ_FOR_TARGET@
-USUAL_GCJ_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/gcc/gcj ] ; then \
- echo $$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(GCJ); \
- else \
- echo $(CONFIGURED_GCJ_FOR_TARGET) ; \
- fi; \
- fi`
-
GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ $(FLAGS_FOR_TARGET)
-CONFIGURED_GFORTRAN_FOR_TARGET=@CONFIGURED_GFORTRAN_FOR_TARGET@
-USUAL_GFORTRAN_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/gcc/gfortran ] ; then \
- echo $$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(GFORTRAN); \
- else \
- echo $(CONFIGURED_GFORTRAN_FOR_TARGET) ; \
- fi; \
- fi`
-
-
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
-CONFIGURED_DLLTOOL_FOR_TARGET=@CONFIGURED_DLLTOOL_FOR_TARGET@
-USUAL_DLLTOOL_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/binutils/dlltool ] ; then \
- echo $$r/$(HOST_SUBDIR)/binutils/dlltool ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(DLLTOOL); \
- else \
- echo $(CONFIGURED_DLLTOOL_FOR_TARGET) ; \
- fi; \
- fi`
-
LD_FOR_TARGET=@LD_FOR_TARGET@
-CONFIGURED_LD_FOR_TARGET=@CONFIGURED_LD_FOR_TARGET@
-USUAL_LD_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/ld/ld-new ] ; then \
- echo $$r/$(HOST_SUBDIR)/ld/ld-new ; \
- elif [ -f $$r/$(HOST_SUBDIR)/gcc/collect-ld ]; then \
- echo $$r/$(HOST_SUBDIR)/gcc/collect-ld ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(LD); \
- else \
- echo $(CONFIGURED_LD_FOR_TARGET) ; \
- fi; \
- fi`
-
-LDFLAGS_FOR_TARGET =
LIPO_FOR_TARGET=@LIPO_FOR_TARGET@
-CONFIGURED_LIPO_FOR_TARGET=@CONFIGURED_LIPO_FOR_TARGET@
-USUAL_LIPO_FOR_TARGET = ` \
- if [ '$(host)' = '$(target)' ] ; then \
- if [ x'$(LIPO)' != x ]; then \
- echo $(LIPO); \
- else \
- echo lipo; \
- fi; \
- else \
- echo $(CONFIGURED_LIPO_FOR_TARGET) ; \
- fi`
-
NM_FOR_TARGET=@NM_FOR_TARGET@
-CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
-USUAL_NM_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/binutils/nm-new ] ; then \
- echo $$r/$(HOST_SUBDIR)/binutils/nm-new ; \
- elif [ -f $$r/$(HOST_SUBDIR)/gcc/nm ]; then \
- echo $$r/$(HOST_SUBDIR)/gcc/nm ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(NM); \
- else \
- echo $(CONFIGURED_NM_FOR_TARGET) ; \
- fi; \
- fi`
-
OBJDUMP_FOR_TARGET=@OBJDUMP_FOR_TARGET@
-CONFIGURED_OBJDUMP_FOR_TARGET=@CONFIGURED_OBJDUMP_FOR_TARGET@
-USUAL_OBJDUMP_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/binutils/objdump ] ; then \
- echo $$r/$(HOST_SUBDIR)/binutils/objdump ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- if [ x'$(OBJDUMP)' != x ]; then \
- echo $(OBJDUMP); \
- else \
- echo objdump; \
- fi; \
- else \
- echo $(CONFIGURED_OBJDUMP_FOR_TARGET) ; \
- fi; \
- fi`
-
RANLIB_FOR_TARGET=@RANLIB_FOR_TARGET@
-CONFIGURED_RANLIB_FOR_TARGET=@CONFIGURED_RANLIB_FOR_TARGET@
-USUAL_RANLIB_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/binutils/ranlib ] ; then \
- echo $$r/$(HOST_SUBDIR)/binutils/ranlib ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- if [ x'$(RANLIB)' != x ]; then \
- echo $(RANLIB); \
- else \
- echo ranlib; \
- fi; \
- else \
- echo $(CONFIGURED_RANLIB_FOR_TARGET) ; \
- fi; \
- fi`
-
STRIP_FOR_TARGET=@STRIP_FOR_TARGET@
-CONFIGURED_STRIP_FOR_TARGET=@CONFIGURED_STRIP_FOR_TARGET@
-USUAL_STRIP_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/binutils/strip ] ; then \
- echo $$r/$(HOST_SUBDIR)/binutils/strip ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- if [ x'$(STRIP)' != x ]; then \
- echo $(STRIP); \
- else \
- echo strip; \
- fi; \
- else \
- echo $(CONFIGURED_STRIP_FOR_TARGET) ; \
- fi; \
- fi`
-
WINDRES_FOR_TARGET=@WINDRES_FOR_TARGET@
-CONFIGURED_WINDRES_FOR_TARGET=@CONFIGURED_WINDRES_FOR_TARGET@
-USUAL_WINDRES_FOR_TARGET = ` \
- if [ -f $$r/$(HOST_SUBDIR)/binutils/windres ] ; then \
- echo $$r/$(HOST_SUBDIR)/binutils/windres ; \
- else \
- if [ '$(host)' = '$(target)' ] ; then \
- echo $(WINDRES); \
- else \
- echo $(CONFIGURED_WINDRES_FOR_TARGET) ; \
- fi; \
- fi`
+COMPILER_AS_FOR_TARGET=@COMPILER_AS_FOR_TARGET@
+COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@
+COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@
+
+# During gcc bootstrap, if we use some random cc for stage1 then
+# CFLAGS will be just -g. We want to ensure that TARGET libraries
+# (which we know are built with gcc) are built with optimizations so
+# prepend -O2 when setting CFLAGS_FOR_TARGET.
+CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
+CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+LDFLAGS_FOR_TARGET =
PICFLAG_FOR_TARGET =
# ------------------------------------
@@ -712,8 +472,10 @@ EXTRA_HOST_FLAGS = \
'CXX=$(CXX)' \
'DLLTOOL=$(DLLTOOL)' \
'LD=$(LD)' \
+ 'LIPO=$(LIPO)' \
'NM=$(NM)' \
'RANLIB=$(RANLIB)' \
+ 'STRIP=$(STRIP)' \
'WINDRES=$(WINDRES)'
FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
@@ -735,17 +497,17 @@ X11_FLAGS_TO_PASS = \
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
EXTRA_TARGET_FLAGS = \
'AR=$$(AR_FOR_TARGET)' \
- 'AS=$$(AS_FOR_TARGET)' \
+ 'AS=$$(COMPILER_AS_FOR_TARGET)' \
'CC=$$(CC_FOR_TARGET)' \
'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
'CXX=$$(CXX_FOR_TARGET)' \
'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
- 'LD=$$(LD_FOR_TARGET)' \
+ 'LD=$$(COMPILER_LD_FOR_TARGET)' \
'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
- 'NM=$$(NM_FOR_TARGET)' \
+ 'NM=$$(COMPILER_NM_FOR_TARGET)' \
'OBJDUMP=$$(OBJDUMP_FOR_TARGET)' \
'RANLIB=$$(RANLIB_FOR_TARGET)' \
'WINDRES=$$(WINDRES_FOR_TARGET)'
@@ -870,28 +632,19 @@ configure-target: \
.PHONY: all
all:
@if gcc-bootstrap
+ [ -f stage_final ] || echo stage3 > stage_final
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- if [ ! -f stage_last ]; then \
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) bootstrap; \
- fi
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) `cat stage_final`-bubble; \
@endif gcc-bootstrap
@$(unstage)
-@if gcc-no-bootstrap
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-prebootstrap
-@endif gcc-no-bootstrap
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
if [ -f stage_last ]; then \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target; \
else \
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-host all-target; \
fi
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all-target
@$(stage)
.PHONY: all-build
@@ -35790,7 +35543,7 @@ stage = :
@if gcc-bootstrap
unstage = [ -f stage_current ] || $(MAKE) `cat stage_last`-start
-stage = $(MAKE) `cat stage_current`-end
+stage = [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
@endif gcc-bootstrap
.PHONY: unstage stage
@@ -35845,7 +35598,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \
.PHONY: stage1-start stage1-end
stage1-start::
- @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ @$(stage); \
echo stage1 > stage_current ; \
echo stage1 > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
@@ -35991,7 +35744,7 @@ do-clean: clean-stage1
.PHONY: distclean-stage1
distclean-stage1::
- [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ @$(stage)
rm -rf stage1-*
@@ -36001,7 +35754,7 @@ distclean-stage1::
.PHONY: stage2-start stage2-end
stage2-start::
- @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ @$(stage); \
echo stage2 > stage_current ; \
echo stage2 > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
@@ -36187,15 +35940,23 @@ do-clean: clean-stage2
.PHONY: bootstrap2
-bootstrap2: stage2-bubble
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
+bootstrap2:
+ echo stage2 > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage2-bubble
+ @$(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
+ @$(stage)
# Rules to wipe a stage and all the following ones, also used for cleanstrap
distclean-stage1:: distclean-stage2
.PHONY: distclean-stage2
distclean-stage2::
- [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ @$(stage)
rm -rf stage2-*
@@ -36205,7 +35966,7 @@ distclean-stage2::
.PHONY: stage3-start stage3-end
stage3-start::
- @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ @$(stage); \
echo stage3 > stage_current ; \
echo stage3 > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
@@ -36381,6 +36142,7 @@ stage3-bubble:: stage2-bubble
$(MAKE) stage3-start; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage3; \
fi
+ $(MAKE) compare
.PHONY: all-stage3 clean-stage3
do-clean: clean-stage3
@@ -36396,7 +36158,7 @@ compare:
echo Cannot compare object files as stage 2 was deleted. ; \
exit 0 ; \
fi; \
- [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ $(stage); \
rm -f .bad_compare ; \
cd stage3-gcc; \
files=`find . -name "*$(objext)" -print` ; \
@@ -36426,16 +36188,23 @@ compare:
.PHONY: bootstrap
-bootstrap: stage3-bubble
- $(MAKE) compare
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
+bootstrap:
+ echo stage3 > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage3-bubble
+ @$(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
+ @$(stage)
# Rules to wipe a stage and all the following ones, also used for cleanstrap
distclean-stage2:: distclean-stage3
.PHONY: distclean-stage3
distclean-stage3::
- [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ @$(stage)
rm -rf stage3-* compare
@@ -36448,7 +36217,7 @@ cleanstrap: distclean bootstrap
.PHONY: stage4-start stage4-end
stage4-start::
- @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ @$(stage); \
echo stage4 > stage_current ; \
echo stage4 > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
@@ -36624,6 +36393,7 @@ stage4-bubble:: stage3-bubble
$(MAKE) stage4-start; \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all-stage4; \
fi
+ $(MAKE) compare3
.PHONY: all-stage4 clean-stage4
do-clean: clean-stage4
@@ -36639,7 +36409,7 @@ compare3:
echo Cannot compare object files as stage 3 was deleted. ; \
exit 0 ; \
fi; \
- [ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ $(stage); \
rm -f .bad_compare ; \
cd stage4-gcc; \
files=`find . -name "*$(objext)" -print` ; \
@@ -36669,16 +36439,23 @@ compare3:
.PHONY: bootstrap4
-bootstrap4: stage4-bubble
- $(MAKE) compare3
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
+bootstrap4:
+ echo stage4 > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage4-bubble
+ @$(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
+ @$(stage)
# Rules to wipe a stage and all the following ones, also used for cleanstrap
distclean-stage3:: distclean-stage4
.PHONY: distclean-stage4
distclean-stage4::
- [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ @$(stage)
rm -rf stage4-* compare3
@@ -36688,7 +36465,7 @@ distclean-stage4::
.PHONY: stageprofile-start stageprofile-end
stageprofile-start::
- @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ @$(stage); \
echo stageprofile > stage_current ; \
echo stageprofile > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
@@ -36878,7 +36655,7 @@ do-clean: clean-stageprofile
distclean-stage1:: distclean-stageprofile
.PHONY: distclean-stageprofile
distclean-stageprofile::
- [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ @$(stage)
rm -rf stageprofile-*
@@ -36888,7 +36665,7 @@ distclean-stageprofile::
.PHONY: stagefeedback-start stagefeedback-end
stagefeedback-start::
- @[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
+ @$(stage); \
echo stagefeedback > stage_current ; \
echo stagefeedback > stage_last; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
@@ -37074,15 +36851,23 @@ do-clean: clean-stagefeedback
.PHONY: profiledbootstrap
-profiledbootstrap: stagefeedback-bubble
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
+profiledbootstrap:
+ echo stagefeedback > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stagefeedback-bubble
+ @$(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
+ @$(stage)
# Rules to wipe a stage and all the following ones, also used for cleanstrap
distclean-stageprofile:: distclean-stagefeedback
.PHONY: distclean-stagefeedback
distclean-stagefeedback::
- [ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
+ @$(stage)
rm -rf stagefeedback-*