diff mbox series

[RFC,03/12] toolchain/toolchain-external: add hexagon support for toolchain-wrapper

Message ID 20241025140714.2395033-4-bcain@quicinc.com
State New
Headers show
Series add hexagon architecture | expand

Commit Message

Brian Cain Oct. 25, 2024, 2:07 p.m. UTC
Signed-off-by: Brian Cain <bcain@quicinc.com>
---
 .../toolchain-external/pkg-toolchain-external.mk      | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
index c08bf0a653..d45f2c54de 100644
--- a/toolchain/toolchain-external/pkg-toolchain-external.mk
+++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
@@ -150,8 +150,14 @@  endef
 endif
 
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
+ifeq ($(BR2_hexagon),y)
+TOOLCHAIN_EXTERNAL_LIBS += libc.so libclang_rt.builtins-hexagon.so*
+TOOLCHAIN_EXTERNAL_LIBS += libc++.so* libc++abi.so* libunwind.so*
+TOOLCHAIN_EXTERNAL_LIBS += ld-musl-*.so*
+else
 TOOLCHAIN_EXTERNAL_LIBS += libc.so
 endif
+endif
 
 ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
 TOOLCHAIN_EXTERNAL_LIBS += libstdc++.so.*
@@ -283,7 +289,7 @@  define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER
 		*-ar|*-ranlib|*-nm) \
 			ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \
 			;; \
-		*cc|*cc-*|*++|*++-*|*cpp|*-gfortran|*-gdc) \
+		*cc|*cc-*|*++|*++-*|*cpp|*-gfortran|*-gdc|*clang) \
 			ln -sf toolchain-wrapper $$base; \
 			;; \
 		*gdb|*gdbtui) \
@@ -465,6 +471,9 @@  define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS
 	else \
 		ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \
 	fi ; \
+	if test "$(BR2_hexagon)" = "y"; then \
+		SUPPORT_LIB_DIR=$(TOOLCHAIN_EXTERNAL_BIN)/../target/$(TOOLCHAIN_EXTERNAL_PREFIX); \
+	fi ; \
 	$(call MESSAGE,"Copying external toolchain sysroot to staging...") ; \
 	$(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR})
 endef