arm/armv7/Makefile.inc: Fix processing ld files with clang

When processing linker scripts clang needs to be set for the proper
target or it gets confused by other options.

Change-Id: I040aa14a06c728269ca1026e0002392e5ac8fef8
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69744
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Arthur Heymans 2022-11-17 12:11:14 +01:00 committed by Martin L Roth
parent 8d9cce1e09
commit c83a17841c
1 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,12 @@ armv7-r_flags = -march=armv7-r $(armv7_flags) -D__COREBOOT_ARM_V7_R__
armv7_asm_flags = -Wa,-mthumb -Wa,-mimplicit-it=always
ifeq ($(CONFIG_COMPILER_GCC),y)
armv7_asm_flags += -Wa,-mno-warn-deprecated
else # CLANG
bootblock-ld-ccopts += -target arm-eabi
verstage-ld-ccopts += -target arm-eabi
romstage-ld-ccopts += -target arm-eabi
ramstage-ld-ccopts += -target arm-eabi
rmodule_arm-ld-ccopts += -target arm-eabi
endif
armv7-r_asm_flags = $(armv7-r_flags) $(armv7_asm_flags)