summaryrefslogtreecommitdiff
path: root/lang/rust
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2022-07-15 07:03:30 +0000
committerjperkin <jperkin@pkgsrc.org>2022-07-15 07:03:30 +0000
commit5f610d24c93615965fff3a9fa79f0748aaf6c821 (patch)
tree56d19e5bc46beb03daf693cbdb5396e2be097bca /lang/rust
parentb89ecf4671af63d02b73ed08557ede643b88a535 (diff)
downloadpkgsrc-5f610d24c93615965fff3a9fa79f0748aaf6c821.tar.gz
rust: Add ugly fix for incorrect flags on macOS/arm64.
I've dug through the source code and removed loads of '-arch ' invocations but still can't find the one that is incorrectly adding '-arch x86_64', so for now we're just brute-force transforming it.
Diffstat (limited to 'lang/rust')
-rw-r--r--lang/rust/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index 070e8eb540c..896fd1edfcf 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.262 2022/07/07 16:26:37 jperkin Exp $
+# $NetBSD: Makefile,v 1.263 2022/07/15 07:03:30 jperkin Exp $
DISTNAME= rustc-1.60.0-src
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
@@ -162,6 +162,15 @@ MAKE_JOBS_SAFE?= no
#
BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--enable-new-dtags
+#
+# Somewhere in the LLVM build "-arch x86_64" is passed on macOS/arm64 which
+# breaks linking, see https://github.com/rust-lang/rust/issues/81790. Until
+# this can be located (proving difficult!) we just force it.
+#
+.if !empty(MACHINE_PLATFORM:MDarwin-*-aarch64)
+BUILDLINK_TRANSFORM+= opt:x86_64:arm64
+.endif
+
.PHONY: pre-build-fix
#
# Rust unfortunately requires itself to build. On platforms which aren't