pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/platform



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Mon Nov 29 12:38:44 UTC 2021

Modified Files:
        pkgsrc/mk/platform: Darwin.mk

Log Message:
mk: Explicitly set arm64 flags on Darwin/aarch64.

It's currently impossible to run system binaries inside an arm64 chroot, even
with SIP turned off, so the only way to build is to use an x86_64 chroot and
effectively cross-compile to arm64.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 pkgsrc/mk/platform/Darwin.mk

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

Modified files:

Index: pkgsrc/mk/platform/Darwin.mk
diff -u pkgsrc/mk/platform/Darwin.mk:1.108 pkgsrc/mk/platform/Darwin.mk:1.109
--- pkgsrc/mk/platform/Darwin.mk:1.108  Mon Nov 29 12:31:56 2021
+++ pkgsrc/mk/platform/Darwin.mk        Mon Nov 29 12:38:44 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Darwin.mk,v 1.108 2021/11/29 12:31:56 jperkin Exp $
+# $NetBSD: Darwin.mk,v 1.109 2021/11/29 12:38:44 jperkin Exp $
 #
 # Variable definitions for the Darwin operating system.
 
@@ -132,6 +132,19 @@ PKG_FAIL_REASON+=  "No suitable Xcode SDK
 .endif
 
 #
+# Explicitly pass arm64 flags when building for arm64 so that everything works
+# as expected when effectively cross-compiling inside an x86_64 chroot.
+#
+.if ${MACHINE_ARCH} == "aarch64"
+CWRAPPERS_APPEND.cc+=  -arch arm64
+CWRAPPERS_APPEND.cxx+= -arch arm64
+CWRAPPERS_APPEND.ld+=  -arch arm64
+_WRAP_EXTRA_ARGS.CC+=  -arch arm64
+_WRAP_EXTRA_ARGS.CXX+= -arch arm64
+_WRAP_EXTRA_ARGS.LD+=  -arch arm64
+.endif
+
+#
 # Newer macOS releases remove library files from the file system.  The only way
 # to test them is via dlopen(), which is obviously impractical for many things.
 #



Home | Main Index | Thread Index | Old Index