This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: Fix bootstrap/44432


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.
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
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]