summaryrefslogtreecommitdiff
path: root/scripts/Makefile.warn
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2026-02-23 22:10:28 +0300
committerNicolas Schier <nsc@kernel.org>2026-03-12 14:52:37 +0300
commitec4c28276c140a9338700041112f64f8d7ccc3e9 (patch)
treec88b94968b5026ce0877505f2c06b205c16f83e3 /scripts/Makefile.warn
parentfebb5c81fa8df999e24877f6226f8cba9f06ce6a (diff)
downloadlinux-ec4c28276c140a9338700041112f64f8d7ccc3e9.tar.xz
kbuild: Consolidate C dialect options
Introduce CC_FLAGS_DIALECT to make it easier to update the various places in the tree that rely on the GNU C standard and Microsoft extensions flags atomically. All remaining uses of '-std=gnu11' and '-fms-extensions' are in the tools directory (which has its own build system) and other standalone Makefiles. This will allow the kernel to use a narrower option to enable the Microsoft anonymous tagged structure extension in a simpler manner. Place the CC_FLAGS_DIALECT block after the configuration include (so that a future change can move the selection of the flag to Kconfig) but before the arch/$(SRCARCH)/Makefile include (so that CC_FLAGS_DIALECT is available for use in those Makefiles). Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nicolas Schier <nsc@kernel.org> Acked-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Helge Deller <deller@gmx.de> # parisc Link: https://patch.msgid.link/20260223-fms-anonymous-structs-v1-1-8ee406d3c36c@kernel.org Signed-off-by: Nicolas Schier <nsc@kernel.org>
Diffstat (limited to 'scripts/Makefile.warn')
-rw-r--r--scripts/Makefile.warn5
1 files changed, 0 insertions, 5 deletions
diff --git a/scripts/Makefile.warn b/scripts/Makefile.warn
index 5567da6c7dfe..e77ca875aea4 100644
--- a/scripts/Makefile.warn
+++ b/scripts/Makefile.warn
@@ -28,11 +28,6 @@ endif
KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds
ifdef CONFIG_CC_IS_CLANG
-# The kernel builds with '-std=gnu11' and '-fms-extensions' so use of GNU and
-# Microsoft extensions is acceptable.
-KBUILD_CFLAGS += -Wno-gnu
-KBUILD_CFLAGS += -Wno-microsoft-anon-tag
-
# Clang checks for overflow/truncation with '%p', while GCC does not:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111219
KBUILD_CFLAGS += $(call cc-option, -Wno-format-overflow-non-kprintf)