From patchwork Thu Mar 27 04:18:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 334196 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A7198140077 for ; Thu, 27 Mar 2014 15:18:30 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=CXXjkvjQQWIvUiAhB zYBfbN0yHNJpoKiYhdsMGA/y0N4hLODUgmiT7t/68BjU3mDgL+irOL/4g14jqo31 XTtZbFdu4OziCpq3DyzaUmhxpm6UxtbCradjAoIfcsw7owwMrI39TjoBUVyNkWcd WBlxwLd9HjUQIPwgN7VBbePH7c= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=M83d6ET2PqnO+xn7chB2332 XhjE=; b=TBM/5D8kqZ/Eh0R0ep7NDEJOOafzKgzD6vh2H7vWC4Q+xHrtoCsTDAG s3TIWoXbUFjK8bGB9kv/sa/qS1HrpmSXTkQOqC7WGx8zf5pKq/qTZfBOb3p2uAN9 iN+QdKNxl0krqawcSwvDrL3Bnahx7stJiFGA0BL/xcy4M2Kbg/l0= Received: (qmail 13128 invoked by alias); 27 Mar 2014 04:18:23 -0000 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 Received: (qmail 13118 invoked by uid 89); 27 Mar 2014 04:18:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f181.google.com Received: from mail-pd0-f181.google.com (HELO mail-pd0-f181.google.com) (209.85.192.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 27 Mar 2014 04:18:20 +0000 Received: by mail-pd0-f181.google.com with SMTP id p10so2766957pdj.26 for ; Wed, 26 Mar 2014 21:18:19 -0700 (PDT) X-Received: by 10.68.136.133 with SMTP id qa5mr90356616pbb.63.1395893898977; Wed, 26 Mar 2014 21:18:18 -0700 (PDT) Received: from bubble.grove.modra.org ([101.166.26.37]) by mx.google.com with ESMTPSA id pq3sm2681426pbb.57.2014.03.26.21.18.15 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Mar 2014 21:18:18 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id CDB14EA00DD; Thu, 27 Mar 2014 14:48:12 +1030 (CST) Date: Thu, 27 Mar 2014 14:48:12 +1030 From: Alan Modra To: "Maciej W. Rozycki" Cc: Bernd Edlinger , "gcc-patches@gcc.gnu.org" , Jakub Jelinek , DJ Delorie , Eric Botcazou Subject: Re: Two build != host fixes Message-ID: <20140327041812.GT18201@bubble.grove.modra.org> Mail-Followup-To: "Maciej W. Rozycki" , Bernd Edlinger , "gcc-patches@gcc.gnu.org" , Jakub Jelinek , DJ Delorie , Eric Botcazou References: <20131211124146.GA13694@bubble.grove.modra.org> <20131212010230.GB16770@bubble.grove.modra.org> <20131217232839.GB1864@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes On Wed, Mar 26, 2014 at 09:43:08PM +0000, Maciej W. Rozycki wrote: > Alan, > > On Tue, 17 Dec 2013, Alan Modra wrote: > > > On Tue, Dec 17, 2013 at 01:14:23PM +0100, Bernd Edlinger wrote: > > > the reason for this is overwriting GMPINC for the auto-build generation, because > > > many test scripts include which fails now completely (it is not installed, > > > I have it in-tree). > > > > Yes, I understand the reason why your setup is failing. Please try > > this patch. > > > > Index: gcc/configure.ac > > =================================================================== > > --- gcc/configure.ac (revision 206009) > > +++ gcc/configure.ac (working copy) > > @@ -1529,8 +1529,13 @@ > > /* | [A-Za-z]:[\\/]* ) realsrcdir=${srcdir};; > > *) realsrcdir=../${srcdir};; > > esac > > + # Clearing GMPINC is necessary to prevent host headers being > > + # used by the build compiler. Defining GENERATOR_FILE stops > > + # system.h from including gmp.h. > > CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ > > - LDFLAGS="${LDFLAGS_FOR_BUILD}" GMPINC="" \ > > + CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ > > + LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ > > + GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ > > ${realsrcdir}/configure \ > > --enable-languages=${enable_languages-all} \ > > --target=$target_alias --host=$build_alias --build=$build_alias > > Can you please backport this change to 4.8 too, to fix the build > regression discussed here introduced by the previous change that did get > backported? Oops, I'd forgotten that the first patch had gone on the branch.. Backported and regression tested. OK to apply? 2014-03-27 Alan Modra Apply from mainline 2014-01-28 Alan Modra * Makefile.in (BUILD_CPPFLAGS): Do not use ALL_CPPFLAGS. * configure.ac : Define GENERATOR_FILE. Comment. Use CXX_FOR_BUILD, CXXFLAGS_FOR_BUILD and LD_FOR_BUILD too. * configure: Regenerate. Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in (revision 208856) +++ gcc/Makefile.in (working copy) @@ -747,7 +747,8 @@ # Native linker and preprocessor flags. For x-fragment overrides. BUILD_LDFLAGS=@BUILD_LDFLAGS@ -BUILD_CPPFLAGS=$(ALL_CPPFLAGS) +BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \ + -I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS) # Actual name to use when installing a native compiler. GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 208856) +++ gcc/configure.ac (working copy) @@ -1516,8 +1516,13 @@ /* | [A-Za-z]:[\\/]* ) realsrcdir=${srcdir};; *) realsrcdir=../${srcdir};; esac + # Clearing GMPINC is necessary to prevent host headers being + # used by the build compiler. Defining GENERATOR_FILE stops + # system.h from including gmp.h. CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ - LDFLAGS="${LDFLAGS_FOR_BUILD}" GMPINC="" \ + CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ + LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ + GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ ${realsrcdir}/configure \ --enable-languages=${enable_languages-all} \ --target=$target_alias --host=$build_alias --build=$build_alias