pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/platform mk: Explicitly set arm64 flags on Darwin/a...
details: https://anonhg.NetBSD.org/pkgsrc/rev/2b5bc2815eec
branches: trunk
changeset: 770330:2b5bc2815eec
user: jperkin <jperkin%pkgsrc.org@localhost>
date: Mon Nov 29 12:38:44 2021 +0000
description:
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.
diffstat:
mk/platform/Darwin.mk | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 3fd788b721f6 -r 2b5bc2815eec mk/platform/Darwin.mk
--- a/mk/platform/Darwin.mk Mon Nov 29 12:31:56 2021 +0000
+++ b/mk/platform/Darwin.mk Mon Nov 29 12:38:44 2021 +0000
@@ -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 @@
.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