summaryrefslogtreecommitdiff
path: root/src/arch/arm64/armv8
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2023-10-17 11:09:12 -0700
committerFelix Held <felix-coreboot@felixheld.de>2023-12-12 12:23:53 +0000
commit10e60ab49ee97bcf8a47f9fe056acf630117d166 (patch)
tree9ae1d2cf388225e4894e94c92cb3f31458460f3c /src/arch/arm64/armv8
parent3914561ef50a1acf7ac842f7d7caf5589e605902 (diff)
arch/arm64/armv8/Makefile.inc: Add clang -target for .ld CPP
When preprocessing the linker script the target arch needs to be specified. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Id18af3da93d2d06a2ebb83eddd03377c9026c8fa Reviewed-on: https://review.coreboot.org/c/coreboot/+/78443 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/arch/arm64/armv8')
-rw-r--r--src/arch/arm64/armv8/Makefile.inc17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/arch/arm64/armv8/Makefile.inc b/src/arch/arm64/armv8/Makefile.inc
index 15d80e64e8..61961ff3d2 100644
--- a/src/arch/arm64/armv8/Makefile.inc
+++ b/src/arch/arm64/armv8/Makefile.inc
@@ -13,6 +13,11 @@ armv8_flags = -march=$(march) -I$(src)/arch/arm64/include/armv8/ -D__COREBOOT_AR
################################################################################
ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARMV8_64),y)
+ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
+decompressor-ld-ccopts += -target arm64-elf
+bootblock-ld-ccopts += -target arm64-elf
+endif
+
ifneq ($(CONFIG_BOOTBLOCK_CUSTOM),y)
decompressor-y += bootblock.S
ifneq ($(CONFIG_COMPRESS_BOOTBLOCK),y)
@@ -44,6 +49,10 @@ endif
################################################################################
ifeq ($(CONFIG_ARCH_VERSTAGE_ARMV8_64),y)
+ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
+verstage-ld-ccopts += -target arm64-elf
+endif
+
verstage-y += cache.c
verstage-y += cpu.S
verstage-y += exception.c
@@ -57,6 +66,10 @@ endif
################################################################################
ifeq ($(CONFIG_ARCH_ROMSTAGE_ARMV8_64),y)
+ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
+romstage-ld-ccopts += -target arm64-elf
+endif
+
romstage-y += cache.c
romstage-y += cpu.S
romstage-y += exception.c
@@ -73,6 +86,10 @@ endif
################################################################################
ifeq ($(CONFIG_ARCH_RAMSTAGE_ARMV8_64),y)
+ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
+ramstage-ld-ccopts += -target arm64-elf
+endif
+
ramstage-y += cache.c
ramstage-y += cpu.S
ramstage-y += exception.c