From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1B44B15801B for ; Thu, 20 Jul 2023 09:50:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0871DE088F; Thu, 20 Jul 2023 09:50:00 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B7FD0E0885 for ; Thu, 20 Jul 2023 09:49:59 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BC823335C52 for ; Thu, 20 Jul 2023 09:49:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 57AB0BD8 for ; Thu, 20 Jul 2023 09:49:57 +0000 (UTC) From: "WANG Xuerui" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "WANG Xuerui" Message-ID: <1689846505.b65ec7188f25479e458186b9a41d89205fd8a859.xen0n@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/rust-toolchain.eclass X-VCS-Directories: eclass/ X-VCS-Committer: xen0n X-VCS-Committer-Name: WANG Xuerui X-VCS-Revision: b65ec7188f25479e458186b9a41d89205fd8a859 X-VCS-Branch: master Date: Thu, 20 Jul 2023 09:49:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 35243c0c-17f8-4153-91a9-3c8c40d942e8 X-Archives-Hash: 470e37aa2958993c6fb4497922983696 commit: b65ec7188f25479e458186b9a41d89205fd8a859 Author: WANG Xuerui gentoo org> AuthorDate: Wed May 31 07:25:27 2023 +0000 Commit: WANG Xuerui gentoo org> CommitDate: Thu Jul 20 09:48:25 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b65ec718 rust-toolchain.eclass: cosmetic cleanups Re-tab the file, and reorganize the rust_abi and rust_all_arch_uris helpers so the keys are sorted alphabetically while preserving match order. No functional change intended. See: https://github.com/gentoo/gentoo/pull/31241 Signed-off-by: WANG Xuerui gentoo.org> eclass/rust-toolchain.eclass | 70 +++++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 30 deletions(-) diff --git a/eclass/rust-toolchain.eclass b/eclass/rust-toolchain.eclass index df48d3fae264..ef4b2a91ef7d 100644 --- a/eclass/rust-toolchain.eclass +++ b/eclass/rust-toolchain.eclass @@ -36,21 +36,21 @@ rust_abi() { case ${CTARGET%%*-} in aarch64*gnu) echo aarch64-unknown-linux-gnu;; aarch64*musl) echo aarch64-unknown-linux-musl;; - mips64*) echo mips64-unknown-linux-gnuabi64;; + armv6j*h*) echo arm-unknown-linux-gnueabihf;; + armv6j*s*) echo arm-unknown-linux-gnueabi;; + armv7a*h*) echo armv7-unknown-linux-gnueabihf;; + i?86*) echo i686-unknown-linux-gnu;; + mips64*) echo mips64-unknown-linux-gnuabi64;; + mipsel*) echo mipsel-unknown-linux-gnu;; + mips*) echo mips-unknown-linux-gnu;; powerpc64le*) echo powerpc64le-unknown-linux-gnu;; powerpc64*) echo powerpc64-unknown-linux-gnu;; - x86_64*gnu) echo x86_64-unknown-linux-gnu;; + powerpc*) echo powerpc-unknown-linux-gnu;; + riscv64*) echo riscv64gc-unknown-linux-gnu;; + s390x*) echo s390x-unknown-linux-gnu;; + x86_64*gnu) echo x86_64-unknown-linux-gnu;; x86_64*musl) echo x86_64-unknown-linux-musl;; - armv6j*s*) echo arm-unknown-linux-gnueabi;; - armv6j*h*) echo arm-unknown-linux-gnueabihf;; - armv7a*h*) echo armv7-unknown-linux-gnueabihf;; - i?86*) echo i686-unknown-linux-gnu;; - mipsel*) echo mipsel-unknown-linux-gnu;; - mips*) echo mips-unknown-linux-gnu;; - powerpc*) echo powerpc-unknown-linux-gnu;; - s390x*) echo s390x-unknown-linux-gnu;; - riscv64*) echo riscv64gc-unknown-linux-gnu;; - *) echo ${CTARGET};; + *) echo ${CTARGET};; esac } @@ -105,22 +105,32 @@ rust_arch_uri() { # rust_all_arch_uris() { - local uris="" - uris+="abi_x86_64? ( elibc_glibc? ( $(rust_arch_uri x86_64-unknown-linux-gnu "$@") ) - elibc_musl? ( $(rust_arch_uri x86_64-unknown-linux-musl "$@") ) ) " - uris+="arm? ( $(rust_arch_uri arm-unknown-linux-gnueabi "$@") - $(rust_arch_uri arm-unknown-linux-gnueabihf "$@") - $(rust_arch_uri armv7-unknown-linux-gnueabihf "$@") ) " - uris+="arm64? ( elibc_glibc? ( $(rust_arch_uri aarch64-unknown-linux-gnu "$@") ) - elibc_musl? ( $(rust_arch_uri aarch64-unknown-linux-musl "$@") ) ) " - uris+="mips? ( $(rust_arch_uri mips-unknown-linux-gnu "$@") - $(rust_arch_uri mipsel-unknown-linux-gnu "$@") - $(rust_arch_uri mips64-unknown-linux-gnuabi64 "$@") ) " - uris+="ppc? ( $(rust_arch_uri powerpc-unknown-linux-gnu "$@") ) " - uris+="ppc64? ( $(rust_arch_uri powerpc64-unknown-linux-gnu "$@") - $(rust_arch_uri powerpc64le-unknown-linux-gnu "$@") ) " - uris+="s390? ( $(rust_arch_uri s390x-unknown-linux-gnu "$@") ) " - uris+="abi_x86_32? ( $(rust_arch_uri i686-unknown-linux-gnu "$@") ) " - uris+="riscv? ( $(rust_arch_uri riscv64gc-unknown-linux-gnu "$@") ) " - echo "${uris}" + echo " + abi_x86_32? ( $(rust_arch_uri i686-unknown-linux-gnu "$@") ) + abi_x86_64? ( + elibc_glibc? ( $(rust_arch_uri x86_64-unknown-linux-gnu "$@") ) + elibc_musl? ( $(rust_arch_uri x86_64-unknown-linux-musl "$@") ) + ) + arm? ( + $(rust_arch_uri arm-unknown-linux-gnueabi "$@") + $(rust_arch_uri arm-unknown-linux-gnueabihf "$@") + $(rust_arch_uri armv7-unknown-linux-gnueabihf "$@") + ) + arm64? ( + elibc_glibc? ( $(rust_arch_uri aarch64-unknown-linux-gnu "$@") ) + elibc_musl? ( $(rust_arch_uri aarch64-unknown-linux-musl "$@") ) + ) + mips? ( + $(rust_arch_uri mips-unknown-linux-gnu "$@") + $(rust_arch_uri mipsel-unknown-linux-gnu "$@") + $(rust_arch_uri mips64-unknown-linux-gnuabi64 "$@") + ) + ppc? ( $(rust_arch_uri powerpc-unknown-linux-gnu "$@") ) + ppc64? ( + $(rust_arch_uri powerpc64-unknown-linux-gnu "$@") + $(rust_arch_uri powerpc64le-unknown-linux-gnu "$@") + ) + riscv? ( $(rust_arch_uri riscv64gc-unknown-linux-gnu "$@") ) + s390? ( $(rust_arch_uri s390x-unknown-linux-gnu "$@") ) + " }