* [PATCH] kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS
@ 2025-11-01 16:35 Nathan Chancellor
2025-11-01 16:55 ` Ard Biesheuvel
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Nathan Chancellor @ 2025-11-01 16:35 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Huacai Chen, WANG Xuerui,
James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, Ard Biesheuvel,
Nick Desaulniers, Bill Wendling, Justin Stitt
Cc: linux-arm-kernel, linux-kernel, loongarch, linux-parisc,
linuxppc-dev, linux-s390, linux-efi, llvm, Christian Brauner,
Nathan Chancellor
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/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
I am taking the original '-fms-extensions' change [1] via a shared
branch in kbuild [2] so I would appreciate acks. I plan to finalize that
branch so that other maintainers can safely pull it on Thursday.
[1]: https://git.kernel.org/kbuild/c/c4781dc3d1cf0e017e1f290607ddc56cfe187afc
[2]: https://git.kernel.org/kbuild/l/kbuild-ms-extensions
---
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 | 4 +++-
arch/x86/boot/compressed/Makefile | 7 +++++--
drivers/firmware/efi/libstub/Makefile | 4 ++--
9 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/arch/arm64/kernel/vdso32/Makefile b/arch/arm64/kernel/vdso32/Makefile
index ffa3536581f6..9d0efed91414 100644
--- a/arch/arm64/kernel/vdso32/Makefile
+++ b/arch/arm64/kernel/vdso32/Makefile
@@ -63,7 +63,7 @@ VDSO_CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
$(filter -Werror,$(KBUILD_CPPFLAGS)) \
-Werror-implicit-function-declaration \
-Wno-format-security \
- -std=gnu11
+ -std=gnu11 -fms-extensions
VDSO_CFLAGS += -O2
# Some useful compiler-dependent flags from top-level Makefile
VDSO_CFLAGS += $(call cc32-option,-Wno-pointer-sign)
@@ -71,6 +71,7 @@ VDSO_CFLAGS += -fno-strict-overflow
VDSO_CFLAGS += $(call cc32-option,-Werror=strict-prototypes)
VDSO_CFLAGS += -Werror=date-time
VDSO_CFLAGS += $(call cc32-option,-Werror=incompatible-pointer-types)
+VDSO_CFLAGS += $(if $(CONFIG_CC_IS_CLANG),-Wno-microsoft-anon-tag)
# Compile as THUMB2 or ARM. Unwinding via frame-pointers in THUMB2 is
# unreliable.
diff --git a/arch/loongarch/vdso/Makefile b/arch/loongarch/vdso/Makefile
index d8316f993482..c0cc3ca5da9f 100644
--- a/arch/loongarch/vdso/Makefile
+++ b/arch/loongarch/vdso/Makefile
@@ -19,7 +19,7 @@ ccflags-vdso := \
cflags-vdso := $(ccflags-vdso) \
-isystem $(shell $(CC) -print-file-name=include) \
$(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \
- -std=gnu11 -O2 -g -fno-strict-aliasing -fno-common -fno-builtin \
+ -std=gnu11 -fms-extensions -O2 -g -fno-strict-aliasing -fno-common -fno-builtin \
-fno-stack-protector -fno-jump-tables -DDISABLE_BRANCH_PROFILING \
$(call cc-option, -fno-asynchronous-unwind-tables) \
$(call cc-option, -fno-stack-protector)
diff --git a/arch/parisc/boot/compressed/Makefile b/arch/parisc/boot/compressed/Makefile
index 17c42d718eb3..f8481e4e9d21 100644
--- a/arch/parisc/boot/compressed/Makefile
+++ b/arch/parisc/boot/compressed/Makefile
@@ -18,7 +18,7 @@ KBUILD_CFLAGS += -fno-PIE -mno-space-regs -mdisable-fpregs -Os
ifndef CONFIG_64BIT
KBUILD_CFLAGS += -mfast-indirect-calls
endif
-KBUILD_CFLAGS += -std=gnu11
+KBUILD_CFLAGS += -std=gnu11 -fms-extensions
LDFLAGS_vmlinux := -X -e startup --as-needed -T
$(obj)/vmlinux: $(obj)/vmlinux.lds $(addprefix $(obj)/, $(OBJECTS)) $(LIBGCC) FORCE
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index c47b78c1d3e7..f1a4761ebd44 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -70,7 +70,7 @@ BOOTCPPFLAGS := -nostdinc $(LINUXINCLUDE)
BOOTCPPFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include)
BOOTCFLAGS := $(BOOTTARGETFLAGS) \
- -std=gnu11 \
+ -std=gnu11 -fms-extensions \
-Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -O2 \
-msoft-float -mno-altivec -mno-vsx \
@@ -86,6 +86,7 @@ BOOTARFLAGS := -crD
ifdef CONFIG_CC_IS_CLANG
BOOTCFLAGS += $(CLANG_FLAGS)
+BOOTCFLAGS += -Wno-microsoft-anon-tag
BOOTAFLAGS += $(CLANG_FLAGS)
endif
diff --git a/arch/s390/Makefile b/arch/s390/Makefile
index b4769241332b..8578361133a4 100644
--- a/arch/s390/Makefile
+++ b/arch/s390/Makefile
@@ -22,7 +22,7 @@ KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__
ifndef CONFIG_AS_IS_LLVM
KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf))
endif
-KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -mpacked-stack -std=gnu11
+KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -mpacked-stack -std=gnu11 -fms-extensions
KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY
KBUILD_CFLAGS_DECOMPRESSOR += -D__DECOMPRESSOR
KBUILD_CFLAGS_DECOMPRESSOR += -Wno-pointer-sign
@@ -35,6 +35,7 @@ KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, address-of-packed-membe
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g)
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,))
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_CC_NO_ARRAY_BOUNDS),-Wno-array-bounds)
+KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_CC_IS_CLANG),-Wno-microsoft-anon-tag)
UTS_MACHINE := s390x
STACK_SIZE := $(if $(CONFIG_KASAN),65536,$(if $(CONFIG_KMSAN),65536,16384))
diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
index bd39b36e7bd6..0c196a5b194a 100644
--- a/arch/s390/purgatory/Makefile
+++ b/arch/s390/purgatory/Makefile
@@ -13,7 +13,7 @@ CFLAGS_sha256.o := -D__NO_FORTIFY
$(obj)/mem.o: $(srctree)/arch/s390/lib/mem.S FORCE
$(call if_changed_rule,as_o_S)
-KBUILD_CFLAGS := -std=gnu11 -fno-strict-aliasing -Wall -Wstrict-prototypes
+KBUILD_CFLAGS := -std=gnu11 -fms-extensions -fno-strict-aliasing -Wall -Wstrict-prototypes
KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding
KBUILD_CFLAGS += -Os -m64 -msoft-float -fno-common
@@ -21,6 +21,7 @@ KBUILD_CFLAGS += -fno-stack-protector
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
KBUILD_CFLAGS += -D__DISABLE_EXPORTS
KBUILD_CFLAGS += $(CLANG_FLAGS)
+KBUILD_CFLAGS += $(if $(CONFIG_CC_IS_CLANG),-Wno-microsoft-anon-tag)
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))
KBUILD_AFLAGS += -D__DISABLE_EXPORTS
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 4db7e4bf69f5..e20e25b8b16c 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -48,7 +48,8 @@ endif
# How to compile the 16-bit code. Note we always compile for -march=i386;
# that way we can complain to the user if the CPU is insufficient.
-REALMODE_CFLAGS := -std=gnu11 -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
+REALMODE_CFLAGS := -std=gnu11 -fms-extensions -m16 -g -Os \
+ -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
-mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
@@ -60,6 +61,7 @@ REALMODE_CFLAGS += $(cc_stack_align4)
REALMODE_CFLAGS += $(CLANG_FLAGS)
ifdef CONFIG_CC_IS_CLANG
REALMODE_CFLAGS += -Wno-gnu
+REALMODE_CFLAGS += -Wno-microsoft-anon-tag
endif
export REALMODE_CFLAGS
diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 74657589264d..68f9d7a1683b 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -25,7 +25,7 @@ targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
# avoid errors with '-march=i386', and future flags may depend on the target to
# be valid.
KBUILD_CFLAGS := -m$(BITS) -O2 $(CLANG_FLAGS)
-KBUILD_CFLAGS += -std=gnu11
+KBUILD_CFLAGS += -std=gnu11 -fms-extensions
KBUILD_CFLAGS += -fno-strict-aliasing -fPIE
KBUILD_CFLAGS += -Wundef
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
@@ -36,7 +36,10 @@ KBUILD_CFLAGS += -mno-mmx -mno-sse
KBUILD_CFLAGS += -ffreestanding -fshort-wchar
KBUILD_CFLAGS += -fno-stack-protector
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
-KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
+ifdef CONFIG_CC_IS_CLANG
+KBUILD_CFLAGS += -Wno-gnu
+KBUILD_CFLAGS += -Wno-microsoft-anon-tag
+endif
KBUILD_CFLAGS += -Wno-pointer-sign
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
KBUILD_CFLAGS += -D__DISABLE_EXPORTS
diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
index 94b05e4451dd..7d15a85d579f 100644
--- a/drivers/firmware/efi/libstub/Makefile
+++ b/drivers/firmware/efi/libstub/Makefile
@@ -11,12 +11,12 @@ cflags-y := $(KBUILD_CFLAGS)
cflags-$(CONFIG_X86_32) := -march=i386
cflags-$(CONFIG_X86_64) := -mcmodel=small
-cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ -std=gnu11 \
+cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ -std=gnu11 -fms-extensions \
-fPIC -fno-strict-aliasing -mno-red-zone \
-mno-mmx -mno-sse -fshort-wchar \
-Wno-pointer-sign \
$(call cc-disable-warning, address-of-packed-member) \
- $(call cc-disable-warning, gnu) \
+ $(if $(CONFIG_CC_IS_CLANG),-Wno-gnu -Wno-microsoft-anon-tag) \
-fno-asynchronous-unwind-tables \
$(CLANG_FLAGS)
---
base-commit: c4781dc3d1cf0e017e1f290607ddc56cfe187afc
change-id: 20251101-kbuild-ms-extensions-dedicated-cflags-084b1d832fbf
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS
2025-11-01 16:35 [PATCH] kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS Nathan Chancellor
@ 2025-11-01 16:55 ` Ard Biesheuvel
2025-11-05 12:56 ` Christian Brauner
2025-11-05 13:44 ` Segher Boessenkool
2 siblings, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2025-11-01 16:55 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Catalin Marinas, Will Deacon, Huacai Chen, WANG Xuerui,
James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, Nick Desaulniers,
Bill Wendling, Justin Stitt, linux-arm-kernel, linux-kernel,
loongarch, linux-parisc, linuxppc-dev, linux-s390, linux-efi,
llvm, Christian Brauner
On Sat, 1 Nov 2025 at 17:36, Nathan Chancellor <nathan@kernel.org> wrote:
>
> 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/
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> I am taking the original '-fms-extensions' change [1] via a shared
> branch in kbuild [2] so I would appreciate acks. I plan to finalize that
> branch so that other maintainers can safely pull it on Thursday.
>
> [1]: https://git.kernel.org/kbuild/c/c4781dc3d1cf0e017e1f290607ddc56cfe187afc
> [2]: https://git.kernel.org/kbuild/l/kbuild-ms-extensions
> ---
> 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 | 4 +++-
> arch/x86/boot/compressed/Makefile | 7 +++++--
> drivers/firmware/efi/libstub/Makefile | 4 ++--
> 9 files changed, 20 insertions(+), 11 deletions(-)
>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS
2025-11-01 16:35 [PATCH] kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS Nathan Chancellor
2025-11-01 16:55 ` Ard Biesheuvel
@ 2025-11-05 12:56 ` Christian Brauner
2025-11-05 19:39 ` Nathan Chancellor
2025-11-05 13:44 ` Segher Boessenkool
2 siblings, 1 reply; 7+ messages in thread
From: Christian Brauner @ 2025-11-05 12:56 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Catalin Marinas, Will Deacon, Huacai Chen, WANG Xuerui,
James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, Ard Biesheuvel,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-arm-kernel,
linux-kernel, loongarch, linux-parisc, linuxppc-dev, linux-s390,
linux-efi, llvm
On Sat, Nov 01, 2025 at 12:35:47PM -0400, Nathan Chancellor wrote:
> 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/
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
> I am taking the original '-fms-extensions' change [1] via a shared
> branch in kbuild [2] so I would appreciate acks. I plan to finalize that
> branch so that other maintainers can safely pull it on Thursday.
>
> [1]: https://git.kernel.org/kbuild/c/c4781dc3d1cf0e017e1f290607ddc56cfe187afc
> [2]: https://git.kernel.org/kbuild/l/kbuild-ms-extensions
> ---
I'll give my ack:
Reviewed-by: Christian Brauner <brauner@kernel.org>
but don't invalidate the branch just to add my RvB if you've already had
it stable.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS
2025-11-05 12:56 ` Christian Brauner
@ 2025-11-05 19:39 ` Nathan Chancellor
2025-11-06 17:47 ` Nathan Chancellor
0 siblings, 1 reply; 7+ messages in thread
From: Nathan Chancellor @ 2025-11-05 19:39 UTC (permalink / raw)
To: Christian Brauner
Cc: Catalin Marinas, Will Deacon, Huacai Chen, WANG Xuerui,
James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, Ard Biesheuvel,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-arm-kernel,
linux-kernel, loongarch, linux-parisc, linuxppc-dev, linux-s390,
linux-efi, llvm
On Wed, Nov 05, 2025 at 01:56:02PM +0100, Christian Brauner wrote:
> On Sat, Nov 01, 2025 at 12:35:47PM -0400, Nathan Chancellor wrote:
> > 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/
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> > ---
> > I am taking the original '-fms-extensions' change [1] via a shared
> > branch in kbuild [2] so I would appreciate acks. I plan to finalize that
> > branch so that other maintainers can safely pull it on Thursday.
> >
> > [1]: https://git.kernel.org/kbuild/c/c4781dc3d1cf0e017e1f290607ddc56cfe187afc
> > [2]: https://git.kernel.org/kbuild/l/kbuild-ms-extensions
> > ---
>
> I'll give my ack:
>
> Reviewed-by: Christian Brauner <brauner@kernel.org>
>
> but don't invalidate the branch just to add my RvB if you've already had
> it stable.
I was planning to make it stable tomorrow to give folks time to chime in
at the beginning of the week. I have your tag and Ard's to add. After
that, we will just have to rely on the link to this submission for
follow ups.
Cheers,
Nathan
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS
2025-11-05 19:39 ` Nathan Chancellor
@ 2025-11-06 17:47 ` Nathan Chancellor
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Chancellor @ 2025-11-06 17:47 UTC (permalink / raw)
To: Christian Brauner
Cc: Catalin Marinas, Will Deacon, Huacai Chen, WANG Xuerui,
James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, Ard Biesheuvel,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-arm-kernel,
linux-kernel, loongarch, linux-parisc, linuxppc-dev, linux-s390,
linux-efi, llvm
On Wed, Nov 05, 2025 at 12:39:31PM -0700, Nathan Chancellor wrote:
> I was planning to make it stable tomorrow to give folks time to chime in
> at the beginning of the week. I have your tag and Ard's to add. After
> that, we will just have to rely on the link to this submission for
> follow ups.
Alright, this should be the final result. If there are any other Acks
that come in later, they will just have to be recorded here. If there
are any follow up fixes needed, I will apply them on top and update the
tag but the branch will not be rebased.
Cheers,
Nathan
The following changes since commit 3a8660878839faadb4f1a6dd72c3179c1df56787:
Linux 6.18-rc1 (2025-10-12 13:42:36 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git tags/kbuild-ms-extensions-6.19
for you to fetch changes up to 5ff8ad3909524ad55297a434f87c238224825bf4:
kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS (2025-10-30 21:26:28 -0400)
----------------------------------------------------------------
Shared branch between Kbuild and other trees for enabling '-fms-extensions' for 6.19
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
----------------------------------------------------------------
Nathan Chancellor (2):
jfs: Rename _inline to avoid conflict with clang's '-fms-extensions'
kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS
Rasmus Villemoes (1):
Kbuild: enable -fms-extensions
Makefile | 3 +++
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 | 4 +++-
arch/x86/boot/compressed/Makefile | 7 +++++--
drivers/firmware/efi/libstub/Makefile | 4 ++--
fs/jfs/jfs_incore.h | 6 +++---
scripts/Makefile.extrawarn | 4 +++-
12 files changed, 29 insertions(+), 15 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS
2025-11-01 16:35 [PATCH] kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS Nathan Chancellor
2025-11-01 16:55 ` Ard Biesheuvel
2025-11-05 12:56 ` Christian Brauner
@ 2025-11-05 13:44 ` Segher Boessenkool
2025-11-05 20:15 ` Nathan Chancellor
2 siblings, 1 reply; 7+ messages in thread
From: Segher Boessenkool @ 2025-11-05 13:44 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Catalin Marinas, Will Deacon, Huacai Chen, WANG Xuerui,
James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, Ard Biesheuvel,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-arm-kernel,
linux-kernel, loongarch, linux-parisc, linuxppc-dev, linux-s390,
linux-efi, llvm, Christian Brauner
Hi!
On Sat, Nov 01, 2025 at 12:35:47PM -0400, Nathan Chancellor wrote:
> 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.
Please fix such non-standard code then, instead? The only (documented)
thing -fms-extensions does for C code is give meaning to something that
otherwise is a syntax error (and it is for a good reason!)
Segher
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS
2025-11-05 13:44 ` Segher Boessenkool
@ 2025-11-05 20:15 ` Nathan Chancellor
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Chancellor @ 2025-11-05 20:15 UTC (permalink / raw)
To: Segher Boessenkool
Cc: Catalin Marinas, Will Deacon, Huacai Chen, WANG Xuerui,
James E.J. Bottomley, Helge Deller, Madhavan Srinivasan,
Michael Ellerman, Nicholas Piggin, Christophe Leroy,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, Thomas Gleixner,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, Ard Biesheuvel,
Nick Desaulniers, Bill Wendling, Justin Stitt, linux-arm-kernel,
linux-kernel, loongarch, linux-parisc, linuxppc-dev, linux-s390,
linux-efi, llvm, Christian Brauner, Linus Torvalds
On Wed, Nov 05, 2025 at 07:44:26AM -0600, Segher Boessenkool wrote:
> On Sat, Nov 01, 2025 at 12:35:47PM -0400, Nathan Chancellor wrote:
> > 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.
>
> Please fix such non-standard code then, instead? The only (documented)
> thing -fms-extensions does for C code is give meaning to something that
> otherwise is a syntax error (and it is for a good reason!)
Right, the kernel would like to start taking advantage of one of those
extensions. See these other threads for more information.
https://lore.kernel.org/20251020142228.1819871-1-linux@rasmusvillemoes.dk/
https://lore.kernel.org/20251023082142.2104456-1-linux@rasmusvillemoes.dk/
Cheers,
Nathan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-11-06 17:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-01 16:35 [PATCH] kbuild: Add '-fms-extensions' to areas with dedicated CFLAGS Nathan Chancellor
2025-11-01 16:55 ` Ard Biesheuvel
2025-11-05 12:56 ` Christian Brauner
2025-11-05 19:39 ` Nathan Chancellor
2025-11-06 17:47 ` Nathan Chancellor
2025-11-05 13:44 ` Segher Boessenkool
2025-11-05 20:15 ` Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).