Re: [PATCH 1/2] kbuild: Consolidate C dialect options

Nicolas Schier
2026-02-27T16:36:50Z

On Mon, Feb 23, 2026 at 12:10:28PM -0700, Nathan Chancellor wrote:
> 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>
> ---
> Makefile | 16 ++++++++++++----
> arch/arm64/kernel/vdso32/Makefile | 3 +--
> arch/loongarch/vdso/Makefile | 2 +-
> arch/parisc/boot/compressed/Makefile | 2 +-
> arch/powerpc/boot/Makefile | 3 +--
> arch/s390/Makefile | 3 +--
> arch/s390/purgatory/Makefile | 3 +--
> arch/x86/Makefile | 6 +-----
> arch/x86/boot/compressed/Makefile | 6 +-----
> drivers/firmware/efi/libstub/Makefile | 3 +--
> scripts/Makefile.warn | 5 -----
> 11 files changed, 21 insertions(+), 31 deletions(-)
>

Reviewed-by: Nicolas Schier <nsc@kernel.org>