All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: adobriyan@gmail.com,ardb@kernel.org,dave.hansen@linux.intel.com,gregkh@linuxfoundation.org,hpa@zytor.com,matttbe@kernel.org,mingo@kernel.org,mptcp@lists.linux.dev,nathan@kernel.org,sashal@kernel.org
Cc: <stable-commits@vger.kernel.org>
Subject: Patch "x86/boot: Compile boot code with -std=gnu11 too" has been added to the 5.15-stable tree
Date: Mon, 03 Nov 2025 10:38:11 +0900	[thread overview]
Message-ID: <2025110311-attractor-parameter-4e55@gregkh> (raw)
In-Reply-To: <20251017-v5-15-gcc-15-v1-1-da6c065049d7@kernel.org>


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

  reply	other threads:[~2025-11-03  1:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` gregkh [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025110311-attractor-parameter-4e55@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=adobriyan@gmail.com \
    --cc=ardb@kernel.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=matttbe@kernel.org \
    --cc=mingo@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable-commits@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.