]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
kbuild: Consolidate C dialect options
authorNathan Chancellor <nathan@kernel.org>
Mon, 23 Feb 2026 19:10:28 +0000 (12:10 -0700)
committerNicolas Schier <nsc@kernel.org>
Thu, 12 Mar 2026 11:52:37 +0000 (12:52 +0100)
commitec4c28276c140a9338700041112f64f8d7ccc3e9
treec88b94968b5026ce0877505f2c06b205c16f83e3
parentfebb5c81fa8df999e24877f6226f8cba9f06ce6a
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>
Makefile
arch/arm64/kernel/vdso32/Makefile
arch/loongarch/vdso/Makefile
arch/parisc/boot/compressed/Makefile
arch/powerpc/boot/Makefile
arch/s390/Makefile
arch/s390/purgatory/Makefile
arch/x86/Makefile
arch/x86/boot/compressed/Makefile
drivers/firmware/efi/libstub/Makefile
scripts/Makefile.warn