commit:     b4ca7760f8bb83e8d6180d6be48dcbd7af8b3498
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  1 20:37:51 2024 +0000
Commit:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Oct  1 20:37:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4ca7760

cargo.eclass: Respect existing CARGO_TARGET_${TRIPLE}_RUSTFLAGS

This variable is used to disable crt-static with musl.

Closes: https://bugs.gentoo.org/940197
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>

 eclass/cargo.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 3a63e5027250..499fe5498c96 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -585,7 +585,7 @@ cargo_env() {
        local -x CARGO_BUILD_TARGET=$(rust_abi)
        local TRIPLE=${CARGO_BUILD_TARGET//-/_}
        local TRIPLE=${TRIPLE^^} LD_A=( $(tc-getCC) ${LDFLAGS} )
-       local -x CARGO_TARGET_"${TRIPLE}"_RUSTFLAGS="-C strip=none -C 
linker=${LD_A[0]}"
+       local -Ix CARGO_TARGET_"${TRIPLE}"_RUSTFLAGS+=" -C strip=none -C 
linker=${LD_A[0]}"
        [[ ${#LD_A[@]} -gt 1 ]] && local 
CARGO_TARGET_"${TRIPLE}"_RUSTFLAGS+="$(printf -- ' -C link-arg=%s' 
"${LD_A[@]:1}")"
        local CARGO_TARGET_"${TRIPLE}"_RUSTFLAGS+=" ${RUSTFLAGS}"
 

Reply via email to