arch/riscv: Always build opensbi with GCC

Building with clang is currently broken as /usr/bin/ld.bfd is used
rather than the proper crosstoolchain linker.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: Idd8006a26b2c2f9f777fdffe231c3c774320d805
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75397
Reviewed-by: Daniel Maslowski <info@orangecms.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Arthur Heymans 2023-05-23 12:38:19 +02:00 committed by Felix Singer
parent 5c2a2e1bb3
commit cf827af370
1 changed files with 3 additions and 1 deletions

View File

@ -178,12 +178,14 @@ OPENSBI_BUILD := $(abspath $(obj)/3rdparty/opensbi)
OPENSBI_TARGET := $(OPENSBI_BUILD)/platform/$(CONFIG_OPENSBI_PLATFORM)/firmware/fw_dynamic.elf
OPENSBI := $(obj)/opensbi.elf
# TODO: Building with clang has troubles finding the proper linker.
# Always use GCC for now.
$(OPENSBI_TARGET): $(obj)/config.h | $(OPENSBI_SOURCE)
printf " MAKE $(subst $(obj)/,,$(@))\n"
mkdir -p $(OPENSBI_BUILD)
$(MAKE) \
-C "$(OPENSBI_SOURCE)" \
CC="$(CC_ramstage) -fno-builtin" \
CC="$(GCC_ramstage) -fno-builtin" \
LD="$(LD_ramstage)" \
OBJCOPY="$(OBJCOPY_ramstage)" \
AR="$(AR_ramstage)" \