Index: Makefile.tpl |
diff --git a/Makefile.tpl b/Makefile.tpl |
index ae263e6d36f152bb23617a088877a3d42231a8ff..92f3f6156c6b9bd42bc775b8bdb331d72e10071a 100644 |
--- a/Makefile.tpl |
+++ b/Makefile.tpl |
@@ -169,7 +169,7 @@ BUILD_EXPORTS = \ |
WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC; |
# These variables must be set on the make command line for directories |
-# built for the build system to override those in BASE_FLAGS_TO_PASSS. |
+# built for the build system to override those in BASE_FLAGS_TO_PASS. |
EXTRA_BUILD_FLAGS = \ |
CFLAGS="$(CFLAGS_FOR_BUILD)" \ |
LDFLAGS="$(LDFLAGS_FOR_BUILD)" |
@@ -222,8 +222,7 @@ HOST_EXPORTS = \ |
HOST_LIBS="$(STAGE1_LIBS)"; export HOST_LIBS; \ |
GMPLIBS="$(HOST_GMPLIBS)"; export GMPLIBS; \ |
GMPINC="$(HOST_GMPINC)"; export GMPINC; \ |
- PPLLIBS="$(HOST_PPLLIBS)"; export PPLLIBS; \ |
- PPLINC="$(HOST_PPLINC)"; export PPLINC; \ |
+ ISLINC="$(HOST_ISLINC)"; export ISLINC; \ |
CLOOGLIBS="$(HOST_CLOOGLIBS)"; export CLOOGLIBS; \ |
CLOOGINC="$(HOST_CLOOGINC)"; export CLOOGINC; \ |
LIBELFLIBS="$(HOST_LIBELFLIBS)" ; export LIBELFLIBS; \ |
@@ -239,7 +238,7 @@ POSTSTAGE1_CXX_EXPORT = \ |
@if target-libstdc++-v3-bootstrap |
# Override the above if we're bootstrapping C++. |
POSTSTAGE1_CXX_EXPORT = \ |
- CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/g++$(exeext) \ |
+ CXX="$(STAGE_CC_WRAPPER) $$r/$(HOST_SUBDIR)/prev-gcc/xg++$(exeext) \ |
-B$$r/$(HOST_SUBDIR)/prev-gcc/ -B$(build_tooldir)/bin/ -nostdinc++ \ |
-B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ |
-B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/libsupc++/.libs \ |
@@ -313,9 +312,8 @@ NORMAL_TARGET_EXPORTS = \ |
HOST_GMPLIBS = @gmplibs@ |
HOST_GMPINC = @gmpinc@ |
-# Where to find PPL |
-HOST_PPLLIBS = @ppllibs@ |
-HOST_PPLINC = @pplinc@ |
+# Where to find ISL |
+HOST_ISLINC = @islinc@ |
# Where to find CLOOG |
HOST_CLOOGLIBS = @clooglibs@ |
@@ -369,7 +367,7 @@ BUILD_PREFIX_1 = @BUILD_PREFIX_1@ |
# here so that they can be overridden by Makefile fragments. |
BOOT_CFLAGS= -g -O2 |
BOOT_LDFLAGS= |
-BOOT_ADAFLAGS=-gnatpg -gnata |
+BOOT_ADAFLAGS= -gnatpg |
AWK = @AWK@ |
SED = @SED@ |
@@ -425,7 +423,6 @@ TFLAGS = |
STAGE_CFLAGS = $(BOOT_CFLAGS) |
STAGE_TFLAGS = $(TFLAGS) |
STAGE_CONFIGURE_FLAGS=@stage2_werror_flag@ |
-POSTSTAGE1_CONFIGURE_FLAGS = @POSTSTAGE1_CONFIGURE_FLAGS@ |
[+ FOR bootstrap-stage +] |
# Defaults for stage [+id+]; some are overridden below. |
@@ -436,10 +433,7 @@ STAGE[+id+]_CXXFLAGS = $(CXXFLAGS) |
STAGE[+id+]_CXXFLAGS = $(STAGE[+id+]_CFLAGS) |
@endif target-libstdc++-v3-bootstrap |
STAGE[+id+]_TFLAGS = $(STAGE_TFLAGS) |
-# STAGE1_CONFIGURE_FLAGS overridden below, so we can use |
-# POSTSTAGE1_CONFIGURE_FLAGS here. |
-STAGE[+id+]_CONFIGURE_FLAGS = \ |
- $(STAGE_CONFIGURE_FLAGS) $(POSTSTAGE1_CONFIGURE_FLAGS) |
+STAGE[+id+]_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS) |
[+ ENDFOR bootstrap-stage +] |
# Only build the C compiler for stage1, because that is the only one that |
@@ -457,11 +451,10 @@ STAGE1_LANGUAGES = @stage1_languages@ |
# 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. |
-# * Don't remove this, because above we added |
-# POSTSTAGE1_CONFIGURE_FLAGS to STAGE[+id+]_CONFIGURE_FLAGS, which |
-# we don't want for STAGE1_CONFIGURE_FLAGS. |
+# * We also disable -Wformat, since older GCCs don't understand newer %s. |
STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \ |
- --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" |
+ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \ |
+ --disable-build-format-warnings |
STAGEprofile_CFLAGS = $(STAGE2_CFLAGS) -fprofile-generate |
STAGEprofile_TFLAGS = $(STAGE2_TFLAGS) |
@@ -624,6 +617,12 @@ EXTRA_HOST_FLAGS = \ |
FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) |
+# Flags to pass to stage1 or when not bootstrapping. |
+ |
+STAGE1_FLAGS_TO_PASS = \ |
+ LDFLAGS="$${LDFLAGS}" \ |
+ HOST_LIBS="$${HOST_LIBS}" |
+ |
# Flags to pass to stage2 and later makes. |
POSTSTAGE1_FLAGS_TO_PASS = \ |
@@ -906,11 +905,12 @@ install.all: install-no-fixedincludes |
true ; \ |
fi |
-# install-no-fixedincludes is used because Cygnus can not distribute |
-# the fixed header files. |
+# install-no-fixedincludes is used to allow the elaboration of binary packages |
+# suitable for distribution, where we cannot include the fixed system header |
+# files. |
.PHONY: install-no-fixedincludes |
install-no-fixedincludes: installdirs install-host-nogcc \ |
- install-target gcc-no-fixedincludes |
+ install-target gcc-install-no-fixedincludes |
.PHONY: install-strip |
install-strip: |
@@ -1084,7 +1084,7 @@ all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +][+ ELS |
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ |
[+exports+] [+extra_exports+] \ |
(cd [+subdir+]/[+module+] && \ |
- $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+extra_make_flags+] \ |
+ $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+stage1_args+] [+extra_make_flags+] \ |
$(TARGET-[+prefix+][+module+])) |
@endif [+prefix+][+module+] |
@@ -1117,9 +1117,8 @@ all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+] |
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+] \ |
+ [+args+] [+IF prev +][+poststage1_args+][+ ELSE prev +] \ |
+ [+stage1_args+][+ ENDIF prev +] [+extra_make_flags+] \ |
TFLAGS="$(STAGE[+id+]_TFLAGS)" \ |
$(TARGET-stage[+id+]-[+prefix+][+module+]) |
@@ -1133,9 +1132,8 @@ clean-stage[+id+]-[+prefix+][+module+]: |
$(MAKE) stage[+id+]-start; \ |
fi; \ |
cd [+subdir+]/[+module+] && \ |
- $(MAKE) [+args+] [+ IF prev +] \ |
- [+poststage1_args+] [+ ENDIF prev +] \ |
- [+extra_make_flags+] clean |
+ $(MAKE) [+args+] [+ IF prev +][+poststage1_args+][+ ELSE prev +] \ |
+ [+stage1_args+][+ ENDIF prev +] [+extra_make_flags+] clean |
@endif [+prefix+][+module+]-bootstrap |
[+ ENDFOR bootstrap_stage +] |
@@ -1170,6 +1168,7 @@ clean-stage[+id+]-[+prefix+][+module+]: |
exports="$(HOST_EXPORTS)" |
poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)" |
args="$(EXTRA_HOST_FLAGS)" |
+ stage1_args="$(STAGE1_FLAGS_TO_PASS)" |
poststage1_args="$(POSTSTAGE1_FLAGS_TO_PASS)" +] |
.PHONY: check-[+module+] maybe-check-[+module+] |
@@ -1407,12 +1406,19 @@ ENDIF raw_cxx +] |
[+ ENDFOR recursive_targets +] |
[+ ENDFOR target_modules +] |
-@if target-libmudflap |
-.PHONY: check-target-libmudflap-c++ |
-check-target-libmudflap-c++: |
- $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++frags.exp" check-target-libmudflap |
+@if target-libgomp |
+.PHONY: check-target-libgomp-c++ |
+check-target-libgomp-c++: |
+ $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++.exp" check-target-libgomp |
-@endif target-libmudflap |
+@endif target-libgomp |
+ |
+@if target-libitm |
+.PHONY: check-target-libitm-c++ |
+check-target-libitm-c++: |
+ $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) c++.exp" check-target-libitm |
+ |
+@endif target-libitm |
# ---------- |
# GCC module |
@@ -1443,25 +1449,16 @@ check-gcc-[+language+]: |
check-[+language+]: check-gcc-[+language+][+ FOR lib-check-target +] [+ lib-check-target +][+ ENDFOR lib-check-target +] |
[+ ENDFOR languages +] |
-# Install the gcc headers files, but not the fixed include files, |
-# which Cygnus is not allowed to distribute. This rule is very |
-# dependent on the workings of the gcc Makefile.in. |
-.PHONY: gcc-no-fixedincludes |
-gcc-no-fixedincludes: |
+# The gcc part of install-no-fixedincludes, which relies on an intimate |
+# knowledge of how a number of gcc internal targets (inter)operate. Delegate. |
+.PHONY: gcc-install-no-fixedincludes |
+gcc-install-no-fixedincludes: |
@if [ -f ./gcc/Makefile ]; then \ |
- rm -rf gcc/tmp-include; \ |
- mv gcc/include gcc/tmp-include 2>/dev/null; \ |
- mkdir gcc/include; \ |
- cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ |
- touch gcc/stmp-fixinc gcc/include/fixed; \ |
- rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ |
r=`${PWD_COMMAND}`; export r; \ |
- s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \ |
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ |
$(HOST_EXPORTS) \ |
- (cd ./gcc && \ |
- $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ |
- rm -rf gcc/include; \ |
- mv gcc/tmp-include gcc/include 2>/dev/null; \ |
+ (cd ./gcc \ |
+ && $(MAKE) $(GCC_FLAGS_TO_PASS) install-no-fixedincludes); \ |
else true; fi |
@endif gcc |