From c063b5d08e1772ab5dda68597079f233f632b2c3 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Mon, 14 Feb 2022 11:51:04 +0100 Subject: [PATCH] arch/x86/id.S: Fix building with clang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 0e688b113d7fd98dfdb69cd0a407c8efcd968456 (arch/x86/id.S: Fix building with clang) broke building with GCC 8.3 so this approach should work for both GCC 8.3 and clang. The clang error is: CC bootblock/arch/x86/id.o /tmp/id-35b17a.s:35:7: error: expected relocatable expression .long - ver ^ /tmp/id-35b17a.s:36:7: error: expected relocatable expression .long - vendor ^ /tmp/id-35b17a.s:37:7: error: expected relocatable expression .long - part ^ Change-Id: Ide3d313800641d4d9b5f79127f84d9fdb4ec2b96 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/61927 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Kyösti Mälkki Reviewed-by: Elyes Haouas Reviewed-by: Paul Menzel --- src/arch/x86/id.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/x86/id.S b/src/arch/x86/id.S index b569178ab8..64f7a799b0 100644 --- a/src/arch/x86/id.S +++ b/src/arch/x86/id.S @@ -11,7 +11,7 @@ vendor: part: .asciz CONFIG_MAINBOARD_PART_NUMBER -#if ENV_X86_64 +#if ENV_X86_64 || defined(__clang__) .long 0xffffffff - ver + 1 /* Reverse offset to the version */ .long 0xffffffff - vendor + 1 /* Reverse offset to the vendor id */ .long 0xffffffff - part + 1 /* Reverse offset to the part number */