summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2024-10-01 21:37:51 +0100
committerJames Le Cuirot <chewi@gentoo.org>2024-10-01 21:37:51 +0100
commitb4ca7760f8bb83e8d6180d6be48dcbd7af8b3498 (patch)
tree36102b0c261f98dfd001ad3700f25937ebd7aa8f /eclass
parentapp-arch/lha: Drop old 114i_p20201004 (diff)
downloadgentoo-b4ca7760f8bb83e8d6180d6be48dcbd7af8b3498.tar.gz
gentoo-b4ca7760f8bb83e8d6180d6be48dcbd7af8b3498.tar.bz2
gentoo-b4ca7760f8bb83e8d6180d6be48dcbd7af8b3498.zip
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@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/cargo.eclass2
1 files changed, 1 insertions, 1 deletions
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}"