Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 822685 Details for
Bug 875563
dev-lang/rust-1.64.0-r1: broken on musl/clang after 2aae4ce71867
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-dev-lang-rust-change-libcxx-detection-method.patch
0001-dev-lang-rust-change-libcxx-detection-method.patch (text/plain), 2.28 KB, created by
Georgy Yakovlev
on 2022-10-06 21:38:33 UTC
(
hide
)
Description:
0001-dev-lang-rust-change-libcxx-detection-method.patch
Filename:
MIME Type:
Creator:
Georgy Yakovlev
Created:
2022-10-06 21:38:33 UTC
Size:
2.28 KB
patch
obsolete
>From 3b260e7d1bd9bda1fb1138b27d7994a61898e61e Mon Sep 17 00:00:00 2001 >From: Georgy Yakovlev <gyakovlev@gentoo.org> >Date: Thu, 6 Oct 2022 14:32:11 -0700 >Subject: [PATCH] dev-lang/rust: change libcxx detection method > >Bug: https://bugs.gentoo.org/732632 >Bug: https://bugs.gentoo.org/875563 >Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> >--- > dev-lang/rust/rust-1.64.0-r1.ebuild | 24 ++++++++++++++---------- > 1 file changed, 14 insertions(+), 10 deletions(-) > >diff --git a/dev-lang/rust/rust-1.64.0-r1.ebuild b/dev-lang/rust/rust-1.64.0-r1.ebuild >index 436894d9af8..4ab6f6c152f 100644 >--- a/dev-lang/rust/rust-1.64.0-r1.ebuild >+++ b/dev-lang/rust/rust-1.64.0-r1.ebuild >@@ -231,6 +231,17 @@ llvm_check_deps() { > has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]" > } > >+# Is LLVM being linked against libc++? >+is_libcxx_linked() { >+ local code='#include <ciso646> >+#if defined(_LIBCPP_VERSION) >+ HAVE_LIBCXX >+#endif >+' >+ local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 >+ [[ ${out} == *HAVE_LIBCXX* ]] >+} >+ > pkg_pretend() { > pre_build_checks > } >@@ -297,7 +308,7 @@ src_prepare() { > src_configure() { > filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231 > >- local rust_target="" rust_targets="" arch_cflags use_libcxx="false" >+ local rust_target="" rust_targets="" arch_cflags > > # Collect rust target names to compile standard libs for all ABIs. > for v in $(multilib_get_enabled_abi_pairs); do >@@ -335,14 +346,6 @@ 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(-)]" || has_version "sys-devel/clang-common:${clang_slot}[default-libcxx(-)]" || is-flagq -stdlib=libc++; }; then >- use_libcxx="true" >- fi >- fi >- > local cm_btype="$(usex debug DEBUG RELEASE)" > cat <<- _EOF_ > "${S}"/config.toml > changelog-seen = 2 >@@ -355,7 +358,8 @@ src_configure() { > targets = "${LLVM_TARGETS// /;}" > experimental-targets = "" > link-shared = $(toml_usex system-llvm) >- $(if [[ ${use_libcxx} == true ]]; then >+ $(if is_libcxx_linked; then >+ # https://bugs.gentoo.org/732632 > echo "use-libcxx = true" > echo "static-libstdcpp = false" > fi) >-- >2.38.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 875563
:
821710
|
821713
|
821716
|
821719
|
821821
|
821824
|
821827
|
821830
|
821833
| 822685