RFA: Fix bootstrap/44432

Joern Rennecke amylaar@spamcop.net
Tue Jun 8 23:07:00 GMT 2010


This adds a check that a trivial source file can be compiled as C++
before invoking ZW_PROG_COMPILER_DEPENDENCIES - the latter macro
was the source of the unhelpful error message.

I have verified that the expected error message appears when doing a
sequential or parallel bootstrap on a machine with the c++ compiler disabled,
and that during bootstrap with the c++ compiler re-enabled, the libcpp
configure succeeds.
-------------- next part --------------
2010-06-08  Joern Rennecke  <joern.rennecke@embecosm.com>

	PR bootstrap/44432
	* configure.ac: Before using ZW_PROG_COMPILER_DEPENDENCIES for C++,
	check that C++ compiler works.
	* configure: Regenerate.

Index: libcpp/configure.ac
===================================================================
--- libcpp/configure.ac	(revision 160389)
+++ libcpp/configure.ac	(working copy)
@@ -45,6 +45,10 @@ ZW_CREATE_DEPDIR
 if test "$ENABLE_BUILD_WITH_CXX" = "no"; then
 ZW_PROG_COMPILER_DEPENDENCIES([CC])
 else
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([[int i;]], [],
+		  [AC_MSG_ERROR([C++ compiler missing or inoperational])])
+AC_LANG_POP([C++])
 ZW_PROG_COMPILER_DEPENDENCIES([CXX])
 fi
 


More information about the Gcc-patches mailing list