diff mbox

RFA: Fix bootstrap/44432

Message ID 20100608184804.6wo3ezps0w84swkg-nzlynne@webmail.spamcop.net
State New
Headers show

Commit Message

Joern Rennecke June 8, 2010, 10:48 p.m. UTC
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.

Comments

Paolo Bonzini June 9, 2010, 6:12 a.m. UTC | #1
On 06/09/2010 12:48 AM, Joern Rennecke wrote:
> 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.

Ok.

Paolo
diff mbox

Patch

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