public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.4.y 0/5] v5.4: fix build with GCC 15
@ 2025-10-17 17:33 Matthieu Baerts (NGI0)
  2025-10-17 17:33 ` [PATCH 5.4.y 1/5] x86/boot: Use '-std=gnu11' to " Matthieu Baerts (NGI0)
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Matthieu Baerts (NGI0) @ 2025-10-17 17:33 UTC (permalink / raw)
  To: stable, Greg Kroah-Hartman, Sasha Levin
  Cc: MPTCP Upstream, Matthieu Baerts (NGI0), Nathan Chancellor,
	Kostadin Shishmanov, Jakub Jelinek, Dave Hansen, Ard Biesheuvel,
	Alexey Dobriyan, Ingo Molnar, H. Peter Anvin (Intel),
	Arnd Bergmann, Nathan Chancellor, Andrew Morton, Thomas Gleixner,
	Linus Torvalds

Two backports linked to build issues with GCC 15 have failed in this
version:

  - ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15")
  - 8ba14d9f490a ("efi: libstub: Use '-std=gnu11' to fix build with GCC 15")

Conflicts have been solved, and described.

After that, this kernel version still didn'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 patch 3.

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 4 fixes that.

Finally, I noticed extra warnings I didn't have in v5.10. Patch 5 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) (1):
      arch: back to -std=gnu89 in < v5.18

Nathan Chancellor (3):
      x86/boot: Use '-std=gnu11' to fix build with GCC 15
      efi: libstub: Use '-std=gnu11' to fix build with GCC 15
      kernel/profile.c: use cpumask_available to check for NULL cpumask

 arch/parisc/boot/compressed/Makefile  | 2 +-
 arch/s390/Makefile                    | 2 +-
 arch/s390/purgatory/Makefile          | 2 +-
 arch/x86/Makefile                     | 2 +-
 arch/x86/boot/compressed/Makefile     | 1 +
 drivers/firmware/efi/libstub/Makefile | 2 +-
 kernel/profile.c                      | 6 +++---
 7 files changed, 9 insertions(+), 8 deletions(-)
---
base-commit: cda7d335d88aa30485536aee3027540f41bf4f10
change-id: 20251017-v5-4-gcc-15-2d2ccb30432c

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


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

end of thread, other threads:[~2025-10-20 15:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17 17:33 [PATCH 5.4.y 0/5] v5.4: fix build with GCC 15 Matthieu Baerts (NGI0)
2025-10-17 17:33 ` [PATCH 5.4.y 1/5] x86/boot: Use '-std=gnu11' to " Matthieu Baerts (NGI0)
2025-10-17 17:33 ` [PATCH 5.4.y 2/5] efi: libstub: " Matthieu Baerts (NGI0)
2025-10-17 17:33 ` [PATCH 5.4.y 3/5] x86/boot: Compile boot code with -std=gnu11 too Matthieu Baerts (NGI0)
2025-10-17 17:33 ` [PATCH 5.4.y 4/5] arch: back to -std=gnu89 in < v5.18 Matthieu Baerts (NGI0)
2025-10-17 17:33 ` [PATCH 5.4.y 5/5] kernel/profile.c: use cpumask_available to check for NULL cpumask Matthieu Baerts (NGI0)
2025-10-20 13:29 ` [PATCH 5.4.y 0/5] v5.4: fix build with GCC 15 Greg Kroah-Hartman
2025-10-20 15:59   ` Matthieu Baerts

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