From cf827af370f9e4c8ab41d1e68a6f15ab8721e57a Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Tue, 23 May 2023 12:38:19 +0200 Subject: [PATCH] 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 Change-Id: Idd8006a26b2c2f9f777fdffe231c3c774320d805 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75397 Reviewed-by: Daniel Maslowski Reviewed-by: Felix Singer Reviewed-by: Elyes Haouas Tested-by: build bot (Jenkins) --- src/arch/riscv/Makefile.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/arch/riscv/Makefile.inc b/src/arch/riscv/Makefile.inc index cc553c938d..e177a00f87 100644 --- a/src/arch/riscv/Makefile.inc +++ b/src/arch/riscv/Makefile.inc @@ -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)" \