Felix Singer has submitted this change. ( https://review.coreboot.org/c/coreboot/+/75397?usp=email )
Change subject: arch/riscv: Always build opensbi with GCC ......................................................................
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 --- M src/arch/riscv/Makefile.inc 1 file changed, 3 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Felix Singer: Looks good to me, approved Elyes Haouas: Looks good to me, approved Daniel Maslowski: Looks good to me, but someone else must approve
diff --git a/src/arch/riscv/Makefile.inc b/src/arch/riscv/Makefile.inc index cc553c9..e177a00 100644 --- a/src/arch/riscv/Makefile.inc +++ b/src/arch/riscv/Makefile.inc @@ -178,12 +178,14 @@ 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)" \