From patchwork Thu Apr 23 09:58:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 463925 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 7B2A51400B7 for ; Thu, 23 Apr 2015 19:58:38 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=uKRDAjMO; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=jbwyT5YqhYy71G4cz eP40ohbxeYJTx7pi1ZpjPTjYp/U4XAUZ7Q0IWFbOQ5PiC9CvJqnB4zxfDsEXK72h ysaVPPv73VtLWV6FtDVM0GA80FWAWlasQ1ubYRn2MDXuTv3IK1rWZ0aDPD4w30wR AoaDN1rgsf6VPSnDTW4fbRl6gQ= 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=9vMXysK1RqB+ENjRuXHUTum WZ7E=; b=uKRDAjMOymPbI1C4jPHmEnsVTj24/rahIDLhYP6hGgjeIHqt/+Kypsm wV+SUSjLaAO1QNOkYqZ3iNcHhFiAahFZfB343oSiZ+28unZ8uS31pvRDBvrZvwXZ 1bxHd6V/RBQFAiWJV0WXt2m6mhmEH67lR315zL1N1iCpXOni3es4= Received: (qmail 45974 invoked by alias); 23 Apr 2015 09:58:30 -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 45958 invoked by uid 89); 23 Apr 2015 09:58:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Apr 2015 09:58:27 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-18.uk.mimecast.lan; Thu, 23 Apr 2015 10:58:23 +0100 Received: from [10.2.207.50] ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 23 Apr 2015 10:58:22 +0100 Message-ID: <5538C23E.50003@arm.com> Date: Thu, 23 Apr 2015 10:58:22 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Richard Earnshaw , Richard Biener , Trevor Saunders CC: James Greenhalgh , "tbsaunde+gcc@tbsaunde.org" , GCC Patches , Ramana Radhakrishnan , "nickc@redhat.com" , Bin Cheng , Bernd Schmidt Subject: Re: [PATCH 02/12] remove some ifdef HAVE_cc0 References: <1429622658-9034-1-git-send-email-tbsaunde+gcc@tbsaunde.org> <1429622658-9034-3-git-send-email-tbsaunde+gcc@tbsaunde.org> <20150421152444.GD9945@tsaunders-iceball.corp.tor1.mozilla.com> <20150423032756.GA16004@arm.com> <20150423045406.GA2949@tsaunders-iceball.corp.tor1.mozilla.com> <5538B02A.5050705@arm.com> <5538B682.60700@foss.arm.com> In-Reply-To: <5538B682.60700@foss.arm.com> X-MC-Unique: iE8ImSa2RhaPQyOCVQXauQ-1 X-IsSubscribed: yes On 23/04/15 10:08, Richard Earnshaw wrote: > On 23/04/15 09:41, Kyrill Tkachov wrote: >> On 23/04/15 09:35, Richard Biener wrote: >>> On Thu, Apr 23, 2015 at 6:54 AM, Trevor Saunders wrote: >>>> On Thu, Apr 23, 2015 at 04:27:59AM +0100, James Greenhalgh wrote: >>>>> On Tue, Apr 21, 2015 at 04:24:44PM +0100, Trevor Saunders wrote: >>>>>> On Tue, Apr 21, 2015 at 04:14:01PM +0200, Richard Biener wrote: >>>>>>> On Tue, Apr 21, 2015 at 3:24 PM, wrote: >>>>>>>> From: Trevor Saunders >>>>>>>> >>>>>>>> gcc/ChangeLog: >>>>>>>> >>>>>>>> 2015-04-21 Trevor Saunders >>>>>>>> >>>>>>>> * conditions.h: Define macros even if HAVE_cc0 is undefined. >>>>>>>> * emit-rtl.c: Define functions even if HAVE_cc0 is undefined. >>>>>>>> * final.c: Likewise. >>>>>>>> * jump.c: Likewise. >>>>>>>> * recog.c: Likewise. >>>>>>>> * recog.h: Declare functions even when HAVE_cc0 is undefined. >>>>>>>> * sched-deps.c (sched_analyze_2): Always compile case for cc0. >>>>> If I've counted right after the git bisect, this patch seems to break >>>>> the ARM buildi (arm-none-linux-gnueabihf): >>>>> >>>>> In file included from insn-output.c:40:0: >>>>> ..../gcc-src/gcc/conditions.h:112:0: error: "CC_STATUS_INIT" redefined [-Werror] >>>>> #define CC_STATUS_INIT \ >> This is a warning-to-error from -Werror, so this came out during bootstrap >> rather than a cross-build, right? >> >> >>>>> ^ >>>>> In file included from tm.h:35:0, >>>>> from insn-output.c:7: >>>>> ..../gcc-src/gcc/config/arm/arm.h:2159:0: note: this is the location of the previous definition >>>>> #define CC_STATUS_INIT \ >>>>> ^ >>>>> >>>>> I guess the conditions.h definition wants wrapping in #ifndef - though a >>>>> quick grep suggests that ARM is the only target defining CC_STATUS_INIT >>>>> so lets CC the ARM maintainers and see what their preference is... >>>> Well, that seems pretty weird, but it looks intentional arm does this >>>> see http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00437.html >>>> >>>> Of course I now see final.c also defines a fall back, so maybe the right >>>> thing to do is wrap the conditions.h definition in #if HAVE_cc0, or >>>> maybe the final.c definition can go away? Right now I'm to tired to make >>>> a good decision about that. >>>> >>>> sorry about the bustage! >>> Looks like the best thing is to turn this into a target hook then? Or move the >>> fallback/default to defaults.h >> Shall we revert this patch for now then to restore bootstrap? >> > Isn't the most constructive temporary fix to just wrap the definition in > conditions.h with #ifndef CC_STATUS_INIT? Like this? Ok for trunk as a temporary fix? Thanks, Kyrill 2015-04-23 Kyrylo Tkachov * conditions.h (CC_STATUS_INIT): Gate on #ifndef CC_STATUS_INIT. > R. > >> Kyrill >> >>> Richard. >>> >>>> Trev >>>> >>>> >>>>> Thanks, >>>>> James diff --git a/gcc/conditions.h b/gcc/conditions.h index 7cd1e1c..0bda9a4 100644 --- a/gcc/conditions.h +++ b/gcc/conditions.h @@ -109,8 +109,10 @@ extern CC_STATUS cc_status; /* This is how to initialize the variable cc_status. final does this at appropriate moments. */ +/* FIXME: We want to get rid of these ifndefs. */ +#ifndef CC_STATUS_INIT #define CC_STATUS_INIT \ (cc_status.flags = 0, cc_status.value1 = 0, cc_status.value2 = 0, \ CC_STATUS_MDEP_INIT) - +#endif #endif /* GCC_CONDITIONS_H */