diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-02-05 18:44:56 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-02-05 18:44:56 +0000 |
commit | 29aabba0ea759c6a2864ff5631735b67ee38e5e0 (patch) | |
tree | ab466b4dfa7abecb401b2f8039d08af4689306bb /dev-lang/rust/rust-1.38.0.ebuild | |
parent | d42200bec37eef2a7478d88988ff00addd0a9202 (diff) |
gentoo resync : 05.02.2020
Diffstat (limited to 'dev-lang/rust/rust-1.38.0.ebuild')
-rw-r--r-- | dev-lang/rust/rust-1.38.0.ebuild | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/dev-lang/rust/rust-1.38.0.ebuild b/dev-lang/rust/rust-1.38.0.ebuild index a2cbb5dcb9cd..23b7ca132b18 100644 --- a/dev-lang/rust/rust-1.38.0.ebuild +++ b/dev-lang/rust/rust-1.38.0.ebuild @@ -62,6 +62,7 @@ COMMON_DEPEND=" net-libs/libssh2 net-libs/http-parser:= net-misc/curl[ssl] + elibc_musl? ( sys-libs/libunwind ) system-llvm? ( ${LLVM_DEPEND} ) @@ -209,6 +210,12 @@ src_configure() { linker = "$(tc-getCC)" ar = "$(tc-getAR)" EOF + # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true; + if use elibc_musl; then + cat <<- EOF >> "${S}"/config.toml + crt-static = false + EOF + fi if use system-llvm; then cat <<- EOF >> "${S}"/config.toml llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" @@ -297,7 +304,7 @@ src_install() { echo /usr/bin/rustfmt >> "${T}/provider-${P}" echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" fi - dodir /etc/env.d/rust + insinto /etc/env.d/rust doins "${T}/provider-${P}" } @@ -319,6 +326,15 @@ pkg_postinst() { if has_version app-editors/gvim || has_version app-editors/vim; then elog "install app-vim/rust-vim to get vim support for rust." fi + + if use elibc_musl; then + ewarn "${PN} on *-musl targets is configured with crt-static" + ewarn "" + ewarn "you will need to set RUSTFLAGS=\"-C target-feature=-crt-static\" in make.conf" + ewarn "to use it with portage, otherwise you may see failures like" + ewarn "error: cannot produce proc-macro for serde_derive v1.0.98 as the target " + ewarn "x86_64-unknown-linux-musl does not support these crate types" + fi } pkg_postrm() { |