git: 2487e484e75a - main - Uses/cargo: Mirror _RUST_ARCH_* mapping from lang/rust
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 07 Nov 2021 15:28:27 UTC
The branch main has been updated by tobik:
URL: https://cgit.FreeBSD.org/ports/commit/?id=2487e484e75a45b72964e189d2654720c0b34dd0
commit 2487e484e75a45b72964e189d2654720c0b34dd0
Author: Tobias Kortkamp <tobik@FreeBSD.org>
AuthorDate: 2021-11-07 14:15:07 +0000
Commit: Tobias Kortkamp <tobik@FreeBSD.org>
CommitDate: 2021-11-07 15:24:13 +0000
Uses/cargo: Mirror _RUST_ARCH_* mapping from lang/rust
---
Mk/Uses/cargo.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk
index 1da833d29c4f..89e0d0704013 100644
--- a/Mk/Uses/cargo.mk
+++ b/Mk/Uses/cargo.mk
@@ -109,7 +109,10 @@ RUSTDOC?= ${LOCALBASE}/bin/rustdoc
CARGO_TARGET_DIR?= ${WRKDIR}/target
# Default target platform (affects some RUSTFLAGS if passed)
-CARGO_BUILD_TARGET?= ${ARCH:S/amd64/x86_64/:S/i386/i686/}-unknown-${OPSYS:tl}
+CARGO_BUILD_TARGET?= ${_CARGO_RUST_ARCH_${ARCH}:U${ARCH}}-unknown-${OPSYS:tl}
+
+_CARGO_RUST_ARCH_amd64= x86_64
+_CARGO_RUST_ARCH_i386= i686
# Environment for cargo
# - CARGO_HOME: local cache of the registry index