diff options
author | Jason Merrill <jason@redhat.com> | 2020-06-05 12:45:11 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-06-08 16:42:35 -0400 |
commit | ffac9597256823612fb63bbab0f9ba3c11255e6b (patch) | |
tree | c5f0a6a6042169bbd40d9030922b138d530eb34d /configure.ac | |
parent | a37fbff12c3a441753f5eb677cebeab7350f24eb (diff) | |
download | gcc-ffac9597256823612fb63bbab0f9ba3c11255e6b.zip gcc-ffac9597256823612fb63bbab0f9ba3c11255e6b.tar.gz gcc-ffac9597256823612fb63bbab0f9ba3c11255e6b.tar.bz2 |
bootstrap: Fix --disable-bootstrap with older g++.
Previously I had AX_CXX_COMPILE_STDCXX in the gcc directory configure, which
added -std=c++11 to CXX if needed, but then CXX is overridden from the
toplevel directory, so it didn't have the desired effect. Fixed by moving
the check to the toplevel. Currently it is only used when building GCC
without bootstrapping; other packages that share the toplevel directory
can adjust the condition if they also want to require C++11 support.
/ChangeLog:
* configure.ac: Check AX_CXX_COMPILE_STDCXX if not bootstrapping.
* configure: Regenerate.
gcc/ChangeLog:
* aclocal.m4: Remove ax_cxx_compile_stdcxx.m4.
* configure.ac: Remove AX_CXX_COMPILE_STDCXX.
* configure: Regenerate.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 59bd92a..1a53ed4 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,7 @@ m4_include(config/acx.m4) m4_include(config/override.m4) m4_include(config/proginstall.m4) m4_include(config/elf.m4) +m4_include(config/ax_cxx_compile_stdcxx.m4) m4_include([libtool.m4]) m4_include([ltoptions.m4]) m4_include([ltsugar.m4]) @@ -1463,9 +1464,12 @@ case "$have_compiler:$host:$target:$enable_bootstrap" in esac # When bootstrapping with GCC, build stage 1 in C++11 mode to ensure that a -# C++11 compiler can still start the bootstrap. +# C++11 compiler can still start the bootstrap. Otherwise, if building GCC, +# require C++11 (or higher). if test "$enable_bootstrap:$GXX" = "yes:yes"; then CXX="$CXX -std=c++11" +elif test "$have_compiler" = yes; then + AX_CXX_COMPILE_STDCXX(11) fi # Used for setting $lt_cv_objdir |