pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/rust



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Fri Jul 15 07:03:30 UTC 2022

Modified Files:
        pkgsrc/lang/rust: Makefile

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 pkgsrc/lang/rust/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/rust/Makefile
diff -u pkgsrc/lang/rust/Makefile:1.262 pkgsrc/lang/rust/Makefile:1.263
--- pkgsrc/lang/rust/Makefile:1.262     Thu Jul  7 16:26:37 2022
+++ pkgsrc/lang/rust/Makefile   Fri Jul 15 07:03:30 2022
@@ -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



Home | Main Index | Thread Index | Old Index