pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/rust rust: Add ugly fix for incorrect flags on ma...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/058f4d93d0d1
branches:  trunk
changeset: 381908:058f4d93d0d1
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Fri Jul 15 07:03:30 2022 +0000

description:
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:

 lang/rust/Makefile |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 2ad2624e2e26 -r 058f4d93d0d1 lang/rust/Makefile
--- a/lang/rust/Makefile        Fri Jul 15 06:19:52 2022 +0000
+++ b/lang/rust/Makefile        Fri Jul 15 07:03:30 2022 +0000
@@ -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 @@
 #
 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



Home | Main Index | Thread Index | Old Index