From mboxrd@z Thu Jan 1 00:00:00 1970 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 5EB60281375; Thu, 13 Feb 2025 14:41:54 +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=1739457714; cv=none; b=Yh9K8zRWO92iKjafvvrmOuPSbETA59TKzY7kXRSQUHlTx6A7h8OBtGFHMtPxmJM1bQwUk1tsQVOvxZDy9fkuwXOnFkUXb8dntvXeF8pHDBvWG2v6MQzNkC9wMZ270bD+ofDesB7C5rsXvmthhBfxBPWlL2HYZ+6fM8pDfQ91lGI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739457714; c=relaxed/simple; bh=jkEoVhYWGKvFr+H3GZWbUyvFnpYhtsDNJbPTNNvh06k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lt2Rkk5YBCAiUxBw75VZFkB7p/MFwJbjUlUcllr3nF4K9yEc1Tlvg+/0cBP5eYofFN/SEeBDiUeVil8nLhYa/H55I4AG+oPsamZbq8iJJFMlvZM1nozpZBvwea4437G5i1UQvUgwelFDUgU0TEVfEhuz35u2CnL85BoDB6xLY+U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=drTPLDPI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="drTPLDPI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C37D1C4CED1; Thu, 13 Feb 2025 14:41:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739457714; bh=jkEoVhYWGKvFr+H3GZWbUyvFnpYhtsDNJbPTNNvh06k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=drTPLDPIaRrM1cNb7KA1D8phWxPJ4RR/fG6FOLbm4+CPS7KqIjY1Bcd/egO/R8FY3 giP21ttXH/kgh9SAOZ3yYoEkWNbvb6U8RipoxTCsAVd25orMnKp20pW9vlkhMAaD23 gqTqmU/vBXgv9eilZjARdLtBbpZFcTv1CKY9lCZc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kostadin Shishmanov , Jakub Jelinek , Nathan Chancellor , Ard Biesheuvel Subject: [PATCH 6.12 191/422] efi: libstub: Use -std=gnu11 to fix build with GCC 15 Date: Thu, 13 Feb 2025 15:25:40 +0100 Message-ID: <20250213142443.915921476@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250213142436.408121546@linuxfoundation.org> References: <20250213142436.408121546@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ 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=' in the main Makefile. However, the EFI libstub Makefile uses its own set of KBUILD_CFLAGS for x86 without a '-std=' 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 ‘false’ 11 | false = 0, ./include/linux/types.h:35:33: error: two or more data types in declaration specifiers 35 | typedef _Bool bool; Set '-std=gnu11' 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_2whHx9oFiuZcGwtVR4hIzvduultkgfAIRZI3vQpZylu7Gl929HaYFRGeMEalWCpeMzCIIhLxxRhq4U-Y=@protonmail.com/ Reported-by: Jakub Jelinek Closes: https://lore.kernel.org/Z4467umXR2PZ0M1H@tucnak/ Signed-off-by: Nathan Chancellor Signed-off-by: Ard Biesheuvel Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/efi/libstub/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -11,7 +11,7 @@ cflags-y := $(KBUILD_CFLAGS) cflags-$(CONFIG_X86_32) := -march=i386 cflags-$(CONFIG_X86_64) := -mcmodel=small -cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ \ +cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ -std=gnu11 \ -fPIC -fno-strict-aliasing -mno-red-zone \ -mno-mmx -mno-sse -fshort-wchar \ -Wno-pointer-sign \