From: Nathan Chancellor Date: Mon, 16 Aug 2021 20:20:55 +0000 (-0700) Subject: kbuild: Add a comment above -Wno-gnu X-Git-Tag: v5.15-rc1~98^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c6ae0efca8d7aeac02f8734825067cd9475a264;p=thirdparty%2Fkernel%2Flinux.git kbuild: Add a comment above -Wno-gnu Whenever a warning is disabled, it is helpful for future travelers to understand why the warning is disabled and why it is acceptable to do so. Add a comment for -Wno-gnu so that people understand why it is disabled. Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada --- diff --git a/Makefile b/Makefile index add32a7498607..8dc6707542a81 100644 --- a/Makefile +++ b/Makefile @@ -782,6 +782,7 @@ KBUILD_CFLAGS += $(stackp-flags-y) ifdef CONFIG_CC_IS_CLANG KBUILD_CPPFLAGS += -Qunused-arguments +# The kernel builds with '-std=gnu89' so use of GNU extensions is acceptable. KBUILD_CFLAGS += -Wno-gnu # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the # source of a reference will be _MergedGlobals and not on of the whitelisted names.