From 3bdbb08f39ee8ad706760eca5138470e88722510 Mon Sep 17 00:00:00 2001 From: Georgy Yakovlev Date: Thu, 26 May 2022 14:44:04 -0700 Subject: dev-lang/rust: attempt to support libcxx in 1.61.0-r1 Bug: https://bugs.gentoo.org/732632 Signed-off-by: Georgy Yakovlev --- dev-lang/rust/rust-1.61.0-r1.ebuild | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'dev-lang') 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 -- cgit v1.2.3-18-g5258