Skip to contentSkip to conversation

opensbi: Pass GCC_TARGET_ARCH to -march

PATCH New Jesse Taube 1 participant 1 message Jun 4

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opensbi: Pass GCC_TARGET_ARCH to -march

From: Jesse Taube <[email protected]>

Use GCC_TARGET_ARCH to set PLATFORM_RISCV_ISA which sets the -march option in gcc when building opensbu. This allows opensbi to be built with additional extensions pass in the BR2_RISCV_ISA_EXTRA option.

---
 boot/opensbi/opensbi.mk | 4 ++++
 1 file changed, 4 insertions(+)
boot/opensbi/opensbi.mk +4 -0
index f9f550176f..e1bf9cb443 100644
@@ -32,6 +32,10 @@ OPENSBI_MAKE_ENV = \
 	CROSS_COMPILE=$(TARGET_CROSS) \
 	$(call qstrip,$(BR2_TARGET_OPENSBI_ADDITIONAL_VARIABLES))
 
+ifneq ($(GCC_TARGET_ARCH),)
+OPENSBI_MAKE_ENV += PLATFORM_RISCV_ISA="$(GCC_TARGET_ARCH)"
+endif
+
 OPENSBI_PLAT = $(call qstrip,$(BR2_TARGET_OPENSBI_PLAT))
 ifneq ($(OPENSBI_PLAT),)
 OPENSBI_MAKE_ENV += PLATFORM=$(OPENSBI_PLAT)
Signature · 6 lines
2.53.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot