summaryrefslogtreecommitdiff
path: root/eclass/rust-toolchain.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-13 00:08:30 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-13 00:08:30 +0100
commit0ebcd2cbf178600b5eb36b2f24cdbb3d2f4a9000 (patch)
tree941e6ba8c256dd27e9f9ca634f08d4bf0278798e /eclass/rust-toolchain.eclass
parentf0ddcad13515f66d2f3bf827d33c277bdba7e1dd (diff)
gentoo auto-resync : 13:06:2024 - 00:08:29
Diffstat (limited to 'eclass/rust-toolchain.eclass')
-rw-r--r--eclass/rust-toolchain.eclass34
1 files changed, 8 insertions, 26 deletions
diff --git a/eclass/rust-toolchain.eclass b/eclass/rust-toolchain.eclass
index 5824a48734f9..111aece796ce 100644
--- a/eclass/rust-toolchain.eclass
+++ b/eclass/rust-toolchain.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: rust-toolchain.eclass
@@ -7,17 +7,14 @@
# @SUPPORTED_EAPIS: 8
# @BLURB: helps map gentoo arches to rust ABIs
# @DESCRIPTION:
-# This eclass contains a src_unpack default phase function, and
-# helper functions, to aid in proper rust-ABI handling for various
-# gentoo arches.
+# This eclass contains helper functions, to aid in proper rust-ABI handling for
+# various gentoo arches.
case ${EAPI} in
8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-inherit multilib-build
-
# @ECLASS_VARIABLE: RUST_TOOLCHAIN_BASEURL
# @DESCRIPTION:
# This variable specifies the base URL used by the
@@ -48,7 +45,8 @@ rust_abi() {
powerpc64le*) echo powerpc64le-unknown-linux-gnu;;
powerpc64*) echo powerpc64-unknown-linux-gnu;;
powerpc*) echo powerpc-unknown-linux-gnu;;
- riscv64*) echo riscv64gc-unknown-linux-gnu;;
+ riscv64*gnu) echo riscv64gc-unknown-linux-gnu;;
+ riscv64*musl) echo riscv64gc-unknown-linux-musl;;
s390x*) echo s390x-unknown-linux-gnu;;
x86_64*gnu) echo x86_64-unknown-linux-gnu;;
x86_64*musl) echo x86_64-unknown-linux-musl;;
@@ -56,24 +54,6 @@ rust_abi() {
esac
}
-# @FUNCTION: rust_all_abis
-# @DESCRIPTION:
-# Outputs a list of all the enabled Rust ABIs
-rust_all_abis() {
- if use multilib; then
- local abi
- local ALL_ABIS=()
- for abi in $(multilib_get_enabled_abis); do
- ALL_ABIS+=( $(rust_abi $(get_abi_CHOST ${abi})) )
- done
- local abi_list
- IFS=, eval 'abi_list=${ALL_ABIS[*]}'
- echo ${abi_list}
- else
- rust_abi
- fi
-}
-
# @FUNCTION: rust_arch_uri
# @USAGE: <rust-ABI> <base-uri> [alt-distfile-basename]
# @DESCRIPTION:
@@ -127,7 +107,9 @@ rust_all_arch_uris()
big-endian? ( $(rust_arch_uri powerpc64-unknown-linux-gnu "$@") )
!big-endian? ( $(rust_arch_uri powerpc64le-unknown-linux-gnu "$@") )
)
- riscv? ( $(rust_arch_uri riscv64gc-unknown-linux-gnu "$@") )
+ riscv? (
+ elibc_glibc? ( $(rust_arch_uri riscv64gc-unknown-linux-gnu "$@") )
+ )
s390? ( $(rust_arch_uri s390x-unknown-linux-gnu "$@") )
"