From patchwork Tue Jun 8 22:48:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joern Rennecke X-Patchwork-Id: 55040 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 62BB5B7D47 for ; Wed, 9 Jun 2010 08:48:14 +1000 (EST) Received: (qmail 12729 invoked by alias); 8 Jun 2010 22:48:12 -0000 Received: (qmail 12705 invoked by uid 22791); 8 Jun 2010 22:48:10 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from c60.cesmail.net (HELO c60.cesmail.net) (216.154.195.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Jun 2010 22:48:06 +0000 Received: from unknown (HELO delta2) ([192.168.1.50]) by c60.cesmail.net with ESMTP; 08 Jun 2010 18:48:04 -0400 Received: from 78.146.185.72 ([78.146.185.72]) by webmail.spamcop.net (Horde MIME library) with HTTP; Tue, 08 Jun 2010 18:48:04 -0400 Message-ID: <20100608184804.6wo3ezps0w84swkg-nzlynne@webmail.spamcop.net> Date: Tue, 08 Jun 2010 18:48:04 -0400 From: Joern Rennecke To: gcc-patches@gcc.gnu.org Subject: RFA: Fix bootstrap/44432 MIME-Version: 1.0 User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 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