linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>,
	"Kees Cook" <keescook@chromium.org>,
	"Josh Poimboeuf" <jpoimboe@redhat.com>,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	linux-hardening@vger.kernel.org,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"Joe Perches" <joe@perches.com>
Subject: Re: [PATCH RESEND] gcc-plugins: avoid errors with -std=gnu++11 on old gcc
Date: Thu, 18 Mar 2021 18:07:28 +0900	[thread overview]
Message-ID: <CAK7LNAT_hp0PmhWpb2=fScw6Q9DQsBztykis=xN0QCH==AVY6g@mail.gmail.com> (raw)
In-Reply-To: <CANiq72nyNSgrM6bhmM7ymdtYYKoDLfUXfwgTwLOmhLFc=c0U-w@mail.gmail.com>

On Thu, Mar 18, 2021 at 3:26 PM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Thu, Mar 18, 2021 at 7:03 AM Valdis Klētnieks
> <valdis.kletnieks@vt.edu> wrote:
> >
> > Or declare that gcc6 is the minimum for building the kernel.
>
> Cc'ing some interested people in raising GCC's version for one reason
> or another, so that we put this as another one in the pile of reasons
> :-)
>
> https://lore.kernel.org/lkml/CAHk-=wjgvt1Ei72BTrEH5fgfqykVH-AYt56-7yBT8Lcprj7bEg@mail.gmail.com/
>
> Cheers,
> Miguel


Previously we were discussing raising the min GCC
version 5.x,  but not further at this point of time.


We can require GCC 6+ for building GCC plugins.


--- a/scripts/gcc-plugins/Kconfig
+++ b/scripts/gcc-plugins/Kconfig
@@ -8,7 +8,7 @@ config HAVE_GCC_PLUGINS
 menuconfig GCC_PLUGINS
        bool "GCC plugins"
        depends on HAVE_GCC_PLUGINS
-       depends on CC_IS_GCC
+       depends on CC_IS_GCC && GCC_VERSION >= 60000
        depends on $(success,test -e $(shell,$(CC)
-print-file-name=plugin)/include/plugin-version.h)
        default y
        help





BTW, the commit message mentions that
the issues only happen on GCC 4 and 5,
but the added code was:

GCC_FLAVOR = $(call cc-ifversion, -ge, 1100, 11, 98)

  instead of

GCC_FLAVOR = $(call cc-ifversion, -ge, 600, 11, 98)



So, this patch is also requiring to cover two standards:

GCC_VERSION >= 11  :  -std=gnu++11
GCC_VERSION <  11  : -std=gnu++98




-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2021-03-18  9:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08  8:40 [PATCH RESEND] gcc-plugins: avoid errors with -std=gnu++11 on old gcc Valdis Klētnieks
2021-03-18  5:52 ` Kees Cook
2021-03-18  6:02   ` Valdis Klētnieks
2021-03-18  6:26     ` Miguel Ojeda
2021-03-18  9:07       ` Masahiro Yamada [this message]
2021-03-18 11:47         ` Valdis Klētnieks
2021-03-18 11:41     ` David Laight
2021-03-18 11:55       ` Valdis Klētnieks
2021-03-18 13:38         ` David Laight

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNAT_hp0PmhWpb2=fScw6Q9DQsBztykis=xN0QCH==AVY6g@mail.gmail.com' \
    --to=masahiroy@kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=joe@perches.com \
    --cc=jpoimboe@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=valdis.kletnieks@vt.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).