linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Michal Marek <michal.lkml@markovi.net>,
	Nathan Chancellor <nathan@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Miguel Ojeda <ojeda@kernel.org>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Vitor Massaru Iha <vitor@massaru.org>,
	Sedat Dilek <sedat.dilek@gmail.com>,
	Daniel Latypov <dlatypov@google.com>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	Naresh Kamboju <naresh.kamboju@linaro.org>
Subject: Re: [PATCH] Makefile: remove stale cc-option checks
Date: Tue, 17 Aug 2021 10:38:55 +0900	[thread overview]
Message-ID: <CAK7LNAQDcOvjP-gj79rhOJzd456qBP7Fyo3yv94Mp5cHJhOFMw@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNAQP93qMRP8uSZKzLR0G7tM9-vNyzAEsUceRtj2nA0kd7A@mail.gmail.com>

On Tue, Aug 17, 2021 at 9:16 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Tue, Aug 17, 2021 at 3:36 AM Nick Desaulniers
> <ndesaulniers@google.com> wrote:
> >
> > On Fri, Aug 13, 2021 at 6:43 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > >
> > > On Wed, Aug 11, 2021 at 5:42 AM Nick Desaulniers
> > > <ndesaulniers@google.com> wrote:
> > > >
> > > > --param=allow-store-data-races=0 was renamed to --allow-store-data-races
> > > > in the GCC 10 release.
> > > >
> > > > diff --git a/Makefile b/Makefile
> > > > index 027fdf2a14fe..3e3fb4affba1 100644
> > > > --- a/Makefile
> > > > +++ b/Makefile
> > > > @@ -844,17 +847,17 @@ KBUILD_RUSTFLAGS += -Copt-level=z
> > > >  endif
> > > >
> > > >  # Tell gcc to never replace conditional load with a non-conditional one
> > > > -KBUILD_CFLAGS  += $(call cc-option,--param=allow-store-data-races=0)
> > > > +ifdef CONFIG_CC_IS_GCC
> > >
> > >
> > > Can you insert a comment here?
> > >
> > > # GCC 10 renamed --param=allow-store-data-races=0 to --allow-store-data-races
> > >
> > >
> > > It will remind us of dropping this conditional
> > > in the (long long distant) future.
> > >
> > >
> > >
> > >
> > > > +KBUILD_CFLAGS  += $(call cc-option,--allow-store-data-races,--param=allow-store-data-races=0)
> > > >  KBUILD_CFLAGS  += $(call cc-option,-fno-allow-store-data-races)
> > > > +endif
> >
> > This report is confusing:
> > https://lore.kernel.org/linux-mm/202108160729.Lx0IJzq3-lkp@intel.com/
> > (csky gcc-11)
> >
> > >> csky-linux-gcc: error: unrecognized command-line option '--param=allow-store-data-races=0'; did you mean '--allow-store-data-races'?
> >
> > I wonder if cc-option detection for these is broken?
>
> I do not say it is broken...
>
>
> cc-option is defined like this:
>
> cc-option = $(call __cc-option, $(CC),\
>         $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS),$(1),$(2))
>
>
> It is checking
> $(KBUILD_CPPFLAGS) + $(KBUILD_CFLAGS)
> + --allow-store-data-races
>
>
> A few lines above, I see
>
> csky-linux-gcc: error: unrecognized argument in option '-mcpu=ck860'
>
>
> It makes all the cc-option tests fail after this line:
> KBUILD_CFLAGS += -mcpu=$(CPUTYPE) -Wa,-mcpu=$(MCPU_STR)
>
>
> Then,
>
> $(call cc-option,--allow-store-data-races,--param=allow-store-data-races=0)
>
> falls back to --param=allow-store-data-races=0
>
>
>
>
> >  Perhaps I should
> > not touch these other than to wrap them in the CONFIG_CC_IS_GCC guard?
>
> I do not think so.
>
> If an unrecognized argument appears,
> all the cc-option tests that follow are unreliable.
>
>
>
> If you are not comfortable with  it,
> you can split it.
>
> KBUILD_CFLAGS  += $(call cc-option,--allow-store-data-races)
> KBUILD_CFLAGS  += $(call cc-option,--param=allow-store-data-races=0)


I read the patch in the wrong way.
This is the same as the current code.

So, your v2 is fine with me.
I will pick it up soon.





-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2021-08-17  1:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10 20:42 [PATCH] Makefile: remove stale cc-option checks Nick Desaulniers
2021-08-10 23:01 ` Nathan Chancellor
2021-08-14  1:33   ` Masahiro Yamada
2021-08-11 10:41 ` Miguel Ojeda
2021-08-14  1:42 ` Masahiro Yamada
2021-08-16 18:35   ` Nick Desaulniers
2021-08-17  0:16     ` Masahiro Yamada
2021-08-17  1:38       ` Masahiro Yamada [this message]
2021-08-16 20:06   ` Nick Desaulniers
2021-08-16 20:11     ` Nick Desaulniers
2021-08-14 11:02 ` Naresh Kamboju
2021-08-16 18:37   ` Nick Desaulniers
2021-08-16 23:31     ` Stephen Rothwell

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=CAK7LNAQDcOvjP-gj79rhOJzd456qBP7Fyo3yv94Mp5cHJhOFMw@mail.gmail.com \
    --to=masahiroy@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=dlatypov@google.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=naresh.kamboju@linaro.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=ojeda@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=peterz@infradead.org \
    --cc=sedat.dilek@gmail.com \
    --cc=vitor@massaru.org \
    /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).