aboutsummaryrefslogtreecommitdiff
path: root/src/arch/riscv
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2023-05-23 12:38:19 +0200
committerFelix Singer <service+coreboot-gerrit@felixsinger.de>2023-06-11 19:23:34 +0000
commitcf827af370f9e4c8ab41d1e68a6f15ab8721e57a (patch)
treefa54df75b827aacb64ecbef36c2cc3f0e1c0bfde /src/arch/riscv
parent5c2a2e1bb3902a1dced153507a201a180d9c040c (diff)
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>
Diffstat (limited to 'src/arch/riscv')
-rw-r--r--src/arch/riscv/Makefile.inc4
1 files changed, 3 insertions, 1 deletions
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)" \