From: Nick Desaulniers <ndesaulniers@google.com>
To: Masahiro Yamada <masahiroy@kernel.org>
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>
Subject: Re: [PATCH] Makefile: remove stale cc-option checks
Date: Mon, 16 Aug 2021 13:11:06 -0700 [thread overview]
Message-ID: <CAKwvOdmMekTUz81ZX8qcwNpcEdfC=ab0Tnutun5UPS8GjLnq2Q@mail.gmail.com> (raw)
In-Reply-To: <CAKwvOdnc-GAHOQtjrjFzc6GzCLR35rQ6uVAenLLKBkEqws9Tbw@mail.gmail.com>
On Mon, Aug 16, 2021 at 1:06 PM 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:
> > >
> > > diff --git a/Makefile b/Makefile
> > > index 027fdf2a14fe..3e3fb4affba1 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -798,7 +801,7 @@ include/config/auto.conf:
> > > endif # may-sync-config
> > > endif # need-config
> > >
> > > -KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,)
> > > +KBUILD_CFLAGS += -fno-delete-null-pointer-checks
> > > KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
> > > KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
> > > KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
> > > @@ -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
>
> So it looks like `-fallow-store-data-races` was also supported. Reading through
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97309
> https://gcc.gnu.org/wiki/Atomic/GCCMM/ExecutiveSummary
> it seems that the default is not to allow "store data races." So I
> should not be adding `--allow-store-data-races` or
> `-fallow-store-data-races`; so this just should be the existing test,
> with a comment that it can be removed once gcc-10+ is the minimum.
> Will update that in v2.
Ah, perhaps I should combine the following line:
KBUILD_CFLAGS += $(call
cc-option,-fallow-store-data-races,--param=allow-store-data-races=0)
Though I don't understand the csky failure. cc-option appends to a
running list of flags; if an unsupported flag gets added to CFLAGS, it
can cause cc-option to failure subsequent checks in spooky ways. I
usually debug those by adding print statements to cc-option to see
what the full command it's testing; then invoke the compiler manually
with those to see what went wrong. (bookmarked and referenced often:
https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile)
Though my distro doesn't package csky-linux-gnu-gcc...
--
Thanks,
~Nick Desaulniers
next prev parent reply other threads:[~2021-08-16 20:11 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
2021-08-16 20:06 ` Nick Desaulniers
2021-08-16 20:11 ` Nick Desaulniers [this message]
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='CAKwvOdmMekTUz81ZX8qcwNpcEdfC=ab0Tnutun5UPS8GjLnq2Q@mail.gmail.com' \
--to=ndesaulniers@google.com \
--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=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nathan@kernel.org \
--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).