From 32a7e626490101308c19b10a2a3f70ca4276c493 Mon Sep 17 00:00:00 2001 From: WANG Xuerui Date: Sat, 3 Jun 2023 14:32:53 +0800 Subject: rust-toolchain.eclass: add preparatory loong support Rust 1.71.0 was already beta at time of the commit, meaning the target tuple of loong can be considered stable. See: https://github.com/gentoo/gentoo/pull/31241 Signed-off-by: WANG Xuerui --- eclass/rust-toolchain.eclass | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'eclass/rust-toolchain.eclass') diff --git a/eclass/rust-toolchain.eclass b/eclass/rust-toolchain.eclass index 0dcafdf9b335..f4451f743596 100644 --- a/eclass/rust-toolchain.eclass +++ b/eclass/rust-toolchain.eclass @@ -40,6 +40,7 @@ rust_abi() { armv6j*s*) echo arm-unknown-linux-gnueabi;; armv7a*h*) echo armv7-unknown-linux-gnueabihf;; i?86*) echo i686-unknown-linux-gnu;; + loongarch64*) echo loongarch64-unknown-linux-gnu;; mips64el*) echo mips64el-unknown-linux-gnuabi64;; mips64*) echo mips64-unknown-linux-gnuabi64;; mipsel*) echo mipsel-unknown-linux-gnu;; @@ -139,4 +140,12 @@ rust_all_arch_uris() riscv? ( $(rust_arch_uri riscv64gc-unknown-linux-gnu "$@") ) s390? ( $(rust_arch_uri s390x-unknown-linux-gnu "$@") ) " + + # Upstream did not gain support for loong until v1.71.0. + # NOTE: Merge this into the block above after every <1.71.0 version is + # gone from tree. + local arg_version="${1##*-}" + if ver_test "${arg_version:-$PV}" -ge 1.71.0; then + echo "loong? ( $(rust_arch_uri loongarch64-unknown-linux-gnu "$@") )" + fi } -- cgit v1.2.3-65-gdbad