summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-19 18:33:25 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-19 18:33:25 +0000
commitef3c41c78d877ac478ddaac3942243f9bd0844f3 (patch)
tree12679178a3a755dd714cb1f3c1812ee84f0591c5 /configure.ac
parent1f796f4022228d2f51fa545d017f39da495e78bd (diff)
downloadgcc-ef3c41c78d877ac478ddaac3942243f9bd0844f3.tar.gz
./:
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176480 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac32
1 files changed, 25 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 7085eeaf235..c53d381b727 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/*"