]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
configure.ac: Add -std=c++98 to stage1_cxxflags.
authorJason Merrill <jason@redhat.com>
Thu, 21 May 2015 15:12:35 +0000 (11:12 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 21 May 2015 15:12:35 +0000 (11:12 -0400)
* configure.ac: Add -std=c++98 to stage1_cxxflags.
* Makefile.tpl (STAGE1_CXXFLAGS): And substitute it.
* Makefile.in, configure: Regenerate.

From-SVN: r223487

ChangeLog
Makefile.in
Makefile.tpl
configure
configure.ac

index d742bf253d04115bcd48795da7d4fcebe04f5f00..7b2f2b29ff4bdf7cc66a4a17b03f3fc36b91109b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-05-21  Jason Merrill  <jason@redhat.com>
+
+       * configure.ac: Add -std=c++98 to stage1_cxxflags.
+       * Makefile.tpl (STAGE1_CXXFLAGS): And substitute it.
+       * Makefile.in, configure: Regenerate.
+
 2015-05-16  James Bowman  <james.bowman@ftdichip.com>
 
        * configure.ac: FT32 target added.
index c221a0bae7696ea50e20683774636e273948b4aa..7ae2a40d4e3adb9f78e4c5afba23b9821590807a 100644 (file)
@@ -482,13 +482,12 @@ STAGEfeedback_TFLAGS = $(STAGE_TFLAGS)
 STAGEfeedback_CONFIGURE_FLAGS = $(STAGE_CONFIGURE_FLAGS)
 
 
-# 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).
+# By default, C and C++ are the only stage1 languages, because they are the
+# only ones we require to build with the bootstrap compiler, and also the
+# only ones useful for building stage2.
 
 STAGE1_CFLAGS = @stage1_cflags@
+STAGE1_CXXFLAGS = @stage1_cxxflags@
 STAGE1_CHECKING = @stage1_checking@
 STAGE1_LANGUAGES = @stage1_languages@
 # * We force-disable intermodule optimizations, even if
@@ -677,7 +676,9 @@ CXX_FOR_TARGET_FLAG_TO_PASS = \
        $(shell if echo "$(CXX_FOR_TARGET)" | grep " -funconfigured-" > /dev/null; then :; else echo '"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"'; fi)
 @endif target-libstdc++-v3
 
-# Flags to pass down to all sub-makes.
+# Flags to pass down to all sub-makes. STAGE*FLAGS,
+# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+# overrideable (for a bootstrap build stage1 also builds gcc.info).
 BASE_FLAGS_TO_PASS = \
        "DESTDIR=$(DESTDIR)" \
        "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
index ec53b59ce572856ba1a16542467e815e01313fa8..914196f0914835a1d7f656933c480facbcf9e6ad 100644 (file)
@@ -435,13 +435,12 @@ 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).
+# By default, C and C++ are the only stage1 languages, because they are the
+# only ones we require to build with the bootstrap compiler, and also the
+# only ones useful for building stage2.
 
 STAGE1_CFLAGS = @stage1_cflags@
+STAGE1_CXXFLAGS = @stage1_cxxflags@
 STAGE1_CHECKING = @stage1_checking@
 STAGE1_LANGUAGES = @stage1_languages@
 # * We force-disable intermodule optimizations, even if
@@ -579,7 +578,9 @@ CXX_FOR_TARGET_FLAG_TO_PASS = \
        $(shell if echo "$(CXX_FOR_TARGET)" | grep " -funconfigured-" > /dev/null; then :; else echo '"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"'; fi)
 @endif target-libstdc++-v3
 
-# Flags to pass down to all sub-makes.
+# Flags to pass down to all sub-makes. STAGE*FLAGS,
+# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+# overrideable (for a bootstrap build stage1 also builds gcc.info).
 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 +][+ FOR bootstrap-stage +] \
index d8043298ad0908298ccb53267d8e6f4e59b22b0d..07aba3e460d19d2f122648f8d97715c0c9070e7b 100755 (executable)
--- a/configure
+++ b/configure
@@ -559,6 +559,7 @@ compare_exclusions
 host_shared
 stage2_werror_flag
 stage1_checking
+stage1_cxxflags
 stage1_cflags
 MAINT
 MAINTAINER_MODE_FALSE
@@ -14755,6 +14756,13 @@ case $build in
       *) stage1_cflags="-g -J" ;;
     esac ;;
 esac
+stage1_cxxflags='$(STAGE1_CFLAGS)'
+if test "$GCC" = yes; then
+  # Build stage 1 in C++98 mode to ensure that a C++98 compiler can still
+  # start the bootstrap.
+  stage1_cxxflags="$stage1_cxxflags -std=c++98"
+fi
+
 
 
 
index 4da04b76fdf80fcd679f2ff4e7161c3796397455..5808eda41aa4308efbc5e13d145d9d910128fe50 100644 (file)
@@ -3476,8 +3476,15 @@ case $build in
       *) stage1_cflags="-g -J" ;;
     esac ;;
 esac
+stage1_cxxflags='$(STAGE1_CFLAGS)'
+if test "$GCC" = yes; then
+  # Build stage 1 in C++98 mode to ensure that a C++98 compiler can still
+  # start the bootstrap.
+  stage1_cxxflags="$stage1_cxxflags -std=c++98"
+fi
 
 AC_SUBST(stage1_cflags)
+AC_SUBST(stage1_cxxflags)
 
 # Enable --enable-checking in stage1 of the compiler.
 AC_ARG_ENABLE(stage1-checking,