arch/x86/id.S: Fix building with clang

Commit 0e688b113d (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 <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61927
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
This commit is contained in:
Angel Pons 2022-02-14 11:51:04 +01:00 committed by Felix Held
parent 17fbf58fdb
commit c063b5d08e
1 changed files with 1 additions and 1 deletions

View File

@ -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 */