Message ID | 5538C23E.50003@arm.com |
---|---|
State | New |
Headers | show |
On Thu, Apr 23, 2015 at 11:58 AM, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote: > > 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 <tbsaunde@tbsaunde.org> >>>> 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, <tbsaunde+gcc@tbsaunde.org> wrote: >>>>>>>>> >>>>>>>>> From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org> >>>>>>>>> >>>>>>>>> gcc/ChangeLog: >>>>>>>>> >>>>>>>>> 2015-04-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> >>>>>>>>> >>>>>>>>> * 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? Ok. Richard. > Thanks, > Kyrill > > 2015-04-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com> > > * conditions.h (CC_STATUS_INIT): Gate on #ifndef CC_STATUS_INIT. > >> R. >> >>> Kyrill >>> >>>> Richard. >>>> >>>>> Trev >>>>> >>>>> >>>>>> Thanks, >>>>>> James > >
On Thu, Apr 23, 2015 at 10:58:22AM +0100, Kyrill Tkachov wrote: > > 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 <tbsaunde@tbsaunde.org> 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, <tbsaunde+gcc@tbsaunde.org> wrote: > >>>>>>>>From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org> > >>>>>>>> > >>>>>>>>gcc/ChangeLog: > >>>>>>>> > >>>>>>>>2015-04-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> > >>>>>>>> > >>>>>>>> * 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 Given the macro has multiple definitions I guess ultimately it should move to a target hook unless someone decides to rework the arm backend. Till then the ifdef in conditions.h doesn't seem to bad (I may well work on converting a bunch of stuff to target hooks in the somewhat near future). > >>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? sgtm, thanks! Trev > > Thanks, > Kyrill > > 2015-04-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com> > > * 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 */
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 */