MPTCP Linux Development
 help / color / mirror / Atom feed
* [PATCH 5.10.y 0/3] v5.10: fix build with GCC 15
@ 2025-10-17 16:53 Matthieu Baerts (NGI0)
  2025-10-17 16:53 ` [PATCH 5.10.y 1/3] x86/boot: Compile boot code with -std=gnu11 too Matthieu Baerts (NGI0)
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Matthieu Baerts (NGI0) @ 2025-10-17 16:53 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, Douglas Raillard,
	Masami Hiramatsu (Google), Steven Rostedt (Google),
	Mathieu Desnoyers

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 stable versions. 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 an extra warning that I didn't have in v5.15. 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
      tracing: fix declaration-after-statement warning

 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 +-
 kernel/trace/trace_events_synth.c     | 3 ++-
 7 files changed, 8 insertions(+), 7 deletions(-)
---
base-commit: a32db271d59d9f35f3a937ac27fcc2db1e029cdc
change-id: 20251017-v5-10-gcc-15-ad2510f784f7

Best regards,
-- 
Matthieu Baerts (NGI0) <matttbe@kernel.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-11-03  1:44 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:53 [PATCH 5.10.y 0/3] v5.10: fix build with GCC 15 Matthieu Baerts (NGI0)
2025-10-17 16:53 ` [PATCH 5.10.y 1/3] x86/boot: Compile boot code with -std=gnu11 too Matthieu Baerts (NGI0)
2025-11-03  1:43   ` Patch "x86/boot: Compile boot code with -std=gnu11 too" has been added to the 5.10-stable tree gregkh
2025-10-17 16:53 ` [PATCH 5.10.y 2/3] arch: back to -std=gnu89 in < v5.18 Matthieu Baerts (NGI0)
2025-11-03  1:43   ` Patch "arch: back to -std=gnu89 in < v5.18" has been added to the 5.10-stable tree gregkh
2025-10-17 16:53 ` [PATCH 5.10.y 3/3] tracing: fix declaration-after-statement warning Matthieu Baerts (NGI0)
2025-11-03  1:43   ` Patch "tracing: fix declaration-after-statement warning" has been added to the 5.10-stable tree gregkh
2025-10-20 13:32 ` [PATCH 5.10.y 0/3] v5.10: fix build with GCC 15 Greg Kroah-Hartman
2025-10-20 16:00   ` Matthieu Baerts
2025-10-31  8:10 ` Philip Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox