package/{rust, rust-bin}: support additional host architectures

There are host toolchains available for non-x86/x86_64 architectures,
add them as supported along with their toolchain hashes.

Note that the gcc riscv64-unknown-linux-gnu arch needs to be mapped
to the rust riscv64gc-unknown-linux-gnu arch.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
James Hilliard 2022-04-03 18:41:38 -06:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent aeee90ec10
commit f986b26551
3 changed files with 37 additions and 2 deletions

View File

@ -1,6 +1,30 @@
# From https://static.rust-lang.org/dist/rust-1.58.1-aarch64-unknown-linux-gnu.tar.xz.sha256
# Verified using https://static.rust-lang.org/dist/rust-1.58.1-aarch64-unknown-linux-gnu.tar.xz.asc
sha256 0a80900aa160de4292b1174e25f183bd88f6c2fbb3056a59fcb4d658c70084cb rust-1.58.1-aarch64-unknown-linux-gnu.tar.xz
# From https://static.rust-lang.org/dist/rust-1.58.1-i686-unknown-linux-gnu.tar.xz.sha256
# Verified using https://static.rust-lang.org/dist/rust-1.58.1-i686-unknown-linux-gnu.tar.xz.asc
sha256 110ca4967351d8535f3d39e24f40e2941c20346c5765d3530270e134ae50568e rust-1.58.1-i686-unknown-linux-gnu.tar.xz
# From https://static.rust-lang.org/dist/rust-1.58.1-mips-unknown-linux-gnu.tar.xz.sha256
# Verified using https://static.rust-lang.org/dist/rust-1.58.1-mips-unknown-linux-gnu.tar.xz.asc
sha256 01d2e69ed06fbc05a779a7d09f99d0b54a0d10fef9a7dcd0ea07866d57900ca2 rust-1.58.1-mips-unknown-linux-gnu.tar.xz
# From https://static.rust-lang.org/dist/rust-1.58.1-mipsel-unknown-linux-gnu.tar.xz.sha256
# Verified using https://static.rust-lang.org/dist/rust-1.58.1-mipsel-unknown-linux-gnu.tar.xz.asc
sha256 0b8fafb75e06ba9d4ca58f2cde3179a677908aed8be64e798fc107135839c480 rust-1.58.1-mipsel-unknown-linux-gnu.tar.xz
# From https://static.rust-lang.org/dist/rust-1.58.1-powerpc-unknown-linux-gnu.tar.xz.sha256
# Verified using https://static.rust-lang.org/dist/rust-1.58.1-powerpc-unknown-linux-gnu.tar.xz.asc
sha256 00216feea0a6468e9ce57c7d3ad50e22fe888dfc9aabc34128e1f4b02c5a09b9 rust-1.58.1-powerpc-unknown-linux-gnu.tar.xz
# From https://static.rust-lang.org/dist/rust-1.58.1-powerpc64-unknown-linux-gnu.tar.xz.sha256
# Verified using https://static.rust-lang.org/dist/rust-1.58.1-powerpc64-unknown-linux-gnu.tar.xz.asc
sha256 f6f870875d9adbe5a8b7bb6f61c44b6c54381e5dff50b4d2cdce50d18a8a541e rust-1.58.1-powerpc64-unknown-linux-gnu.tar.xz
# From https://static.rust-lang.org/dist/rust-1.58.1-powerpc64le-unknown-linux-gnu.tar.xz.sha256
# Verified using https://static.rust-lang.org/dist/rust-1.58.1-powerpc64le-unknown-linux-gnu.tar.xz.asc
sha256 45bf988d0337095a4d30bb237d552e3420b4381e208624f0d956e1caf6b90207 rust-1.58.1-powerpc64le-unknown-linux-gnu.tar.xz
# From https://static.rust-lang.org/dist/rust-1.58.1-riscv64gc-unknown-linux-gnu.tar.xz.sha256
# Verified using https://static.rust-lang.org/dist/rust-1.58.1-riscv64gc-unknown-linux-gnu.tar.xz.asc
sha256 488e30e926d1835c0140a01bff4d3fe6499be1e89e5c740b2ceace892ab4c2e6 rust-1.58.1-riscv64gc-unknown-linux-gnu.tar.xz
# From https://static.rust-lang.org/dist/rust-1.58.1-s390x-unknown-linux-gnu.tar.xz.sha256
# Verified using https://static.rust-lang.org/dist/rust-1.58.1-s390x-unknown-linux-gnu.tar.xz.asc
sha256 48cf31128a54551330f9c094f69d274adaab1ac506869dd65353aaea5bcbf33f rust-1.58.1-s390x-unknown-linux-gnu.tar.xz
# From https://static.rust-lang.org/dist/rust-1.58.1-x86_64-unknown-linux-gnu.tar.xz.sha256
# Verified using https://static.rust-lang.org/dist/rust-1.58.1-x86_64-unknown-linux-gnu.tar.xz.asc
sha256 f71b077caf0becbd0af9fd22bc1fa31c4fdf7a21fe046da8a15a7bde1286da25 rust-1.58.1-x86_64-unknown-linux-gnu.tar.xz

View File

@ -1,7 +1,16 @@
# All host rust packages should depend on this option
config BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
bool
default y if BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
default y if BR2_HOSTARCH = "aarch64"
default y if BR2_HOSTARCH = "mips"
default y if BR2_HOSTARCH = "mipsel"
default y if BR2_HOSTARCH = "powerpc"
default y if BR2_HOSTARCH = "powerpc64"
default y if BR2_HOSTARCH = "powerpc64le"
default y if BR2_HOSTARCH = "riscv64"
default y if BR2_HOSTARCH = "s390x"
default y if BR2_HOSTARCH = "x86"
default y if BR2_HOSTARCH = "x86_64"
# The pre-built Rust standard library is only available for a number
# of architectures/C libraries combinations, with different levels of

View File

@ -11,7 +11,9 @@ ifeq ($(BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS),y)
RUSTC_TARGET_NAME = $(RUSTC_ARCH)-unknown-linux-$(LIBC)$(RUSTC_ABI)
endif
ifeq ($(HOSTARCH),x86)
ifeq ($(HOSTARCH),riscv64)
RUSTC_HOST_ARCH = riscv64gc
else ifeq ($(HOSTARCH),x86)
RUSTC_HOST_ARCH = i686
else
RUSTC_HOST_ARCH = $(HOSTARCH)