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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DBD071382C5 for ; Mon, 31 May 2021 06:56:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F31A8E0829; Mon, 31 May 2021 06:56:46 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D4990E0829 for ; Mon, 31 May 2021 06:56:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 08FD7335D1E for ; Mon, 31 May 2021 06:56:45 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5A4DF78E for ; Mon, 31 May 2021 06:56:43 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1622444141.92f70cd6dc23e2707a7964fd9e51753c3e8c23b6.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/rust/rust-1.51.0-r2.ebuild dev-lang/rust/rust-1.52.1.ebuild X-VCS-Directories: dev-lang/rust/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 92f70cd6dc23e2707a7964fd9e51753c3e8c23b6 X-VCS-Branch: master Date: Mon, 31 May 2021 06:56:43 +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: 53569b7a-6802-45cb-afe0-3cc1ab7ad9ac X-Archives-Hash: a0c2e3bcbe038e9c5ea62d8ab376c603 commit: 92f70cd6dc23e2707a7964fd9e51753c3e8c23b6 Author: Joshua Kiekendief users noreply github com> AuthorDate: Mon May 31 06:52:14 2021 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Mon May 31 06:55:41 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92f70cd6 dev-lang/rust: support musl cross targets Conditionally add `musl-root` path If the target triplet ends in `musl*`, this will use the cross-toolchain's compiler to add the `musl-root` component. If this is not added, the sanity check panics while building rust: ``` thread 'main' panicked at 'when targeting MUSL either the rust.musl-root option or the target.$TARGET.musl-root option must be specified in config.toml', src/bootstrap/sanity.rs:188:25 ``` Closes: https://github.com/gentoo/gentoo/pull/19806 Signed-off-by: Joshua Kiekendief users.noreply.github.com> Signed-off-by: Georgy Yakovlev gentoo.org> dev-lang/rust/rust-1.51.0-r2.ebuild | 5 +++++ dev-lang/rust/rust-1.52.1.ebuild | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/dev-lang/rust/rust-1.51.0-r2.ebuild b/dev-lang/rust/rust-1.51.0-r2.ebuild index d672d89ea66..a9c49b69bae 100644 --- a/dev-lang/rust/rust-1.51.0-r2.ebuild +++ b/dev-lang/rust/rust-1.51.0-r2.ebuild @@ -444,6 +444,11 @@ src_configure() { llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" _EOF_ fi + if [[ "${cross_toolchain}" == *-musl* ]]; then + cat <<- _EOF_ >> "${S}"/config.toml + musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr" + _EOF_ + fi # append cross target to "normal" target list # example 'target = ["powerpc64le-unknown-linux-gnu"]' diff --git a/dev-lang/rust/rust-1.52.1.ebuild b/dev-lang/rust/rust-1.52.1.ebuild index 625bf6563a2..d8b7334db88 100644 --- a/dev-lang/rust/rust-1.52.1.ebuild +++ b/dev-lang/rust/rust-1.52.1.ebuild @@ -444,6 +444,11 @@ src_configure() { llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" _EOF_ fi + if [[ "${cross_toolchain}" == *-musl* ]]; then + cat <<- _EOF_ >> "${S}"/config.toml + musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr" + _EOF_ + fi # append cross target to "normal" target list # example 'target = ["powerpc64le-unknown-linux-gnu"]'