diff options
author | WANG Xuerui <xen0n@gentoo.org> | 2023-06-03 14:32:53 +0800 |
---|---|---|
committer | WANG Xuerui <xen0n@gentoo.org> | 2023-07-20 17:48:26 +0800 |
commit | 32a7e626490101308c19b10a2a3f70ca4276c493 (patch) | |
tree | 16faeccea8a70b66ab72f7647e3657ae8705074d /eclass | |
parent | rust-toolchain.eclass: qualify applicable rust_arch_uris with ABI and endianness (diff) | |
download | gentoo-32a7e626490101308c19b10a2a3f70ca4276c493.tar.gz gentoo-32a7e626490101308c19b10a2a3f70ca4276c493.tar.bz2 gentoo-32a7e626490101308c19b10a2a3f70ca4276c493.zip |
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 <xen0n@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/rust-toolchain.eclass | 9 |
1 files changed, 9 insertions, 0 deletions
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 } |