From nobody Fri Oct 31 23:15:44 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 AAECD1C6A3; Fri, 17 Oct 2025 17:33:57 +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=1760722437; cv=none; b=JdvASWvf6yZM6ZcAJ+UvDRSJ9YdeIbhaGpsUSorIK/1+u146UXLzqdI1sa+HhLY3WqggIiOHnn3Isi7jekXlYKRxtJZWFNmIso1lmphL1JU1wBrbmZuGy0ySVGbW7hZYZcv3Wp2NUESQuTo+m9g5LhOdUARjpld8ddasv5PsTT8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760722437; c=relaxed/simple; bh=yT/exZAwSgNTWXWPg6lAIP7rb6scxbRZ8v/wejJx7Sw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MrLSCY3myynzLZwXqMhqtKZeC8ty3yDFIcq7sJKXt9AergPsPafigu7A5wtjg5notHo5nZNRl+3GbO6lLhVz5hX+NUKKpBEGFMU/KpEsK/zB8lAjE2hY8kZhXuk+BbXR0tRGv0iPHdWGCfWSE0Aa8H0DYtbFZ9M6BPjuS8TF75Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lsq7R4KM; 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="lsq7R4KM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFB3BC113D0; Fri, 17 Oct 2025 17:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760722437; bh=yT/exZAwSgNTWXWPg6lAIP7rb6scxbRZ8v/wejJx7Sw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=lsq7R4KMdh0Dqu158vl43PhsQHA6w6GvulZ2S43Nn5t9EyI8vFLL3yJ2XGHN5FyLd nfh08F3kkggjI0LGN2bcuWKAjvEOuaAHQ020Ka/9XPWcDrO+usX7qMMobvNRU6eJQr mLsqOSvFaLkOZQ01s+avGeGWou5xiJxkBxauRlFHCMvw8joVWLT3C2ci2XiL/TP9vD NUlivpPSa+L6KkAKAuRoqholIbv2I55/MYv4xailR78ag8XQkwKAqRGa76Gk9/SD/O /pTC4q5K44dFDo89wHzM3BFhN6/iEQjiq+PJ5XlWXKlVPsg7gGQLirYaTGDW4SHcQC bJAWzkUS2HQLQ== From: "Matthieu Baerts (NGI0)" Date: Fri, 17 Oct 2025 19:33:39 +0200 Subject: [PATCH 5.4.y 2/5] efi: libstub: Use '-std=gnu11' to fix build with GCC 15 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-4-gcc-15-v1-2-6d6367ee50a1@kernel.org> References: <20251017-v5-4-gcc-15-v1-0-6d6367ee50a1@kernel.org> In-Reply-To: <20251017-v5-4-gcc-15-v1-0-6d6367ee50a1@kernel.org> To: stable@vger.kernel.org, Greg Kroah-Hartman , Sasha Levin Cc: MPTCP Upstream , "Matthieu Baerts (NGI0)" , Nathan Chancellor , Kostadin Shishmanov , Jakub Jelinek , Ard Biesheuvel X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2401; i=matttbe@kernel.org; h=from:subject:message-id; bh=ELW/Y8j9ZMNwC5DLPH9KGkFyK2XO4/+Obnzq5n+sFLQ=; b=owGbwMvMwCVWo/Th0Gd3rumMp9WSGDI+1f4UucbFl/RO/23wwoTiVRfzdjJXTQ4N33Dmf39lz mIvnRLRjlIWBjEuBlkxRRbptsj8mc+reEu8/Cxg5rAygQxh4OIUgIlkTmL47/csZfrsAP3Hys8m eXdr6JxcEJFyzlvAwMhP/wtbf27nFEaGtslaYg3GUYZhCYk73yxUMJymZB3Df953zinmtRFbVWZ yAwA= X-Developer-Key: i=matttbe@kernel.org; a=openpgp; fpr=E8CB85F76877057A6E27F77AF6B7824F4269A073 From: Nathan Chancellor commit 8ba14d9f490aef9fd535c04e9e62e1169eb7a055 upstream. GCC 15 changed the default C standard version to C23, which should not have impacted the kernel because it requests the gnu11 standard via '-std=3D' in the main Makefile. However, the EFI libstub Makefile uses its own set of KBUILD_CFLAGS for x86 without a '-std=3D' value (i.e., using the default), resulting in errors from the kernel's definitions of bool, true, and false in stddef.h, which are reserved keywords under C23. ./include/linux/stddef.h:11:9: error: expected identifier before =E2=80= =98false=E2=80=99 11 | false =3D 0, ./include/linux/types.h:35:33: error: two or more data types in declarati= on specifiers 35 | typedef _Bool bool; Set '-std=3Dgnu11' in the x86 cflags to resolve the error and consistently use the same C standard version for the entire kernel. All other architectures reuse KBUILD_CFLAGS from the rest of the kernel, so this issue is not visible for them. Cc: stable@vger.kernel.org Reported-by: Kostadin Shishmanov Closes: https://lore.kernel.org/4OAhbllK7x4QJGpZjkYjtBYNLd_2whHx9oFiuZcGwtV= R4hIzvduultkgfAIRZI3vQpZylu7Gl929HaYFRGeMEalWCpeMzCIIhLxxRhq4U-Y=3D@protonm= ail.com/ Reported-by: Jakub Jelinek Closes: https://lore.kernel.org/Z4467umXR2PZ0M1H@tucnak/ Signed-off-by: Nathan Chancellor Signed-off-by: Ard Biesheuvel [ Conflict in the context, because commit bbf8e8b0fe04 ("efi/libstub: Optimize for size instead of speed") is not in this version. '-std=3Dgnu11' can still be added at the same place. ] Signed-off-by: Matthieu Baerts (NGI0) --- drivers/firmware/efi/libstub/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/l= ibstub/Makefile index 8c5b5529dbc0..0dc80564bbd2 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -7,7 +7,7 @@ # cflags-$(CONFIG_X86_32) :=3D -march=3Di386 cflags-$(CONFIG_X86_64) :=3D -mcmodel=3Dsmall -cflags-$(CONFIG_X86) +=3D -m$(BITS) -D__KERNEL__ -O2 \ +cflags-$(CONFIG_X86) +=3D -m$(BITS) -D__KERNEL__ -O2 -std=3Dgnu11 \ -fPIC -fno-strict-aliasing -mno-red-zone \ -mno-mmx -mno-sse -fshort-wchar \ -Wno-pointer-sign \ --=20 2.51.0