* [PATCH 5.15.y 0/3] v5.15: fix build with GCC 15
@ 2025-10-17 16:23 Matthieu Baerts (NGI0)
2025-10-17 16:24 ` [PATCH 5.15.y 1/3] x86/boot: Compile boot code with -std=gnu11 too Matthieu Baerts (NGI0)
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Matthieu Baerts (NGI0) @ 2025-10-17 16:23 UTC (permalink / raw)
To: stable, Greg Kroah-Hartman, Sasha Levin
Cc: MPTCP Upstream, Matthieu Baerts (NGI0), Alexey Dobriyan,
Ingo Molnar, H. Peter Anvin (Intel), Nathan Chancellor,
Dave Hansen, Ard Biesheuvel, Arnd Bergmann, Akira Yokosawa,
Federico Vaga, Alex Shi, Hu Haowen, Tsugikazu Shibata,
Jonathan Corbet
This kernel version doesn't build with GCC 15:
In file included from include/uapi/linux/posix_types.h:5,
from include/uapi/linux/types.h:14,
from include/linux/types.h:6,
from arch/x86/realmode/rm/wakeup.h:11,
from arch/x86/realmode/rm/wakemain.c:2:
include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enumeration constant
11 | false = 0,
| ^~~~~
include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=c23' onwards
include/linux/types.h:30:33: error: 'bool' cannot be defined via 'typedef'
30 | typedef _Bool bool;
| ^~~~
include/linux/types.h:30:33: note: 'bool' is a keyword with '-std=c23' onwards
include/linux/types.h:30:1: warning: useless type name in empty declaration
30 | typedef _Bool bool;
| ^~~~~~~
I initially fixed this by adding -std=gnu11 in arch/x86/Makefile, then I
realised this fix was already done in an upstream commit, created before
the GCC 15 release and not mentioning the error I had. This is the first
patch.
When I was investigating my error, I noticed other commits were already
backported to v5.15. They were all adding -std=gnu11 in different
Makefiles. In their commit message, they were mentioning 'gnu11' was
picked to use the same as the one from the main Makefile. But this is
not the case in this kernel version. Patch 2 fixes that.
Finally, I noticed the documentation was not correct in this kernel
version: this is because a commit was backported to v5.15 while it was
not supposed to. Patch 3 fixes that.
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Alexey Dobriyan (1):
x86/boot: Compile boot code with -std=gnu11 too
Matthieu Baerts (NGI0) (2):
arch: back to -std=gnu89 in < v5.18
Revert "docs/process/howto: Replace C89 with C11"
Documentation/process/howto.rst | 2 +-
Documentation/translations/it_IT/process/howto.rst | 2 +-
Documentation/translations/ja_JP/howto.rst | 2 +-
Documentation/translations/ko_KR/howto.rst | 2 +-
Documentation/translations/zh_CN/process/howto.rst | 2 +-
Documentation/translations/zh_TW/process/howto.rst | 2 +-
arch/parisc/boot/compressed/Makefile | 2 +-
arch/s390/Makefile | 2 +-
arch/s390/purgatory/Makefile | 2 +-
arch/x86/Makefile | 2 +-
arch/x86/boot/compressed/Makefile | 2 +-
drivers/firmware/efi/libstub/Makefile | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
---
base-commit: 06cf22cc87e00b878c310d5441981b7750f04078
change-id: 20251017-v5-15-gcc-15-5ceda8ebe577
Best regards,
--
Matthieu Baerts (NGI0) <matttbe@kernel.org>
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 5.15.y 1/3] x86/boot: Compile boot code with -std=gnu11 too 2025-10-17 16:23 [PATCH 5.15.y 0/3] v5.15: fix build with GCC 15 Matthieu Baerts (NGI0) @ 2025-10-17 16:24 ` Matthieu Baerts (NGI0) 2025-11-03 1:38 ` Patch "x86/boot: Compile boot code with -std=gnu11 too" has been added to the 5.15-stable tree gregkh 2025-10-17 16:24 ` [PATCH 5.15.y 2/3] arch: back to -std=gnu89 in < v5.18 Matthieu Baerts (NGI0) 2025-10-17 16:24 ` [PATCH 5.15.y 3/3] Revert "docs/process/howto: Replace C89 with C11" Matthieu Baerts (NGI0) 2 siblings, 1 reply; 10+ messages in thread From: Matthieu Baerts (NGI0) @ 2025-10-17 16:24 UTC (permalink / raw) To: stable, Greg Kroah-Hartman, Sasha Levin Cc: MPTCP Upstream, Matthieu Baerts (NGI0), Alexey Dobriyan, Ingo Molnar, H. Peter Anvin (Intel), Nathan Chancellor, Dave Hansen, Ard Biesheuvel From: Alexey Dobriyan <adobriyan@gmail.com> commit b3bee1e7c3f2b1b77182302c7b2131c804175870 upstream. Use -std=gnu11 for consistency with main kernel code. It doesn't seem to change anything in vmlinux. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: H. Peter Anvin (Intel) <hpa@zytor.com> Link: https://lore.kernel.org/r/2058761e-12a4-4b2f-9690-3c3c1c9902a5@p183 [ This kernel version doesn't build with GCC 15: In file included from include/uapi/linux/posix_types.h:5, from include/uapi/linux/types.h:14, from include/linux/types.h:6, from arch/x86/realmode/rm/wakeup.h:11, from arch/x86/realmode/rm/wakemain.c:2: include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enumeration constant 11 | false = 0, | ^~~~~ include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=c23' onwards include/linux/types.h:30:33: error: 'bool' cannot be defined via 'typedef' 30 | typedef _Bool bool; | ^~~~ include/linux/types.h:30:33: note: 'bool' is a keyword with '-std=c23' onwards include/linux/types.h:30:1: warning: useless type name in empty declaration 30 | typedef _Bool bool; | ^~~~~~~ The fix is similar to commit ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15") which has been backported to this kernel. Note: In < 5.18 version, -std=gnu89 is used instead of -std=gnu11, see commit e8c07082a810 ("Kbuild: move to -std=gnu11"). I suggest not to modify that in this commit here as all the other similar fixes to support GCC 15 set -std=gnu11. This can be done in a dedicated commit if needed. ] Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> --- Cc: Nathan Chancellor <nathan@kernel.org> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ard Biesheuvel <ardb@kernel.org> --- arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 9c09bbd390ce..d5ee0b920dc0 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -24,7 +24,7 @@ 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 := -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \ +REALMODE_CFLAGS := -std=gnu11 -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) -- 2.51.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Patch "x86/boot: Compile boot code with -std=gnu11 too" has been added to the 5.15-stable tree 2025-10-17 16:24 ` [PATCH 5.15.y 1/3] x86/boot: Compile boot code with -std=gnu11 too Matthieu Baerts (NGI0) @ 2025-11-03 1:38 ` gregkh 0 siblings, 0 replies; 10+ messages in thread From: gregkh @ 2025-11-03 1:38 UTC (permalink / raw) To: adobriyan, ardb, dave.hansen, gregkh, hpa, matttbe, mingo, mptcp, nathan, sashal Cc: stable-commits This is a note to let you know that I've just added the patch titled x86/boot: Compile boot code with -std=gnu11 too to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: x86-boot-compile-boot-code-with-std-gnu11-too.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@vger.kernel.org> know about it. From matttbe@kernel.org Sat Oct 18 01:24:24 2025 From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org> Date: Fri, 17 Oct 2025 18:24:00 +0200 Subject: x86/boot: Compile boot code with -std=gnu11 too To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Sasha Levin <sashal@kernel.org> Cc: MPTCP Upstream <mptcp@lists.linux.dev>, "Matthieu Baerts (NGI0)" <matttbe@kernel.org>, Alexey Dobriyan <adobriyan@gmail.com>, Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin (Intel)" <hpa@zytor.com>, Nathan Chancellor <nathan@kernel.org>, Dave Hansen <dave.hansen@linux.intel.com>, Ard Biesheuvel <ardb@kernel.org> Message-ID: <20251017-v5-15-gcc-15-v1-1-da6c065049d7@kernel.org> From: Alexey Dobriyan <adobriyan@gmail.com> commit b3bee1e7c3f2b1b77182302c7b2131c804175870 upstream. Use -std=gnu11 for consistency with main kernel code. It doesn't seem to change anything in vmlinux. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: H. Peter Anvin (Intel) <hpa@zytor.com> Link: https://lore.kernel.org/r/2058761e-12a4-4b2f-9690-3c3c1c9902a5@p183 [ This kernel version doesn't build with GCC 15: In file included from include/uapi/linux/posix_types.h:5, from include/uapi/linux/types.h:14, from include/linux/types.h:6, from arch/x86/realmode/rm/wakeup.h:11, from arch/x86/realmode/rm/wakemain.c:2: include/linux/stddef.h:11:9: error: cannot use keyword 'false' as enumeration constant 11 | false = 0, | ^~~~~ include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=c23' onwards include/linux/types.h:30:33: error: 'bool' cannot be defined via 'typedef' 30 | typedef _Bool bool; | ^~~~ include/linux/types.h:30:33: note: 'bool' is a keyword with '-std=c23' onwards include/linux/types.h:30:1: warning: useless type name in empty declaration 30 | typedef _Bool bool; | ^~~~~~~ The fix is similar to commit ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15") which has been backported to this kernel. Note: In < 5.18 version, -std=gnu89 is used instead of -std=gnu11, see commit e8c07082a810 ("Kbuild: move to -std=gnu11"). I suggest not to modify that in this commit here as all the other similar fixes to support GCC 15 set -std=gnu11. This can be done in a dedicated commit if needed. ] Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- arch/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -24,7 +24,7 @@ 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 := -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \ +REALMODE_CFLAGS := -std=gnu11 -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) Patches currently in stable-queue which might be from matttbe@kernel.org are queue-5.15/arch-back-to-std-gnu89-in-v5.18.patch queue-5.15/x86-boot-compile-boot-code-with-std-gnu11-too.patch queue-5.15/mptcp-drop-bogus-optimization-in-__mptcp_check_push.patch queue-5.15/mptcp-restore-window-probe.patch queue-5.15/revert-docs-process-howto-replace-c89-with-c11.patch ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 5.15.y 2/3] arch: back to -std=gnu89 in < v5.18 2025-10-17 16:23 [PATCH 5.15.y 0/3] v5.15: fix build with GCC 15 Matthieu Baerts (NGI0) 2025-10-17 16:24 ` [PATCH 5.15.y 1/3] x86/boot: Compile boot code with -std=gnu11 too Matthieu Baerts (NGI0) @ 2025-10-17 16:24 ` Matthieu Baerts (NGI0) 2025-10-20 13:30 ` Greg Kroah-Hartman 2025-11-03 1:38 ` Patch "arch: back to -std=gnu89 in < v5.18" has been added to the 5.15-stable tree gregkh 2025-10-17 16:24 ` [PATCH 5.15.y 3/3] Revert "docs/process/howto: Replace C89 with C11" Matthieu Baerts (NGI0) 2 siblings, 2 replies; 10+ messages in thread From: Matthieu Baerts (NGI0) @ 2025-10-17 16:24 UTC (permalink / raw) To: stable, Greg Kroah-Hartman, Sasha Levin Cc: MPTCP Upstream, Matthieu Baerts (NGI0), Nathan Chancellor, Ard Biesheuvel, Alexey Dobriyan, Arnd Bergmann Recent fixes have been backported to < v5.18 to fix build issues with GCC 5.15. They all force -std=gnu11 in the CFLAGS, "because [the kernel] requests the gnu11 standard via '-std=' in the main Makefile". This is true for >= 5.18 versions, but not before. This switch to -std=gnu11 has been done in commit e8c07082a810 ("Kbuild: move to -std=gnu11"). For a question of uniformity, force -std=gnu89, similar to what is done in the main Makefile. Note: the fixes tags below refers to upstream commits, but this fix is only for kernels not having commit e8c07082a810 ("Kbuild: move to -std=gnu11"). Fixes: 7cbb015e2d3d ("parisc: fix building with gcc-15") Fixes: 3b8b80e99376 ("s390: Add '-std=gnu11' to decompressor and purgatory CFLAGS") Fixes: b3bee1e7c3f2 ("x86/boot: Compile boot code with -std=gnu11 too") Fixes: ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15") Fixes: 8ba14d9f490a ("efi: libstub: Use '-std=gnu11' to fix build with GCC 15") Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> --- Note: An alternative is to backport commit e8c07082a810 ("Kbuild: move to -std=gnu11"), but I guess we might not want to do that for stable, as it might introduce new warnings. Cc: Nathan Chancellor <nathan@kernel.org> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> --- arch/parisc/boot/compressed/Makefile | 2 +- arch/s390/Makefile | 2 +- arch/s390/purgatory/Makefile | 2 +- arch/x86/Makefile | 2 +- arch/x86/boot/compressed/Makefile | 2 +- drivers/firmware/efi/libstub/Makefile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/parisc/boot/compressed/Makefile b/arch/parisc/boot/compressed/Makefile index 839a13a59f53..3eba999a2eb7 100644 --- a/arch/parisc/boot/compressed/Makefile +++ b/arch/parisc/boot/compressed/Makefile @@ -22,7 +22,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=gnu89 OBJECTS += $(obj)/head.o $(obj)/real2.o $(obj)/firmware.o $(obj)/misc.o $(obj)/piggy.o diff --git a/arch/s390/Makefile b/arch/s390/Makefile index c8071eb82e2e..40265863ed36 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -23,7 +23,7 @@ endif aflags_dwarf := -Wa,-gdwarf-2 KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) -KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -std=gnu11 +KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -std=gnu89 KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float -mbackchain KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile index 677cbb654024..414ba87e038b 100644 --- a/arch/s390/purgatory/Makefile +++ b/arch/s390/purgatory/Makefile @@ -21,7 +21,7 @@ UBSAN_SANITIZE := n KASAN_SANITIZE := n KCSAN_SANITIZE := n -KBUILD_CFLAGS := -std=gnu11 -fno-strict-aliasing -Wall -Wstrict-prototypes +KBUILD_CFLAGS := -std=gnu89 -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 += -c -MD -Os -m64 -msoft-float -fno-common diff --git a/arch/x86/Makefile b/arch/x86/Makefile index d5ee0b920dc0..16267e85c5ad 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -24,7 +24,7 @@ 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=gnu89 -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) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index f82b2cb24360..f54fa1579dcd 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -33,7 +33,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=gnu89 KBUILD_CFLAGS += -fno-strict-aliasing -fPIE KBUILD_CFLAGS += -Wundef KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index f1a4f0154540..1195c9fb84de 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -7,7 +7,7 @@ # 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=gnu89 \ -fPIC -fno-strict-aliasing -mno-red-zone \ -mno-mmx -mno-sse -fshort-wchar \ -Wno-pointer-sign \ -- 2.51.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 5.15.y 2/3] arch: back to -std=gnu89 in < v5.18 2025-10-17 16:24 ` [PATCH 5.15.y 2/3] arch: back to -std=gnu89 in < v5.18 Matthieu Baerts (NGI0) @ 2025-10-20 13:30 ` Greg Kroah-Hartman 2025-10-20 15:58 ` Matthieu Baerts 2025-11-03 1:38 ` Patch "arch: back to -std=gnu89 in < v5.18" has been added to the 5.15-stable tree gregkh 1 sibling, 1 reply; 10+ messages in thread From: Greg Kroah-Hartman @ 2025-10-20 13:30 UTC (permalink / raw) To: Matthieu Baerts (NGI0) Cc: stable, Sasha Levin, MPTCP Upstream, Nathan Chancellor, Ard Biesheuvel, Alexey Dobriyan, Arnd Bergmann On Fri, Oct 17, 2025 at 06:24:01PM +0200, Matthieu Baerts (NGI0) wrote: > Recent fixes have been backported to < v5.18 to fix build issues with > GCC 5.15. They all force -std=gnu11 in the CFLAGS, "because [the kernel] > requests the gnu11 standard via '-std=' in the main Makefile". > > This is true for >= 5.18 versions, but not before. This switch to > -std=gnu11 has been done in commit e8c07082a810 ("Kbuild: move to > -std=gnu11"). > > For a question of uniformity, force -std=gnu89, similar to what is done > in the main Makefile. > > Note: the fixes tags below refers to upstream commits, but this fix is > only for kernels not having commit e8c07082a810 ("Kbuild: move to > -std=gnu11"). > > Fixes: 7cbb015e2d3d ("parisc: fix building with gcc-15") > Fixes: 3b8b80e99376 ("s390: Add '-std=gnu11' to decompressor and purgatory CFLAGS") > Fixes: b3bee1e7c3f2 ("x86/boot: Compile boot code with -std=gnu11 too") > Fixes: ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15") > Fixes: 8ba14d9f490a ("efi: libstub: Use '-std=gnu11' to fix build with GCC 15") > Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> > --- > Note: > An alternative is to backport commit e8c07082a810 ("Kbuild: move to > -std=gnu11"), but I guess we might not want to do that for stable, as > it might introduce new warnings. I would rather do that, as that would allow us to make things align up and be easier to support over the next two years that this kernel needs to be alive for. How much work would that entail? thanks, greg k-h ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 5.15.y 2/3] arch: back to -std=gnu89 in < v5.18 2025-10-20 13:30 ` Greg Kroah-Hartman @ 2025-10-20 15:58 ` Matthieu Baerts 2025-11-03 1:41 ` Greg Kroah-Hartman 0 siblings, 1 reply; 10+ messages in thread From: Matthieu Baerts @ 2025-10-20 15:58 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: stable, Sasha Levin, MPTCP Upstream, Nathan Chancellor, Ard Biesheuvel, Alexey Dobriyan, Arnd Bergmann Hi Greg, On 20/10/2025 15:30, Greg Kroah-Hartman wrote: > On Fri, Oct 17, 2025 at 06:24:01PM +0200, Matthieu Baerts (NGI0) wrote: >> Recent fixes have been backported to < v5.18 to fix build issues with >> GCC 5.15. They all force -std=gnu11 in the CFLAGS, "because [the kernel] >> requests the gnu11 standard via '-std=' in the main Makefile". >> >> This is true for >= 5.18 versions, but not before. This switch to >> -std=gnu11 has been done in commit e8c07082a810 ("Kbuild: move to >> -std=gnu11"). >> >> For a question of uniformity, force -std=gnu89, similar to what is done >> in the main Makefile. >> >> Note: the fixes tags below refers to upstream commits, but this fix is >> only for kernels not having commit e8c07082a810 ("Kbuild: move to >> -std=gnu11"). >> >> Fixes: 7cbb015e2d3d ("parisc: fix building with gcc-15") >> Fixes: 3b8b80e99376 ("s390: Add '-std=gnu11' to decompressor and purgatory CFLAGS") >> Fixes: b3bee1e7c3f2 ("x86/boot: Compile boot code with -std=gnu11 too") >> Fixes: ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15") >> Fixes: 8ba14d9f490a ("efi: libstub: Use '-std=gnu11' to fix build with GCC 15") >> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> >> --- >> Note: >> An alternative is to backport commit e8c07082a810 ("Kbuild: move to >> -std=gnu11"), but I guess we might not want to do that for stable, as >> it might introduce new warnings. > > I would rather do that, as that would allow us to make things align up > and be easier to support over the next two years that this kernel needs > to be alive for. How much work would that entail? Good question. I'm not an expert in this area, but I just did a quick test: I backported commit e8c07082a810 ("Kbuild: move to -std=gnu11") and its parent commit 4d94f910e79a ("Kbuild: use -Wdeclaration-after-statement"). A build with 'make allyesconfig' and GCC 5.15 looks OK to me, no warnings. But when looking a bit around, I noticed these patches have already been suggested to be backported to v5.15 in 2023, but they got removed -- except the doc update, see patch 3/3 -- because they were causing build issues with GCC 8 and 12, see: https://lore.kernel.org/a2fbbaa2-51d2-4a8c-b032-5331e72cd116@linaro.org I didn't try to reproduce the issues, but maybe we can re-add them to the v5.15 queue, and ask the CIs to test that? Note that even if we do that, the first patch will still be needed to have GCC 15 support in v5.15. Cheers, Matt -- Sponsored by the NGI0 Core fund. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 5.15.y 2/3] arch: back to -std=gnu89 in < v5.18 2025-10-20 15:58 ` Matthieu Baerts @ 2025-11-03 1:41 ` Greg Kroah-Hartman 0 siblings, 0 replies; 10+ messages in thread From: Greg Kroah-Hartman @ 2025-11-03 1:41 UTC (permalink / raw) To: Matthieu Baerts Cc: stable, Sasha Levin, MPTCP Upstream, Nathan Chancellor, Ard Biesheuvel, Alexey Dobriyan, Arnd Bergmann On Mon, Oct 20, 2025 at 05:58:12PM +0200, Matthieu Baerts wrote: > Hi Greg, > > On 20/10/2025 15:30, Greg Kroah-Hartman wrote: > > On Fri, Oct 17, 2025 at 06:24:01PM +0200, Matthieu Baerts (NGI0) wrote: > >> Recent fixes have been backported to < v5.18 to fix build issues with > >> GCC 5.15. They all force -std=gnu11 in the CFLAGS, "because [the kernel] > >> requests the gnu11 standard via '-std=' in the main Makefile". > >> > >> This is true for >= 5.18 versions, but not before. This switch to > >> -std=gnu11 has been done in commit e8c07082a810 ("Kbuild: move to > >> -std=gnu11"). > >> > >> For a question of uniformity, force -std=gnu89, similar to what is done > >> in the main Makefile. > >> > >> Note: the fixes tags below refers to upstream commits, but this fix is > >> only for kernels not having commit e8c07082a810 ("Kbuild: move to > >> -std=gnu11"). > >> > >> Fixes: 7cbb015e2d3d ("parisc: fix building with gcc-15") > >> Fixes: 3b8b80e99376 ("s390: Add '-std=gnu11' to decompressor and purgatory CFLAGS") > >> Fixes: b3bee1e7c3f2 ("x86/boot: Compile boot code with -std=gnu11 too") > >> Fixes: ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15") > >> Fixes: 8ba14d9f490a ("efi: libstub: Use '-std=gnu11' to fix build with GCC 15") > >> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> > >> --- > >> Note: > >> An alternative is to backport commit e8c07082a810 ("Kbuild: move to > >> -std=gnu11"), but I guess we might not want to do that for stable, as > >> it might introduce new warnings. > > > > I would rather do that, as that would allow us to make things align up > > and be easier to support over the next two years that this kernel needs > > to be alive for. How much work would that entail? > > Good question. I'm not an expert in this area, but I just did a quick > test: I backported commit e8c07082a810 ("Kbuild: move to -std=gnu11") > and its parent commit 4d94f910e79a ("Kbuild: use > -Wdeclaration-after-statement"). A build with 'make allyesconfig' and > GCC 5.15 looks OK to me, no warnings. > > But when looking a bit around, I noticed these patches have already been > suggested to be backported to v5.15 in 2023, but they got removed -- > except the doc update, see patch 3/3 -- because they were causing build > issues with GCC 8 and 12, see: > > https://lore.kernel.org/a2fbbaa2-51d2-4a8c-b032-5331e72cd116@linaro.org > > I didn't try to reproduce the issues, but maybe we can re-add them to > the v5.15 queue, and ask the CIs to test that? > > Note that even if we do that, the first patch will still be needed to > have GCC 15 support in v5.15. Ok, 5.15.y and 5.10.y will be alive for a while, so I'll go queue these up now as odds are, I'll end up hitting this issue myself :) thanks for the patches! greg k-h ^ permalink raw reply [flat|nested] 10+ messages in thread
* Patch "arch: back to -std=gnu89 in < v5.18" has been added to the 5.15-stable tree 2025-10-17 16:24 ` [PATCH 5.15.y 2/3] arch: back to -std=gnu89 in < v5.18 Matthieu Baerts (NGI0) 2025-10-20 13:30 ` Greg Kroah-Hartman @ 2025-11-03 1:38 ` gregkh 1 sibling, 0 replies; 10+ messages in thread From: gregkh @ 2025-11-03 1:38 UTC (permalink / raw) To: adobriyan, ardb, arnd, gregkh, matttbe, mptcp, nathan, sashal Cc: stable-commits This is a note to let you know that I've just added the patch titled arch: back to -std=gnu89 in < v5.18 to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: arch-back-to-std-gnu89-in-v5.18.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@vger.kernel.org> know about it. From matttbe@kernel.org Sat Oct 18 01:24:25 2025 From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org> Date: Fri, 17 Oct 2025 18:24:01 +0200 Subject: arch: back to -std=gnu89 in < v5.18 To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Sasha Levin <sashal@kernel.org> Cc: MPTCP Upstream <mptcp@lists.linux.dev>, "Matthieu Baerts (NGI0)" <matttbe@kernel.org>, Nathan Chancellor <nathan@kernel.org>, Ard Biesheuvel <ardb@kernel.org>, Alexey Dobriyan <adobriyan@gmail.com>, Arnd Bergmann <arnd@arndb.de> Message-ID: <20251017-v5-15-gcc-15-v1-2-da6c065049d7@kernel.org> From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org> Recent fixes have been backported to < v5.18 to fix build issues with GCC 5.15. They all force -std=gnu11 in the CFLAGS, "because [the kernel] requests the gnu11 standard via '-std=' in the main Makefile". This is true for >= 5.18 versions, but not before. This switch to -std=gnu11 has been done in commit e8c07082a810 ("Kbuild: move to -std=gnu11"). For a question of uniformity, force -std=gnu89, similar to what is done in the main Makefile. Note: the fixes tags below refers to upstream commits, but this fix is only for kernels not having commit e8c07082a810 ("Kbuild: move to -std=gnu11"). Fixes: 7cbb015e2d3d ("parisc: fix building with gcc-15") Fixes: 3b8b80e99376 ("s390: Add '-std=gnu11' to decompressor and purgatory CFLAGS") Fixes: b3bee1e7c3f2 ("x86/boot: Compile boot code with -std=gnu11 too") Fixes: ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15") Fixes: 8ba14d9f490a ("efi: libstub: Use '-std=gnu11' to fix build with GCC 15") Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- arch/parisc/boot/compressed/Makefile | 2 +- arch/s390/Makefile | 2 +- arch/s390/purgatory/Makefile | 2 +- arch/x86/Makefile | 2 +- arch/x86/boot/compressed/Makefile | 2 +- drivers/firmware/efi/libstub/Makefile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) --- a/arch/parisc/boot/compressed/Makefile +++ b/arch/parisc/boot/compressed/Makefile @@ -22,7 +22,7 @@ KBUILD_CFLAGS += -fno-PIE -mno-space-reg ifndef CONFIG_64BIT KBUILD_CFLAGS += -mfast-indirect-calls endif -KBUILD_CFLAGS += -std=gnu11 +KBUILD_CFLAGS += -std=gnu89 OBJECTS += $(obj)/head.o $(obj)/real2.o $(obj)/firmware.o $(obj)/misc.o $(obj)/piggy.o --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -23,7 +23,7 @@ endif aflags_dwarf := -Wa,-gdwarf-2 KBUILD_AFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -D__ASSEMBLY__ KBUILD_AFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),$(aflags_dwarf)) -KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -std=gnu11 +KBUILD_CFLAGS_DECOMPRESSOR := $(CLANG_FLAGS) -m64 -O2 -std=gnu89 KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float -mbackchain KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables --- a/arch/s390/purgatory/Makefile +++ b/arch/s390/purgatory/Makefile @@ -21,7 +21,7 @@ UBSAN_SANITIZE := n KASAN_SANITIZE := n KCSAN_SANITIZE := n -KBUILD_CFLAGS := -std=gnu11 -fno-strict-aliasing -Wall -Wstrict-prototypes +KBUILD_CFLAGS := -std=gnu89 -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 += -c -MD -Os -m64 -msoft-float -fno-common --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -24,7 +24,7 @@ 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=gnu89 -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) --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -33,7 +33,7 @@ targets := vmlinux vmlinux.bin vmlinux.b # 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=gnu89 KBUILD_CFLAGS += -fno-strict-aliasing -fPIE KBUILD_CFLAGS += -Wundef KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -7,7 +7,7 @@ # 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=gnu89 \ -fPIC -fno-strict-aliasing -mno-red-zone \ -mno-mmx -mno-sse -fshort-wchar \ -Wno-pointer-sign \ Patches currently in stable-queue which might be from matttbe@kernel.org are queue-5.15/arch-back-to-std-gnu89-in-v5.18.patch queue-5.15/x86-boot-compile-boot-code-with-std-gnu11-too.patch queue-5.15/mptcp-drop-bogus-optimization-in-__mptcp_check_push.patch queue-5.15/mptcp-restore-window-probe.patch queue-5.15/revert-docs-process-howto-replace-c89-with-c11.patch ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 5.15.y 3/3] Revert "docs/process/howto: Replace C89 with C11" 2025-10-17 16:23 [PATCH 5.15.y 0/3] v5.15: fix build with GCC 15 Matthieu Baerts (NGI0) 2025-10-17 16:24 ` [PATCH 5.15.y 1/3] x86/boot: Compile boot code with -std=gnu11 too Matthieu Baerts (NGI0) 2025-10-17 16:24 ` [PATCH 5.15.y 2/3] arch: back to -std=gnu89 in < v5.18 Matthieu Baerts (NGI0) @ 2025-10-17 16:24 ` Matthieu Baerts (NGI0) 2025-11-03 1:38 ` Patch "Revert "docs/process/howto: Replace C89 with C11"" has been added to the 5.15-stable tree gregkh 2 siblings, 1 reply; 10+ messages in thread From: Matthieu Baerts (NGI0) @ 2025-10-17 16:24 UTC (permalink / raw) To: stable, Greg Kroah-Hartman, Sasha Levin Cc: MPTCP Upstream, Matthieu Baerts (NGI0), Akira Yokosawa, Arnd Bergmann, Federico Vaga, Alex Shi, Hu Haowen, Tsugikazu Shibata, Jonathan Corbet This reverts commit dc52117cd797f71f9686fa0cec91509eb7a9623d. In this kernel version, C89 is still the default ISO standard. The reverted commit was fixing commit e8c07082a810 ("Kbuild: move to -std=gnu11"), introduced in v5.18, and not backported to older versions. It was then not supported to be backported to v5.15. It can then safely be reverted. Fixes: 2f3f53d62307 ("docs/process/howto: Replace C89 with C11") Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> --- Cc: Akira Yokosawa <akiyks@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Federico Vaga <federico.vaga@vaga.pv.it> Cc: Alex Shi <alexs@kernel.org> Cc: Hu Haowen <src.res@email.cn> Cc: Tsugikazu Shibata <shibata@linuxfoundation.org> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- Documentation/process/howto.rst | 2 +- Documentation/translations/it_IT/process/howto.rst | 2 +- Documentation/translations/ja_JP/howto.rst | 2 +- Documentation/translations/ko_KR/howto.rst | 2 +- Documentation/translations/zh_CN/process/howto.rst | 2 +- Documentation/translations/zh_TW/process/howto.rst | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/process/howto.rst b/Documentation/process/howto.rst index 12a4e7ebcbab..e4beeca57e5f 100644 --- a/Documentation/process/howto.rst +++ b/Documentation/process/howto.rst @@ -36,7 +36,7 @@ experience, the following books are good for, if anything, reference: - "C: A Reference Manual" by Harbison and Steele [Prentice Hall] The kernel is written using GNU C and the GNU toolchain. While it -adheres to the ISO C11 standard, it uses a number of extensions that are +adheres to the ISO C89 standard, it uses a number of extensions that are not featured in the standard. The kernel is a freestanding C environment, with no reliance on the standard C library, so some portions of the C standard are not supported. Arbitrary long long diff --git a/Documentation/translations/it_IT/process/howto.rst b/Documentation/translations/it_IT/process/howto.rst index d02df35d0f6b..9554368a2ae2 100644 --- a/Documentation/translations/it_IT/process/howto.rst +++ b/Documentation/translations/it_IT/process/howto.rst @@ -44,7 +44,7 @@ altro, utili riferimenti: - "C: A Reference Manual" di Harbison and Steele [Prentice Hall] Il kernel è stato scritto usando GNU C e la toolchain GNU. -Sebbene si attenga allo standard ISO C11, esso utilizza una serie di +Sebbene si attenga allo standard ISO C89, esso utilizza una serie di estensioni che non sono previste in questo standard. Il kernel è un ambiente C indipendente, che non ha alcuna dipendenza dalle librerie C standard, così alcune parti del C standard non sono supportate. diff --git a/Documentation/translations/ja_JP/howto.rst b/Documentation/translations/ja_JP/howto.rst index 6a00e43868a2..d667f9d8a02a 100644 --- a/Documentation/translations/ja_JP/howto.rst +++ b/Documentation/translations/ja_JP/howto.rst @@ -65,7 +65,7 @@ Linux カーネル開発のやり方 - 『新・詳説 C 言語 H&S リファレンス』 (サミュエル P ハービソン/ガイ L スティール共著 斉藤 信男監訳)[ソフトバンク] カーネルは GNU C と GNU ツールチェインを使って書かれています。カーネル -は ISO C11 仕様に準拠して書く一方で、標準には無い言語拡張を多く使って +は ISO C89 仕様に準拠して書く一方で、標準には無い言語拡張を多く使って います。カーネルは標準 C ライブラリに依存しない、C 言語非依存環境です。 そのため、C の標準の中で使えないものもあります。特に任意の long long の除算や浮動小数点は使えません。カーネルがツールチェインや C 言語拡張 diff --git a/Documentation/translations/ko_KR/howto.rst b/Documentation/translations/ko_KR/howto.rst index a787d31dcdbf..e3cdf0c84892 100644 --- a/Documentation/translations/ko_KR/howto.rst +++ b/Documentation/translations/ko_KR/howto.rst @@ -62,7 +62,7 @@ Documentation/process/howto.rst - "Practical C Programming" by Steve Oualline [O'Reilly] - "C: A Reference Manual" by Harbison and Steele [Prentice Hall] -커널은 GNU C와 GNU 툴체인을 사용하여 작성되었다. 이 툴들은 ISO C11 표준을 +커널은 GNU C와 GNU 툴체인을 사용하여 작성되었다. 이 툴들은 ISO C89 표준을 따르는 반면 표준에 있지 않은 많은 확장기능도 가지고 있다. 커널은 표준 C 라이브러리와는 관계없이 freestanding C 환경이어서 C 표준의 일부는 지원되지 않는다. 임의의 long long 나누기나 floating point는 지원되지 않는다. diff --git a/Documentation/translations/zh_CN/process/howto.rst b/Documentation/translations/zh_CN/process/howto.rst index 2a910e3e904e..ee3dee476d57 100644 --- a/Documentation/translations/zh_CN/process/howto.rst +++ b/Documentation/translations/zh_CN/process/howto.rst @@ -45,7 +45,7 @@ Linux内核大部分是由C语言写成的,一些体系结构相关的代码 - "C: A Reference Manual" by Harbison and Steele [Prentice Hall] 《C语言参考手册(原书第5版)》(邱仲潘 等译)[机械工业出版社] -Linux内核使用GNU C和GNU工具链开发。虽然它遵循ISO C11标准,但也用到了一些 +Linux内核使用GNU C和GNU工具链开发。虽然它遵循ISO C89标准,但也用到了一些 标准中没有定义的扩展。内核是自给自足的C环境,不依赖于标准C库的支持,所以 并不支持C标准中的部分定义。比如long long类型的大数除法和浮点运算就不允许 使用。有时候确实很难弄清楚内核对工具链的要求和它所使用的扩展,不幸的是目 diff --git a/Documentation/translations/zh_TW/process/howto.rst b/Documentation/translations/zh_TW/process/howto.rst index ce14d4ed5c5b..2043691b92e3 100644 --- a/Documentation/translations/zh_TW/process/howto.rst +++ b/Documentation/translations/zh_TW/process/howto.rst @@ -48,7 +48,7 @@ Linux內核大部分是由C語言寫成的,一些體系結構相關的代碼 - "C: A Reference Manual" by Harbison and Steele [Prentice Hall] 《C語言參考手冊(原書第5版)》(邱仲潘 等譯)[機械工業出版社] -Linux內核使用GNU C和GNU工具鏈開發。雖然它遵循ISO C11標準,但也用到了一些 +Linux內核使用GNU C和GNU工具鏈開發。雖然它遵循ISO C89標準,但也用到了一些 標準中沒有定義的擴展。內核是自給自足的C環境,不依賴於標準C庫的支持,所以 並不支持C標準中的部分定義。比如long long類型的大數除法和浮點運算就不允許 使用。有時候確實很難弄清楚內核對工具鏈的要求和它所使用的擴展,不幸的是目 -- 2.51.0 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Patch "Revert "docs/process/howto: Replace C89 with C11"" has been added to the 5.15-stable tree 2025-10-17 16:24 ` [PATCH 5.15.y 3/3] Revert "docs/process/howto: Replace C89 with C11" Matthieu Baerts (NGI0) @ 2025-11-03 1:38 ` gregkh 0 siblings, 0 replies; 10+ messages in thread From: gregkh @ 2025-11-03 1:38 UTC (permalink / raw) To: akiyks, alexs, arnd, corbet, federico.vaga, gregkh, matttbe, mptcp, sashal, shibata, src.res Cc: stable-commits This is a note to let you know that I've just added the patch titled Revert "docs/process/howto: Replace C89 with C11" to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: revert-docs-process-howto-replace-c89-with-c11.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@vger.kernel.org> know about it. From matttbe@kernel.org Sat Oct 18 01:24:23 2025 From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org> Date: Fri, 17 Oct 2025 18:24:02 +0200 Subject: Revert "docs/process/howto: Replace C89 with C11" To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Sasha Levin <sashal@kernel.org> Cc: MPTCP Upstream <mptcp@lists.linux.dev>, "Matthieu Baerts (NGI0)" <matttbe@kernel.org>, Akira Yokosawa <akiyks@gmail.com>, Arnd Bergmann <arnd@arndb.de>, Federico Vaga <federico.vaga@vaga.pv.it>, Alex Shi <alexs@kernel.org>, Hu Haowen <src.res@email.cn>, Tsugikazu Shibata <shibata@linuxfoundation.org>, Jonathan Corbet <corbet@lwn.net> Message-ID: <20251017-v5-15-gcc-15-v1-3-da6c065049d7@kernel.org> From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org> This reverts commit dc52117cd797f71f9686fa0cec91509eb7a9623d which is commit 2f3f53d62307262f0086804ea7cea99b0e085450 upstream. In this kernel version, C89 is still the default ISO standard. The reverted commit was fixing commit e8c07082a810 ("Kbuild: move to -std=gnu11"), introduced in v5.18, and not backported to older versions. It was then not supported to be backported to v5.15. It can then safely be reverted. Fixes: 2f3f53d62307 ("docs/process/howto: Replace C89 with C11") Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Cc: Akira Yokosawa <akiyks@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Federico Vaga <federico.vaga@vaga.pv.it> Cc: Alex Shi <alexs@kernel.org> Cc: Hu Haowen <src.res@email.cn> Cc: Tsugikazu Shibata <shibata@linuxfoundation.org> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- Documentation/process/howto.rst | 2 +- Documentation/translations/it_IT/process/howto.rst | 2 +- Documentation/translations/ja_JP/howto.rst | 2 +- Documentation/translations/ko_KR/howto.rst | 2 +- Documentation/translations/zh_CN/process/howto.rst | 2 +- Documentation/translations/zh_TW/process/howto.rst | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) --- a/Documentation/process/howto.rst +++ b/Documentation/process/howto.rst @@ -36,7 +36,7 @@ experience, the following books are good - "C: A Reference Manual" by Harbison and Steele [Prentice Hall] The kernel is written using GNU C and the GNU toolchain. While it -adheres to the ISO C11 standard, it uses a number of extensions that are +adheres to the ISO C89 standard, it uses a number of extensions that are not featured in the standard. The kernel is a freestanding C environment, with no reliance on the standard C library, so some portions of the C standard are not supported. Arbitrary long long --- a/Documentation/translations/it_IT/process/howto.rst +++ b/Documentation/translations/it_IT/process/howto.rst @@ -44,7 +44,7 @@ altro, utili riferimenti: - "C: A Reference Manual" di Harbison and Steele [Prentice Hall] Il kernel è stato scritto usando GNU C e la toolchain GNU. -Sebbene si attenga allo standard ISO C11, esso utilizza una serie di +Sebbene si attenga allo standard ISO C89, esso utilizza una serie di estensioni che non sono previste in questo standard. Il kernel è un ambiente C indipendente, che non ha alcuna dipendenza dalle librerie C standard, così alcune parti del C standard non sono supportate. --- a/Documentation/translations/ja_JP/howto.rst +++ b/Documentation/translations/ja_JP/howto.rst @@ -65,7 +65,7 @@ Linux ã«ã¼ãã«éçºã®ããæ¹ - ãæ°ã»è©³èª¬ C è¨èª H&S ãªãã¡ã¬ã³ã¹ã (ãµãã¥ã¨ã« P ãã¼ãã½ã³/ã¬ã¤ L ã¹ãã£ã¼ã«å ±è æè¤ ä¿¡ç·ç£è¨³)[ã½ãããã³ã¯] ã«ã¼ãã«ã¯ GNU C 㨠GNU ãã¼ã«ãã§ã¤ã³ã使ã£ã¦æ¸ããã¦ãã¾ããã«ã¼ãã« -㯠ISO C11 仿§ã«æºæ ãã¦æ¸ã䏿¹ã§ãæ¨æºã«ã¯ç¡ãè¨èªæ¡å¼µãå¤ã使ã£ã¦ +㯠ISO C89 仿§ã«æºæ ãã¦æ¸ã䏿¹ã§ãæ¨æºã«ã¯ç¡ãè¨èªæ¡å¼µãå¤ã使ã£ã¦ ãã¾ããã«ã¼ãã«ã¯æ¨æº C ã©ã¤ãã©ãªã«ä¾åããªããC è¨èªéä¾åç°å¢ã§ãã ãã®ãããC ã®æ¨æºã®ä¸ã§ä½¿ããªããã®ãããã¾ããç¹ã«ä»»æã® long long ã®é¤ç®ãæµ®åå°æ°ç¹ã¯ä½¿ãã¾ãããã«ã¼ãã«ããã¼ã«ãã§ã¤ã³ã C è¨èªæ¡å¼µ --- a/Documentation/translations/ko_KR/howto.rst +++ b/Documentation/translations/ko_KR/howto.rst @@ -62,7 +62,7 @@ Documentation/process/howto.rst - "Practical C Programming" by Steve Oualline [O'Reilly] - "C: A Reference Manual" by Harbison and Steele [Prentice Hall] -커ëì GNU Cì GNU í´ì²´ì¸ì ì¬ì©íì¬ ìì±ëìë¤. ì´ í´ë¤ì ISO C11 íì¤ì +커ëì GNU Cì GNU í´ì²´ì¸ì ì¬ì©íì¬ ìì±ëìë¤. ì´ í´ë¤ì ISO C89 íì¤ì ë°ë¥´ë ë°ë©´ íì¤ì ìì§ ìì ë§ì íì¥ê¸°ë¥ë ê°ì§ê³ ìë¤. 커ëì íì¤ C ë¼ì´ë¸ë¬ë¦¬ìë ê´ê³ìì´ freestanding C íê²½ì´ì´ì C íì¤ì ì¼ë¶ë ì§ìëì§ ìëë¤. ììì long long ëë기ë floating pointë ì§ìëì§ ìëë¤. --- a/Documentation/translations/zh_CN/process/howto.rst +++ b/Documentation/translations/zh_CN/process/howto.rst @@ -45,7 +45,7 @@ Linuxå æ ¸å¤§é¨åæ¯ç±Cè¯è¨åæç - "C: A Reference Manual" by Harbison and Steele [Prentice Hall] ãCè¯è¨åèæåï¼å书第5çï¼ãï¼é±ä»²æ½ çè¯ï¼[æºæ¢°å·¥ä¸åºç社] -Linuxå æ ¸ä½¿ç¨GNU CåGNUå·¥å ·é¾å¼åãè½ç¶å®éµå¾ªISO C11æ åï¼ä½ä¹ç¨å°äºä¸äº +Linuxå æ ¸ä½¿ç¨GNU CåGNUå·¥å ·é¾å¼åãè½ç¶å®éµå¾ªISO C89æ åï¼ä½ä¹ç¨å°äºä¸äº æ å䏿²¡æå®ä¹çæ©å±ãå æ ¸æ¯èªç»èªè¶³çCç¯å¢ï¼ä¸ä¾èµäºæ åCåºçæ¯æï¼æä»¥ 并䏿¯æCæ åä¸çé¨åå®ä¹ãæ¯å¦long longç±»åç大æ°é¤æ³åæµ®ç¹è¿ç®å°±ä¸å 许 使ç¨ãææ¶åç¡®å®å¾é¾å¼æ¸ æ¥å æ ¸å¯¹å·¥å ·é¾çè¦æ±åå®æä½¿ç¨çæ©å±ï¼ä¸å¹¸çæ¯ç® --- a/Documentation/translations/zh_TW/process/howto.rst +++ b/Documentation/translations/zh_TW/process/howto.rst @@ -48,7 +48,7 @@ Linuxå §æ ¸å¤§é¨åæ¯ç±Cèªè¨å¯«æç - "C: A Reference Manual" by Harbison and Steele [Prentice Hall] ãCèªè¨åèæåï¼åæ¸ç¬¬5çï¼ãï¼é±ä»²æ½ çè¯ï¼[æ©æ¢°å·¥æ¥åºç社] -Linuxå §æ ¸ä½¿ç¨GNU CåGNUå·¥å ·ééç¼ãéç¶å®éµå¾ªISO C11æ¨æºï¼ä½ä¹ç¨å°äºä¸äº +Linuxå §æ ¸ä½¿ç¨GNU CåGNUå·¥å ·ééç¼ãéç¶å®éµå¾ªISO C89æ¨æºï¼ä½ä¹ç¨å°äºä¸äº æ¨æºä¸æ²æå®ç¾©çæ´å±ãå §æ ¸æ¯èªçµ¦èªè¶³çCç°å¢ï¼ä¸ä¾è³´æ¼æ¨æºCåº«çæ¯æï¼æä»¥ 䏦䏿¯æCæ¨æºä¸çé¨åå®ç¾©ãæ¯å¦long longé¡åç大æ¸é¤æ³åæµ®é»éç®å°±ä¸å 許 使ç¨ãææå確實å¾é£å¼æ¸ æ¥å §æ ¸å°å·¥å ·éçè¦æ±åå®æä½¿ç¨çæ´å±ï¼ä¸å¹¸çæ¯ç® Patches currently in stable-queue which might be from matttbe@kernel.org are queue-5.15/arch-back-to-std-gnu89-in-v5.18.patch queue-5.15/x86-boot-compile-boot-code-with-std-gnu11-too.patch queue-5.15/mptcp-drop-bogus-optimization-in-__mptcp_check_push.patch queue-5.15/mptcp-restore-window-probe.patch queue-5.15/revert-docs-process-howto-replace-c89-with-c11.patch ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-11-03 1:41 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-10-17 16:23 [PATCH 5.15.y 0/3] v5.15: fix build with GCC 15 Matthieu Baerts (NGI0) 2025-10-17 16:24 ` [PATCH 5.15.y 1/3] x86/boot: Compile boot code with -std=gnu11 too Matthieu Baerts (NGI0) 2025-11-03 1:38 ` Patch "x86/boot: Compile boot code with -std=gnu11 too" has been added to the 5.15-stable tree gregkh 2025-10-17 16:24 ` [PATCH 5.15.y 2/3] arch: back to -std=gnu89 in < v5.18 Matthieu Baerts (NGI0) 2025-10-20 13:30 ` Greg Kroah-Hartman 2025-10-20 15:58 ` Matthieu Baerts 2025-11-03 1:41 ` Greg Kroah-Hartman 2025-11-03 1:38 ` Patch "arch: back to -std=gnu89 in < v5.18" has been added to the 5.15-stable tree gregkh 2025-10-17 16:24 ` [PATCH 5.15.y 3/3] Revert "docs/process/howto: Replace C89 with C11" Matthieu Baerts (NGI0) 2025-11-03 1:38 ` Patch "Revert "docs/process/howto: Replace C89 with C11"" has been added to the 5.15-stable tree gregkh
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox