diff options
author | Ian Lance Taylor <iant@google.com> | 2011-07-19 18:33:25 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-07-19 18:33:25 +0000 |
commit | 78767fd9cf5581827603c154235fd36ecf075e31 (patch) | |
tree | 12679178a3a755dd714cb1f3c1812ee84f0591c5 /configure.ac | |
parent | 0baeec1b0902d647ba34d18b8ab1ee013ec3b4be (diff) | |
download | gcc-78767fd9cf5581827603c154235fd36ecf075e31.zip gcc-78767fd9cf5581827603c154235fd36ecf075e31.tar.gz gcc-78767fd9cf5581827603c154235fd36ecf075e31.tar.bz2 |
configure.ac: Add --enable-build-poststage1-with-cxx.
./: * configure.ac: Add --enable-build-poststage1-with-cxx. If set,
make C++ a boot_language. Set and substitute
POSTSTAGE1_CONFIGURE_FLAGS.
* Makefile.tpl (POSTSTAGE1_CONFIGURE_FLAGS): New variable.
(STAGE[+id+]_CONFIGURE_FLAGS): Add $(POSTSTAGE1_CONFIGURE_FLAGS).
* configure, Makefile.in: Rebuild.
gcc/:
* doc/install.texi (Configuration): Document
--enable-build-poststage1-with-cxx.
From-SVN: r176480
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 7085eea..c53d381 100644 --- a/configure.ac +++ b/configure.ac @@ -1140,6 +1140,13 @@ AC_ARG_ENABLE(build-with-cxx, ENABLE_BUILD_WITH_CXX=$enableval, ENABLE_BUILD_WITH_CXX=no) +# Build stage1 with C and build stages 2 and 3 with C++. +AC_ARG_ENABLE(build-poststage1-with-cxx, +[AS_HELP_STRING([--enable-build-poststage1-with-cxx], + [build stages 2 and 3 with C++, not C])], +ENABLE_BUILD_POSTSTAGE1_WITH_CXX=$enableval, +ENABLE_BUILD_POSTSTAGE1_WITH_CXX=yes) + # Used for setting $lt_cv_objdir _LT_CHECK_OBJDIR @@ -1710,9 +1717,11 @@ if test -d ${srcdir}/gcc; then exit 1 fi - if test "$language" = "c++" \ - && test "$ENABLE_BUILD_WITH_CXX" = "yes"; then - boot_language=yes + if test "$language" = "c++"; then + if test "$ENABLE_BUILD_WITH_CXX" = "yes" \ + || test "$ENABLE_BUILD_POSTSTAGE1_WITH_CXX" = "yes"; then + boot_language=yes + fi fi case ,${enable_languages}, in @@ -2411,10 +2420,10 @@ case "$have_compiler:$host:$target:$enable_bootstrap" in ;; esac -case ",$enable_languages,:$ENABLE_BUILD_WITH_CXX:$enable_bootstrap" in - *,c++,*:yes:yes) ;; - *:yes:yes) - AC_MSG_ERROR([bootstrapping with --enable-build-with-cxx requires c++ in --enable-languages]) +case ",$enable_languages,:,$ENABLE_BUILD_WITH_CXX,$ENABLE_BUILD_POSTSTAGE1_WITH_CXX,:$enable_bootstrap" in + *,c++,*:*:*) ;; + *:*,yes,*:yes) + AC_MSG_ERROR([bootstrapping with --enable-build-with-cxx or --enable-build-postage1-with-cxx requires c++ in --enable-languages]) ;; esac @@ -3202,6 +3211,15 @@ case ${enable_werror} in esac AC_SUBST(stage2_werror_flag) +# If using ENABLE_BUILD_POSTSTAGE1_WITH_CXX, pass +# --enable-build-with-cxx after stage1. +if test "$ENABLE_BUILD_POSTSTAGE1_WITH_CXX" = "yes"; then + POSTSTAGE1_CONFIGURE_FLAGS=--enable-build-with-cxx +else + POSTSTAGE1_CONFIGURE_FLAGS= +fi +AC_SUBST(POSTSTAGE1_CONFIGURE_FLAGS) + # Specify what files to not compare during bootstrap. compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*" |