From patchwork Tue Dec 7 18:45:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 74591 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 A837CB70A3 for ; Wed, 8 Dec 2010 05:45:25 +1100 (EST) Received: (qmail 9448 invoked by alias); 7 Dec 2010 18:45:24 -0000 Received: (qmail 9438 invoked by uid 22791); 7 Dec 2010 18:45:23 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Dec 2010 18:45:18 +0000 Received: from wpaz13.hot.corp.google.com (wpaz13.hot.corp.google.com [172.24.198.77]) by smtp-out.google.com with ESMTP id oB7IjHl5020506 for ; Tue, 7 Dec 2010 10:45:17 -0800 Received: from pxi15 (pxi15.prod.google.com [10.243.27.15]) by wpaz13.hot.corp.google.com with ESMTP id oB7IiqIY016164 for ; Tue, 7 Dec 2010 10:45:16 -0800 Received: by pxi15 with SMTP id 15so84074pxi.5 for ; Tue, 07 Dec 2010 10:45:15 -0800 (PST) Received: by 10.143.162.5 with SMTP id p5mr1288266wfo.230.1291747515665; Tue, 07 Dec 2010 10:45:15 -0800 (PST) Received: from coign.google.com (dhcp-172-22-123-203.mtv.corp.google.com [172.22.123.203]) by mx.google.com with ESMTPS id x18sm9291803wfa.11.2010.12.07.10.45.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 07 Dec 2010 10:45:14 -0800 (PST) From: Ian Lance Taylor To: Ralf Wildenhues Cc: Jakub Jelinek , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Don't require C++ bootstrap compiler (PR bootstrap/46810) References: <20101206183434.GU29412@tyan-ft48-01.lab.bos.redhat.com> <20101206191253.GB9471@gmx.de> Date: Tue, 07 Dec 2010 10:45:10 -0800 In-Reply-To: <20101206191253.GB9471@gmx.de> (Ralf Wildenhues's message of "Mon, 6 Dec 2010 20:12:53 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-System-Of-Record: true X-IsSubscribed: yes 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 is an example of the alternative approach I was thinking of: only run the C++ tests if the C++ compiler works. Does this look OK? Ian 2010-12-07 Ian Lance Taylor PR bootstrap/46810 * configure.ac: Only run C++ tests if the C++ compiler works. Index: configure.ac =================================================================== --- configure.ac (revision 167515) +++ configure.ac (working copy) @@ -913,13 +913,17 @@ AC_C_BIGENDIAN # Checks for C++ headers # ---------------------- -AC_LANG_PUSH(C++) +# Only run the tests if the C++ compiler works. +echo "int i;" > conftest.cc +if $CXX -c conftest.cc >&5; then + AC_LANG_PUSH(C++) + + AC_CHECK_HEADERS(unordered_map) + AC_CHECK_HEADERS(tr1/unordered_map) + AC_CHECK_HEADERS(ext/hash_map) -AC_CHECK_HEADERS(unordered_map) -AC_CHECK_HEADERS(tr1/unordered_map) -AC_CHECK_HEADERS(ext/hash_map) - -AC_LANG_POP(C++) + AC_LANG_POP(C++) +fi # -------- # UNSORTED