From: Sedat Dilek <sedat.dilek@gmail.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-kbuild@vger.kernel.org,
Nick Desaulniers <ndesaulniers@google.com>,
Nathan Chancellor <natechancellor@gmail.com>,
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Michal Marek <michal.lkml@markovi.net>,
Clang-Built-Linux ML <clang-built-linux@googlegroups.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] kbuild: refactor scripts/Makefile.extrawarn
Date: Wed, 28 Aug 2019 17:59:58 +0200 [thread overview]
Message-ID: <CA+icZUXZqKpLcp7xmXEezquaCfKLiPS16gwrbcce105gjYftBg@mail.gmail.com> (raw)
In-Reply-To: <CA+icZUUSVRURu-jQAnVnZwPp0qiWpostDz+WkTjxx8zunVKBgw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 158 bytes --]
Something like that...
[PATCH 1/2] kbuild: Improve extrawarn documentation
[PATCH 2/2] kbuild: Rename extrawarn Kconfig to KBUILD_EXTRA_CC_CHECKS
- Sedat -
[-- Attachment #2: 0001-kbuild-Improve-extrawarn-documentation.patch --]
[-- Type: text/x-patch, Size: 1763 bytes --]
From 1275ec0f1d31c4ac57b73b318bdc45151d99e8dc Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@credativ.de>
Date: Wed, 28 Aug 2019 16:27:13 +0200
Subject: [PATCH 1/2] kbuild: Improve extrawarn documentation
---
Documentation/kbuild/kbuild.rst | 10 ++++++++--
| 2 +-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.rst
index 62f9d86c082c..f0f1c475d7fa 100644
--- a/Documentation/kbuild/kbuild.rst
+++ b/Documentation/kbuild/kbuild.rst
@@ -243,8 +243,14 @@ To get all available archs you can also specify all. E.g.::
KBUILD_ENABLE_EXTRA_GCC_CHECKS
------------------------------
-If enabled over the make command line with "W=1", it turns on additional
-gcc -W... options for more extensive build-time checking.
+If enabled over the make command line with "W=...", it turns on additional
+compiler warning options like -Wmissing-declarations for more extensive
+build-time checking. For more details see <scripts/Makefile.extrawarn>.
+
+W=1 - warnings that may be relevant and does not occur too often
+W=1 - also stops suppressing some warnings
+W=2 - warnings that occur quite often but may still be relevant
+W=3 - the more obscure warnings, can most likely be ignored
KBUILD_BUILD_TIMESTAMP
----------------------
--git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 3af1770497fd..6770f8da4e6d 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -32,7 +32,7 @@ KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN1
else
-# W=1 also stops suppressing some warnings
+# W=1 - also stops suppressing some warnings
ifdef CONFIG_CC_IS_CLANG
KBUILD_CFLAGS += -Wno-initializer-overrides
--
2.20.1
[-- Attachment #3: 0002-kbuild-Rename-extrawarn-Kconfig-to-KBUILD_EXTRA_CC_C.patch --]
[-- Type: text/x-patch, Size: 4106 bytes --]
From b364881f8b2a7aa258dcdbaba8d6bc57b41def0d Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@credativ.de>
Date: Wed, 28 Aug 2019 16:30:03 +0200
Subject: [PATCH 2/2] kbuild: Rename extrawarn Kconfig to
KBUILD_EXTRA_CC_CHECKS
---
Documentation/kbuild/kbuild.rst | 2 +-
scripts/Makefile.build | 2 +-
| 8 ++++----
scripts/Makefile.lib | 4 ++--
scripts/genksyms/Makefile | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.rst
index f0f1c475d7fa..dcc83d993459 100644
--- a/Documentation/kbuild/kbuild.rst
+++ b/Documentation/kbuild/kbuild.rst
@@ -241,7 +241,7 @@ To get all available archs you can also specify all. E.g.::
$ make ALLSOURCE_ARCHS=all tags
-KBUILD_ENABLE_EXTRA_GCC_CHECKS
+KBUILD_EXTRA_CC_CHECKS
------------------------------
If enabled over the make command line with "W=...", it turns on additional
compiler warning options like -Wmissing-declarations for more extensive
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 2a21ca86b720..1de9b9ddddaa 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -85,7 +85,7 @@ else ifeq ($(KBUILD_CHECKSRC),2)
cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $<
endif
-ifneq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),)
+ifneq ($(KBUILD_EXTRA_CC_CHECKS),)
cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $<
endif
--git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 6770f8da4e6d..0ee4a5a88d2c 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -6,13 +6,13 @@
KBUILD_CFLAGS += $(call cc-disable-warning, packed-not-aligned)
ifeq ("$(origin W)", "command line")
- export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W)
+ export KBUILD_EXTRA_CC_CHECKS := $(W)
endif
#
# W=1 - warnings that may be relevant and does not occur too often
#
-ifneq ($(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
+ifneq ($(findstring 1, $(KBUILD_EXTRA_CC_CHECKS)),)
KBUILD_CFLAGS += -Wextra -Wunused -Wno-unused-parameter
KBUILD_CFLAGS += -Wmissing-declarations
@@ -46,7 +46,7 @@ endif
#
# W=2 - warnings that occur quite often but may still be relevant
#
-ifneq ($(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
+ifneq ($(findstring 2, $(KBUILD_EXTRA_CC_CHECKS)),)
KBUILD_CFLAGS += -Wcast-align
KBUILD_CFLAGS += -Wdisabled-optimization
@@ -65,7 +65,7 @@ endif
#
# W=3 - the more obscure warnings, can most likely be ignored
#
-ifneq ($(findstring 3, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
+ifneq ($(findstring 3, $(KBUILD_EXTRA_CC_CHECKS)),)
KBUILD_CFLAGS += -Wbad-function-cast
KBUILD_CFLAGS += -Wcast-qual
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 888e5c830646..1f9e38550ce4 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -248,7 +248,7 @@ quiet_cmd_gzip = GZIP $@
DTC ?= $(objtree)/scripts/dtc/dtc
# Disable noisy checks by default
-ifeq ($(findstring 1,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
+ifeq ($(findstring 1,$(KBUILD_EXTRA_CC_CHECKS)),)
DTC_FLAGS += -Wno-unit_address_vs_reg \
-Wno-unit_address_format \
-Wno-avoid_unnecessary_addr_size \
@@ -259,7 +259,7 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \
-Wno-pci_device_reg
endif
-ifneq ($(findstring 2,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
+ifneq ($(findstring 2,$(KBUILD_EXTRA_CC_CHECKS)),)
DTC_FLAGS += -Wnode_name_chars_strict \
-Wproperty_name_chars_strict
endif
diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile
index baf44ed0a93a..e08fc3a6f7e2 100644
--- a/scripts/genksyms/Makefile
+++ b/scripts/genksyms/Makefile
@@ -12,7 +12,7 @@ genksyms-objs := genksyms.o parse.tab.o lex.lex.o
#
# Just in case, run "$(YACC) --version" without suppressing stderr
# so that 'bison: not found' will be displayed if it is missing.
-ifeq ($(findstring 1,$(KBUILD_ENABLE_EXTRA_GCC_CHECKS)),)
+ifeq ($(findstring 1,$(KBUILD_EXTRA_CC_CHECKS)),)
quiet_cmd_bison_no_warn = $(quiet_cmd_bison)
cmd_bison_no_warn = $(YACC) --version >/dev/null; \
--
2.20.1
next prev parent reply other threads:[~2019-08-28 16:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 5:54 [PATCH 1/2] kbuild: refactor scripts/Makefile.extrawarn Masahiro Yamada
2019-08-28 5:54 ` [PATCH 2/2] kbuild: allow Clang to find unused static inline functions for W=1 build Masahiro Yamada
2019-08-28 18:20 ` Nathan Chancellor
2019-08-28 23:28 ` Nick Desaulniers
2019-08-29 0:05 ` Nathan Chancellor
2019-09-03 15:38 ` Masahiro Yamada
2019-08-30 7:07 ` Sedat Dilek
2019-08-30 9:52 ` Sedat Dilek
2019-09-03 15:39 ` Masahiro Yamada
2019-08-28 7:20 ` [PATCH 1/2] kbuild: refactor scripts/Makefile.extrawarn Sedat Dilek
2019-08-28 14:18 ` Sedat Dilek
2019-08-28 14:21 ` Sedat Dilek
2019-08-28 15:59 ` Sedat Dilek [this message]
2019-08-29 17:56 ` Masahiro Yamada
2019-08-28 18:26 ` Nick Desaulniers
2019-08-28 18:17 ` Nathan Chancellor
2019-08-28 22:38 ` Nick Desaulniers
2019-08-29 8:49 ` Sedat Dilek
2019-08-29 9:54 ` Sedat Dilek
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=CA+icZUXZqKpLcp7xmXEezquaCfKLiPS16gwrbcce105gjYftBg@mail.gmail.com \
--to=sedat.dilek@gmail.com \
--cc=arnd@arndb.de \
--cc=clang-built-linux@googlegroups.com \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.lkml@markovi.net \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=natechancellor@gmail.com \
--cc=ndesaulniers@google.com \
--cc=yamada.masahiro@socionext.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;
as well as URLs for NNTP newsgroup(s).