From nobody Fri Oct 31 23:15:38 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95B2E23536B; Fri, 17 Oct 2025 16:24:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760718257; cv=none; b=JGq7tIAMqgOKonoRR/eAQvq3lbUkcXo8flwL+A1uVSRtFuaOaiKybo2g/+hzLasdqDlf2d0z6puZ9SW466z7vNS69BkGcM8AHXHK5USXYMDyvYs8kwr8FAWkQBLJOHyAPO/afRtKFPFFPXcO/ZFgpjp9m+KXCOYulNOjAbXbXnY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760718257; c=relaxed/simple; bh=sEpXyWc8WPx+wgGW++vXxjuzS6Puz8c7VQa7fhvyQus=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SfL+KNrSOLszrH+Fi7uov93Q1HSyd5oIsq3C4MhQJz0bbZkmdcFPvpEq8q6/Txyyi7vnUuXmzaxXOgQhiLWmyeYFe09UYTjKTUCUlMj/mSg5aZ5X8iEjuDkqqtq0oS4hsAtwEpbs+QStYwRxdU/KT/oiPvXU/+/iLX5/4QliKs0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ljzn0BO8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ljzn0BO8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50B6EC113D0; Fri, 17 Oct 2025 16:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760718257; bh=sEpXyWc8WPx+wgGW++vXxjuzS6Puz8c7VQa7fhvyQus=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Ljzn0BO8rpBEDzd5EJgDMeLX2YxZIlbHDdBt6q3Xsb8P9nF6E1WeZXwWmDWNv39ut sSUqh7Fi3uLDFMcQEDqGQ1MumVrINjuTv8+HjPvb3y1fFGqeKome0k67AMpnvIsLyi /rusmz7ixcLjPANI4DcH7vFgor+tl7xMfc008bqhKDhpW9ZL8FHbIQQsHBCYpN9U4g FCefp8kR0wK/aNYZtDobiNO/3MqBMKsP3igB07AObjAetGNntRO4DRCUJzDfgjl/Qk wVgsDScWxd/kSlNIBY/aU9DG7+UMASPugj6TnBYS2MiGJMLjFQnMgl/+4hV071FrYR gHjpafY0b3HBA== From: "Matthieu Baerts (NGI0)" Date: Fri, 17 Oct 2025 18:24:00 +0200 Subject: [PATCH 5.15.y 1/3] x86/boot: Compile boot code with -std=gnu11 too Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251017-v5-15-gcc-15-v1-1-da6c065049d7@kernel.org> References: <20251017-v5-15-gcc-15-v1-0-da6c065049d7@kernel.org> In-Reply-To: <20251017-v5-15-gcc-15-v1-0-da6c065049d7@kernel.org> To: stable@vger.kernel.org, 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 X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2817; i=matttbe@kernel.org; h=from:subject:message-id; bh=C8xXiN4qk+ttj1GqxqW+f7yllK4/pnw5yfZZS2EX2Cg=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDI+5a4QTDsvdKHwzJPJwTVGM4qXfPqmUWKZdvGSu93qD aXTvbhUOkpZGMS4GGTFFFmk2yLzZz6v4i3x8rOAmcPKBDKEgYtTACayzJ+RYY5t3E2+2fWTjR9d dlm0V7D+0f79zWodkySXXDP9IbduewEjw3ubYL0Y/dOuu6RKz/Mc7YuaHXPph1XEYd2Z7hNMHp5 5zwkA X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Alexey Dobriyan commit b3bee1e7c3f2b1b77182302c7b2131c804175870 upstream. Use -std=3Dgnu11 for consistency with main kernel code. It doesn't seem to change anything in vmlinux. Signed-off-by: Alexey Dobriyan Signed-off-by: Ingo Molnar Acked-by: H. Peter Anvin (Intel) 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 enume= ration constant 11 | false =3D 0, | ^~~~~ include/linux/stddef.h:11:9: note: 'false' is a keyword with '-std=3Dc2= 3' onwards include/linux/types.h:30:33: error: 'bool' cannot be defined via 'typed= ef' 30 | typedef _Bool bool; | ^~~~ include/linux/types.h:30:33: note: 'bool' is a keyword with '-std=3Dc23= ' onwards include/linux/types.h:30:1: warning: useless type name in empty declara= tion 30 | typedef _Bool bool; | ^~~~~~~ The fix is similar to commit ee2ab467bddf ("x86/boot: Use '-std=3Dgnu11' to fix build with GCC 15") which has been backported to this kernel. Note: In < 5.18 version, -std=3Dgnu89 is used instead of -std=3Dgnu11, see commit e8c07082a810 ("Kbuild: move to -std=3Dgnu11"). I suggest not to modify that in this commit here as all the other similar fixes to support GCC 15 set -std=3Dgnu11. This can be done in a dedicated commit if needed. ] Signed-off-by: Matthieu Baerts (NGI0) --- Cc: Nathan Chancellor Cc: Dave Hansen Cc: Ard Biesheuvel --- 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 =20 # How to compile the 16-bit code. Note we always compile for -march=3Di38= 6; # that way we can complain to the user if the CPU is insufficient. -REALMODE_CFLAGS :=3D -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EX= PORTS \ +REALMODE_CFLAGS :=3D -std=3Dgnu11 -m16 -g -Os -DDISABLE_BRANCH_PROFILING -= D__DISABLE_EXPORTS \ -Wall -Wstrict-prototypes -march=3Di386 -mregparm=3D3 \ -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ -mno-mmx -mno-sse $(call cc-option,-fcf-protection=3Dnone) --=20 2.51.0