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?