From: Nathan Chancellor <natechancellor@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Arnd Bergmann <arnd@arndb.de>,
Nick Desaulniers <ndesaulniers@google.com>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
clang-built-linux@googlegroups.com
Subject: Re: [PATCH 2/2] Makefile.extrawarn: limit -Wnested-externs to clang
Date: Mon, 26 Oct 2020 18:48:46 -0700 [thread overview]
Message-ID: <20201027014846.GA368335@ubuntu-m3-large-x86> (raw)
In-Reply-To: <20201026220331.3896226-2-arnd@kernel.org>
On Mon, Oct 26, 2020 at 11:03:14PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The -Wnested-externs warning has become useless with gcc, since
> this warns every time that BUILD_BUG_ON() or similar macros
> are used.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Also see:
2486baae2cf6 ("objtool: Allow nested externs to enable BUILD_BUG()")
6cf4ecf5c51d ("perf build: Allow nested externs to enable BUILD_BUG() usage")
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> scripts/Makefile.extrawarn | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
> index 6baee1200615..9406f752e355 100644
> --- a/scripts/Makefile.extrawarn
> +++ b/scripts/Makefile.extrawarn
> @@ -61,7 +61,10 @@ endif
> ifneq ($(findstring 2, $(KBUILD_EXTRA_WARN)),)
>
> KBUILD_CFLAGS += -Wdisabled-optimization
> +ifdef CONFIG_CC_IS_CLANG
> KBUILD_CFLAGS += -Wnested-externs
> +endif
> +
> KBUILD_CFLAGS += -Wshadow
> KBUILD_CFLAGS += $(call cc-option, -Wlogical-op)
> KBUILD_CFLAGS += -Wmissing-field-initializers
> --
> 2.27.0
>
next prev parent reply other threads:[~2020-10-27 1:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 22:03 [PATCH 1/2] Makefile.extrawarn: move -Wcast-align to W=3 Arnd Bergmann
2020-10-26 22:03 ` [PATCH 2/2] Makefile.extrawarn: limit -Wnested-externs to clang Arnd Bergmann
2020-10-27 1:48 ` Nathan Chancellor [this message]
2020-10-27 4:32 ` Nathan Chancellor
2020-11-23 12:00 ` Masahiro Yamada
2020-10-27 1:42 ` [PATCH 1/2] Makefile.extrawarn: move -Wcast-align to W=3 Nathan Chancellor
2020-11-23 11:17 ` Masahiro Yamada
2020-11-24 15:42 ` Arnd Bergmann
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=20201027014846.GA368335@ubuntu-m3-large-x86 \
--to=natechancellor@gmail.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=ndesaulniers@google.com \
/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
all inboxes | Powered by JetHome®