summaryrefslogtreecommitdiff
path: root/Mk/Uses/cargo.mk
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2019-03-14 17:31:45 +0000
committerJan Beich <jbeich@FreeBSD.org>2019-03-14 17:31:45 +0000
commit52696a8ba68795e7b2bd0773d78048bd3f5a54c3 (patch)
treeb4bb59e6904479a495c3d648e2a09616836a7c92 /Mk/Uses/cargo.mk
parentx11-toolkits/wxgtk31: Fix plist with WEBKIT=off (diff)
USES=cargo to omit -C link-arg if LDFLAGS is empty
DPorts overrides USE_GCC logic and doesn't opt in into SSP_CFLAGS, so its LDFLAGS are empty by default. PR: 236529 Reported by: Antonio Huete Jimenez
Notes
Notes: svn path=/head/; revision=495724
Diffstat (limited to 'Mk/Uses/cargo.mk')
-rw-r--r--Mk/Uses/cargo.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk
index 584d110d50fb..2316fb9fa297 100644
--- a/Mk/Uses/cargo.mk
+++ b/Mk/Uses/cargo.mk
@@ -65,7 +65,7 @@ CARGO_ENV+= \
CARGO_TARGET_DIR=${CARGO_TARGET_DIR} \
RUSTC=${LOCALBASE}/bin/rustc \
RUSTDOC=${LOCALBASE}/bin/rustdoc \
- RUSTFLAGS="${RUSTFLAGS} -C linker=${CC:Q} ${LDFLAGS:S/^/-C link-arg=/}"
+ RUSTFLAGS="${RUSTFLAGS} -C linker=${CC:Q} ${LDFLAGS:C/.+/-C link-arg=&/}"
# Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk
.if ${ARCH} == amd64 || ${ARCH} == i386