Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 925194

Summary: dev-lang/rust-bin: should also set RUSTDOCFLAGS="-C target-features=-crt-static" for musl
Product: Gentoo Linux Reporter: Violet Purcell <vimproved>
Component: Current packagesAssignee: Randy Barlow <randy>
Status: UNCONFIRMED ---    
Severity: normal CC: navi, rust
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=925086
Whiteboard:
Package list:
Runtime testing required: ---

Description Violet Purcell 2024-02-21 18:01:22 UTC
Currently, dev-lang/rust-bin has this line to disable crt-static for musl targets with an env.d file:

$(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C target-feature=-crt-static\"")

However, this doesn't extend to rustdoc commands, so they have the potential to fail due to missing static libs on musl (see https://bugs.gentoo.org/925086).

This would be fixed by adding this line:

$(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTDOCFLAGS=\"-C target-feature=-crt-static\"")

Or, would it be better to just handle this in cargo.eclass?