From patchwork Tue May 8 23:02:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Novillo X-Patchwork-Id: 157832 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 C85D6B6F9A for ; Wed, 9 May 2012 09:03:14 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1337122995; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Message-ID:Date:From:User-Agent:MIME-Version: To:Subject:References:In-Reply-To:Content-Type: Content-Transfer-Encoding:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=3rZ6iA7sY0JNbkRKtl7eEaXX6OA=; b=jQ6/tHSQQXDKng8 +DtJMLIhv2og7LTGxtEVpuVOy6itwUGrpwSyTg1yDwhWSfeIB11/f05Ah5utMxDs mzq/g3JWg/C26Km5ZyzIUNUBJLKW3Z8MrnyC5Dafkl6YgFxrCB1GssxIqWigQm5C Mj89GSu7RE3vpdutxNoVbW6GVlZ0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=HKs3nEmcaJ2eIjTiFajpy/Do5ENqAauuYOoCG9Bv+1XkvQdDa3sC1XdV9DByZn NcEq+dYwuSBYaiKINUktnH6XjWNFQ1AF+vGCXqAeuz4tZ3ExnoAujwtzbnQh5mvr i7rTpY/6fGoce15OT2CHk2DK9Cncodf/swjOYshBUlmYE=; Received: (qmail 24948 invoked by alias); 8 May 2012 23:02:55 -0000 Received: (qmail 24917 invoked by uid 22791); 8 May 2012 23:02:53 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_CX, T_RP_MATCHES_RCVD, URIBL_BLACK X-Spam-Check-By: sourceware.org Received: from mail-pz0-f47.google.com (HELO mail-pz0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 May 2012 23:02:38 +0000 Received: by dalh21 with SMTP id h21so8948786dal.20 for ; Tue, 08 May 2012 16:02:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:organization:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding:x-gm-message-state; bh=Cr1G4g/V6PNkXC4x+Yi7KULO5ANo1+lvjzVvgRifoFE=; b=ZivrZdlzVV0fs3j+zA77Gw/J9+e0OJa55h0IpITxBYbN+MDokd0KaRr6AXeBoIdEv7 40EXHOJ9YH1bVa465++lpOPkn4ni76CVPClJ5kO+/aJf1Zh/sCG358DZyklo0zf6Mo81 ZjRjkXXyGE38hxFgv42Fk+bm4xXgVtnYLUqEYrJZ6K+tXna1kAQdvmF/ofizwCNFZY+v CAx8PlAncoL2/vrgn3F1q6KRWDg9PTwvGz3PxVTrwzzt70JH2InsKAzqt4pVB3kjDu5P GJDp49/5oR9KCAoXVUF7EU+pfKl6m21XHJccjxlkZYFVYQfMtW7MIvzsRbA6OmnXuWtb 4w6g== Received: by 10.68.194.227 with SMTP id hz3mr2620815pbc.23.1336518157668; Tue, 08 May 2012 16:02:37 -0700 (PDT) Received: by 10.68.194.227 with SMTP id hz3mr2620788pbc.23.1336518157501; Tue, 08 May 2012 16:02:37 -0700 (PDT) Received: from dhcp-172-19-15-206.mtv.corp.google.com (dhcp-172-19-15-206.mtv.corp.google.com [172.19.15.206]) by mx.google.com with ESMTPS id os7sm3777894pbb.67.2012.05.08.16.02.35 (version=SSLv3 cipher=OTHER); Tue, 08 May 2012 16:02:36 -0700 (PDT) Message-ID: <4FA9A60A.4030307@google.com> Date: Tue, 08 May 2012 16:02:34 -0700 From: Diego Novillo User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: reply@codereview.appspotmail.com, dj@redhat.com, iant@google.com, gcc-patches@gcc.gnu.org Subject: Re: Use C++ in COMPILER_FOR_BUILD if needed (issue6191056) References: <20120508224653.B528A102847@torture.tor.corp.google.com> In-Reply-To: <20120508224653.B528A102847@torture.tor.corp.google.com> X-Gm-Message-State: ALoCoQnpkGGngwQAAL5X508+nagN8bGqhUUUaSCZR+P1yJO4hlYFli8rYCSnOcG+cyVJJsa1VYcQcBV8jMtwgav5Ej1aTFXD5R1mZTwZfxy/j5Mf/6kgI0hH5ud6jfL1rCSgSVbfLIH8eL812Jojnd/XT0hzNrvKHw== 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 On 12-05-08 15:46 , Diego Novillo wrote: > Found this while testing the C++ conversion for vec.[ch] on the > cxx-conversion branch. We do not build the build/*.o files with g++, > so I was getting lots of syntax errors while compiling build/vec.o. > > I am not completely sure if the changes are correct. But it works for > me. > > Tested on x86_64. OK for trunk? > > 2012-05-08 Diego Novillo > > * Makefile.in (CXX_FOR_BUILD): Define. > (BUILD_CXX_FLAGS): Define > (COMPILER_FOR_BUILD): Set to CXX_FOR_BUILD if building with C++. > (LINKER_FOR_BUILD): Likewise. > (BUILD_COMPILERFLAGS): Set to BUILD_CXXFLAGS if building with C++. > (BUILD_LINKERFLAGS): Likewise. I forgot to include the changes needed in configure.ac to export CXX_FOR_BUILD. Without this, incremental builds from /gcc will fail because the value of CXX_FOR_BUILD will not be set. Tested on x86_64. OK for trunk? 2012-05-08 Diego Novillo * configure.ac (CXX_FOR_BUILD): Define and substitute. * configure: Regenerate. diff --git a/gcc/configure.ac b/gcc/configure.ac index b3cfed4..a05f4f9 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1848,6 +1848,7 @@ AC_SUBST(inhibit_libc) # These are the normal (build=host) settings: CC_FOR_BUILD='$(CC)' AC_SUBST(CC_FOR_BUILD) +CXX_FOR_BUILD='$(CXX)' AC_SUBST(CXX_FOR_BUILD) BUILD_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(BUILD_CFLAGS) BUILD_LDFLAGS='$(LDFLAGS)' AC_SUBST(BUILD_LDFLAGS) STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)