pkgsrc-Changes archive

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

CVS commit: pkgsrc/bootstrap



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Sat Jul 10 15:49:21 UTC 2021

Modified Files:
        pkgsrc/bootstrap: bootstrap

Log Message:
bootstrap: Add support for --machine-arch override.

This should not be used under normal circumstances, however on arm64 macOS it
is currently impossible to execute native arm64 binaries inside a chroot, and
so the chroot must run in x86_64 mode via Rosetta.  This causes uname/arch/etc
to all report that the system is x86, and so the only way to force MACHINE_ARCH
to be set correctly to "aarch64" is using this argument.


To generate a diff of this commit:
cvs rdiff -u -r1.300 -r1.301 pkgsrc/bootstrap/bootstrap

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

Modified files:

Index: pkgsrc/bootstrap/bootstrap
diff -u pkgsrc/bootstrap/bootstrap:1.300 pkgsrc/bootstrap/bootstrap:1.301
--- pkgsrc/bootstrap/bootstrap:1.300    Sun May 30 23:41:05 2021
+++ pkgsrc/bootstrap/bootstrap  Sat Jul 10 15:49:21 2021
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.300 2021/05/30 23:41:05 khorben Exp $
+# $NetBSD: bootstrap,v 1.301 2021/07/10 15:49:21 jperkin Exp $
 #
 # Copyright (c) 2001-2011 Alistair Crooks <agc%NetBSD.org@localhost>
 # All rights reserved.
@@ -64,6 +64,7 @@ usage="Usage: $0 "'
     [ --full ]
     [ --gzip-binary-kit <tarball> ]
     [ --help ]
+    [ --machine-arch <arch> ]
     [ --make-jobs <num> ]
     [ --mk-fragment <mk.conf> ]
     [ --pkgdbdir <pkgdbdir> ]
@@ -421,6 +422,7 @@ varbase=
 compiler=""
 cwrappers=auto
 full=no
+march=
 make_jobs=1
 mk_fragment=
 quiet=no
@@ -476,6 +478,9 @@ while [ $# -gt 0 ]; do
                        binary_gzip_kit=`get_optarg "$1"` ;;
        --gzip-binary-kit)
                        binary_gzip_kit="$2"; shift ;;
+       --machine-arch=*)
+                       march=`get_optarg "$1"` ;;
+       --machine-arch) march="$2"; shift ;;
        --make-jobs=*)  make_jobs=`get_optarg "$1"` ;;
        --make-jobs)    make_jobs="$2"; shift ;;
        --full)         full=yes ;;
@@ -841,6 +846,11 @@ UnixWare)
        ;;
 esac
 
+# Override if the user explicitly requests it.
+if [ -n "${march}" ]; then
+       machine_arch="${march}"
+fi
+
 # Fixup MACHINE_ARCH to use canonical pkgsrc variants, and support multiarch
 # systems via --abi, setting a default $abi based on MACHINE_ARCH if not set.
 #



Home | Main Index | Thread Index | Old Index