2021-01-11 19:51:53

by Kees Cook

[permalink] [raw]
Subject: Re: [PATCH] gcc-plugins: fix gcc 11 indigestion with plugins...

On Mon, Jan 11, 2021 at 07:37:19AM -0600, Josh Poimboeuf wrote:
> On Mon, Jan 11, 2021 at 07:31:17AM -0500, Valdis Klētnieks wrote:
> > On Mon, 11 Jan 2021 05:56:59 -0500, I said:
> >
> > > > It's probably related. I'm just having a hard time understanding why 4.9 and 5.4
> > > > whine about the lack of a space, while 8.3 and 11 didn't complain...
> >
> > So after more digging, at least some clarity has surfaced.
> >
> > It looks like it's not a kernel source tree issue, it's a g++ issue fixed in g++ 6 and later.
> >
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69959
> >
> > And it looks like there was an intent to backport it to 4.9 and 5.4:
> > https://gcc.gnu.org/legacy-ml/gcc-patches/2016-02/msg01409.html
> >
> > The bugtracker doesn't show an equivalent for 69959 being closed against 4.9.x or 5.[56],
> >
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63254 has a patch for one of the
> > gcc-supplied files that tosses the warning, but that way lies madness...
> >
> > Not sure what we want to do here - the main alternatives I see are:
> >
> > Tell people still using 4.9/5.4 to either live with the warning or upgrade to 6 or later
> >
> > Make the flag a variable and pass either -std=gnu++98 or -std=gnu++11
> > depending on the output of 'g++ --version'
> >
> > What say the peanut gallery?
>
> I think putting the flag in a variable (based on call cc-ifversion)
> should be easy enough, then we can put this little saga behind us and
> pretend it never happened :-)

Yeah, that seems best. Valdis, can you send a patch for this?

--
Kees Cook


2021-01-11 19:58:39

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: [PATCH] gcc-plugins: fix gcc 11 indigestion with plugins...

On Mon, 11 Jan 2021 11:48:32 -0800, Kees Cook said:
> On Mon, Jan 11, 2021 at 07:37:19AM -0600, Josh Poimboeuf wrote:

> > I think putting the flag in a variable (based on call cc-ifversion)
> > should be easy enough, then we can put this little saga behind us and
> > pretend it never happened :-)
>
> Yeah, that seems best. Valdis, can you send a patch for this?

Yep, I'll send one shortly...


Attachments:
(No filename) (849.00 B)