From: Masami Hiramatsu <mhiramat@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Anders Roxell <anders.roxell@linaro.org>,
Leo Yan <leo.yan@linaro.org>,
linux-kernel@vger.kernel.org,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>
Subject: [PATCH 2/2] tools: Add -Wno-missing-field-initializers to for clang
Date: Wed, 12 May 2021 00:02:43 +0900 [thread overview]
Message-ID: <162074536334.289757.5292387320537578325.stgit@devnote2> (raw)
In-Reply-To: <162074534493.289757.1243545574686276554.stgit@devnote2>
Since clang's -Wmissing-field-initializers warns valid syntax of
initializing data structure (e.g. initializing static data
structure with single NULL, the rest of fields are initialized
with zero), it is better to disable this warning option
for clang for now.
This can stop building perf because -Werror is also specified.
Note that same issue on gcc has been fixed in 4.7.0, so we don't need
this for gcc.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
tools/scripts/Makefile.include | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include
index f9271f3ea912..4fd5d33ded03 100644
--- a/tools/scripts/Makefile.include
+++ b/tools/scripts/Makefile.include
@@ -89,6 +89,10 @@ ifeq ($(CC_NO_CLANG), 1)
EXTRA_WARNINGS += -Wstrict-aliasing=3
endif
+ifneq ($(CC_NO_CLANG), 1)
+EXTRA_WARNINGS += -Wno-missing-field-initializers
+endif
+
# Hack to avoid type-punned warnings on old systems such as RHEL5:
# We should be changing CFLAGS and checking gcc version, but this
# will do for now and keep the above -Wstrict-aliasing=3 in place
next prev parent reply other threads:[~2021-05-11 15:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 15:02 [PATCH 0/2] tools/perf: tools: Fix perf build issues Masami Hiramatsu
2021-05-11 15:02 ` [PATCH 1/2] perf build: Move EXTRA_CFLAGS and EXTRA_WARNINGS at the end of CFLAGS Masami Hiramatsu
2021-05-11 15:02 ` Masami Hiramatsu [this message]
2021-05-11 18:23 ` [PATCH 2/2] tools: Add -Wno-missing-field-initializers to for clang Nick Desaulniers
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=162074536334.289757.5292387320537578325.stgit@devnote2 \
--to=mhiramat@kernel.org \
--cc=acme@kernel.org \
--cc=anders.roxell@linaro.org \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--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