@@ -29,6 +29,9 @@ source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in"
# MIPS
source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in"
+# Hexagon
+source "toolchain/toolchain-external/toolchain-external-hexagon/Config.in"
+
# Bootlin toolchains, available for virtually all architectures
source "toolchain/toolchain-external/toolchain-external-bootlin/Config.in"
@@ -123,6 +126,9 @@ source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.opt
# ARM big-endian
source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options"
+# Hexagon
+source "toolchain/toolchain-external/toolchain-external-hexagon/Config.in.options"
+
# MIPS
source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options"
new file mode 100644
@@ -0,0 +1,7 @@
+comment "Toolchains available for Hexagon DSP"
+
+config BR2_TOOLCHAIN_EXTERNAL_HEXAGON
+ bool "Clang/LLVM Hexagon Toolchain"
+ depends on BR2_HOSTARCH = "x86_64" || "aarch64"
+ select BR2_TOOLCHAIN_EXTERNAL_CLANG
+ select BR2_TOOLCHAIN_EXTERNAL_MUSL
new file mode 100644
@@ -0,0 +1,14 @@
+
+if BR2_TOOLCHAIN_EXTERNAL_HEXAGON
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+ default "hexagon-unknown-linux-musl"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+ default "toolchain-external-hexagon"
+
+# This feature is not well-tested:
+config BR2_TOOLCHAIN_SUPPORTS_PIE
+ default "n"
+
+endif
new file mode 100644
@@ -0,0 +1,6 @@
+# From https://artifacts.codelinaro.org/artifactory/codelinaro-toolchain-for-hexagon/19.1.2/SHA256SUMS:
+sha256 082ce7e7b2955a79be4198123a6ff743fddaed6e2da4f0a1974f0153478fb372 clang+llvm-19.1.2-cross-hexagon-unknown-linux-musl.tar.xz
+sha256 c06958b1a6d73e32cc3fc08b5ec15ea3e1f41180defe3142c91e06e05ad70f0b clang+llvm-19.1.2-cross-hexagon-unknown-linux-musl_aarch64-linux-gnu.tar.xz
+sha256 2c91bcca2d1645987723af7916184f81f287b7b94ab837dd429c8233899ce54d clang+llvm-19.1.2-cross-hexagon-unknown-linux-musl_aarch64-windows-gnu.tar.xz
+sha256 1e5ef2a070255a917acbce644d4977fc0c19f82105c375f5260bb573cd4bbf0f clang+llvm-19.1.2-cross-hexagon-unknown-linux-musl_x86_64-linux-musl.tar.xz
+sha256 f758e9e19ceac201ddd869a9aff6ffe623339e91329f7daf90960cf6218af278 clang+llvm-19.1.2-cross-hexagon-unknown-linux-musl_x86_64-windows-gnu.tar.xz
new file mode 100644
@@ -0,0 +1,14 @@
+################################################################################
+#
+# toolchain-external-hexagon
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_HEXAGON_VERSION = 19.1.2
+TOOLCHAIN_EXTERNAL_HEXAGON_SITE= https://artifacts.codelinaro.org/artifactory/codelinaro-toolchain-for-hexagon/$(TOOLCHAIN_EXTERNAL_HEXAGON_VERSION)
+TOOLCHAIN_EXTERNAL_HEXAGON_SOURCE = clang+llvm-$(TOOLCHAIN_EXTERNAL_HEXAGON_VERSION)-cross-$(TOOLCHAIN_EXTERNAL_PREFIX).tar.xz
+
+# No trampoline support in lld yet, so for now:
+TOOLCHAIN_EXTERNAL_HEXAGON_CFLAGS += -mlong-calls
+
+$(eval $(toolchain-external-package))
Signed-off-by: Brian Cain <bcain@quicinc.com> --- toolchain/toolchain-external/Config.in | 6 ++++++ .../toolchain-external-hexagon/Config.in | 7 +++++++ .../toolchain-external-hexagon/Config.in.options | 14 ++++++++++++++ .../toolchain-external-hexagon.hash | 6 ++++++ .../toolchain-external-hexagon.mk | 14 ++++++++++++++ 5 files changed, 47 insertions(+) create mode 100644 toolchain/toolchain-external/toolchain-external-hexagon/Config.in create mode 100644 toolchain/toolchain-external/toolchain-external-hexagon/Config.in.options create mode 100644 toolchain/toolchain-external/toolchain-external-hexagon/toolchain-external-hexagon.hash create mode 100644 toolchain/toolchain-external/toolchain-external-hexagon/toolchain-external-hexagon.mk