]> Gentwo Git Trees - linux/.git/commit
kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS
authorNathan Chancellor <nathan@kernel.org>
Fri, 31 Oct 2025 01:26:28 +0000 (21:26 -0400)
committerNathan Chancellor <nathan@kernel.org>
Fri, 31 Oct 2025 01:26:28 +0000 (21:26 -0400)
commit5ff8ad3909524ad55297a434f87c238224825bf4
tree4f0ded600367eb62f22793745a553600b68b50af
parentc4781dc3d1cf0e017e1f290607ddc56cfe187afc
kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS

This is a follow up to commit c4781dc3d1cf ("Kbuild: enable
-fms-extensions") but in a separate change due to being substantially
different from the initial submission.

There are many places within the kernel that use their own CFLAGS
instead of the main KBUILD_CFLAGS, meaning code written with the main
kernel's use of '-fms-extensions' in mind that may be tangentially
included in these areas will result in "error: declaration does not
declare anything" messages from the compiler.

Add '-fms-extensions' to all these areas to ensure consistency, along
with -Wno-microsoft-anon-tag to silence clang's warning about use of the
extension that the kernel cares about using. parisc does not build with
clang so it does not need this warning flag. LoongArch does not need it
either because -W flags from KBUILD_FLAGS are pulled into cflags-vdso.

Reported-by: Christian Brauner <brauner@kernel.org>
Closes: https://lore.kernel.org/20251030-meerjungfrau-getrocknet-7b46eacc215d@brauner/
Reviewed-by: Christian Brauner <brauner@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
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