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 D7F60158090 for ; Thu, 26 May 2022 21:45:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0F700E07C7; Thu, 26 May 2022 21:45:15 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E30F8E07C7 for ; Thu, 26 May 2022 21:45:14 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7303E341368 for ; Thu, 26 May 2022 21:45:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C5B3434E for ; Thu, 26 May 2022 21:45:10 +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: <1653601483.3bdbb08f39ee8ad706760eca5138470e88722510.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.61.0-r1.ebuild X-VCS-Directories: dev-lang/rust/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 3bdbb08f39ee8ad706760eca5138470e88722510 X-VCS-Branch: master Date: Thu, 26 May 2022 21:45:10 +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: 7d3748c6-cfec-4322-a0a1-d390f5ce62bd X-Archives-Hash: fb71a7d98be2af766f5ef8b09661e191 commit: 3bdbb08f39ee8ad706760eca5138470e88722510 Author: Georgy Yakovlev gentoo org> AuthorDate: Thu May 26 21:44:04 2022 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Thu May 26 21:44:43 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bdbb08f dev-lang/rust: attempt to support libcxx in 1.61.0-r1 Bug: https://bugs.gentoo.org/732632 Signed-off-by: Georgy Yakovlev gentoo.org> dev-lang/rust/rust-1.61.0-r1.ebuild | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dev-lang/rust/rust-1.61.0-r1.ebuild b/dev-lang/rust/rust-1.61.0-r1.ebuild index 2e877f2f2bdd..250c7e2f1db2 100644 --- a/dev-lang/rust/rust-1.61.0-r1.ebuild +++ b/dev-lang/rust/rust-1.61.0-r1.ebuild @@ -259,7 +259,7 @@ src_prepare() { } src_configure() { - local rust_target="" rust_targets="" arch_cflags + local rust_target="" rust_targets="" arch_cflags use_libcxx="false" # Collect rust target names to compile standard libs for all ABIs. for v in $(multilib_get_enabled_abi_pairs); do @@ -308,6 +308,14 @@ src_configure() { rust_target="$(rust_abi)" + # https://bugs.gentoo.org/732632 + if tc-is-clang; then + local clang_slot="$(clang-major-version)" + if { has_version "sys-devel/clang:${clang_slot}[default-libcxx]" || is-flagq -stdlib=libc++; }; then + use_libcxx="true" + fi + fi + cat <<- _EOF_ > "${S}"/config.toml changelog-seen = 2 [llvm] @@ -319,6 +327,7 @@ src_configure() { targets = "${LLVM_TARGETS// /;}" experimental-targets = "" link-shared = $(toml_usex system-llvm) + use-libcxx = ${use_libcxx} $(case "${rust_target}" in i586-*-linux-*) # https://github.com/rust-lang/rust/issues/93059 @@ -326,6 +335,8 @@ src_configure() { echo 'cxxflags = "-fcf-protection=none"' echo 'ldflags = "-fcf-protection=none"' ;; + *) + ;; esac) [build] build-stage = 2