From 29aabba0ea759c6a2864ff5631735b67ee38e5e0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 5 Feb 2020 18:44:56 +0000 Subject: gentoo resync : 05.02.2020 --- dev-lang/rust/rust-1.40.0-r1.ebuild | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'dev-lang/rust/rust-1.40.0-r1.ebuild') diff --git a/dev-lang/rust/rust-1.40.0-r1.ebuild b/dev-lang/rust/rust-1.40.0-r1.ebuild index e204b4c08023..8be040d0227c 100644 --- a/dev-lang/rust/rust-1.40.0-r1.ebuild +++ b/dev-lang/rust/rust-1.40.0-r1.ebuild @@ -69,6 +69,7 @@ COMMON_DEPEND=" net-libs/libssh2 net-libs/http-parser:= net-misc/curl[ssl] + elibc_musl? ( sys-libs/libunwind ) system-llvm? ( ${LLVM_DEPEND} ) @@ -237,6 +238,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" @@ -313,7 +320,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}" } @@ -335,6 +342,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() { -- cgit v1.2.3