pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/go go: Force GOHOSTARCH for Darwin x86_64.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/12e2f815baa2
branches:  trunk
changeset: 385258:12e2f815baa2
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Mon Sep 12 12:16:05 2022 +0000

description:
go: Force GOHOSTARCH for Darwin x86_64.

Fixes builds of go118 and newer in x86_64 chroots on an arm64 host.  The go
build system parses "uname -v" and incorrectly assumes that if you're running
on an arm64 host you always want arm64 binaries.

diffstat:

 lang/go/version.mk |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r af129b336c49 -r 12e2f815baa2 lang/go/version.mk
--- a/lang/go/version.mk        Mon Sep 12 12:12:51 2022 +0000
+++ b/lang/go/version.mk        Mon Sep 12 12:16:05 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: version.mk,v 1.158 2022/09/07 06:36:32 bsiegert Exp $
+# $NetBSD: version.mk,v 1.159 2022/09/12 12:16:05 jperkin Exp $
 
 #
 # If bsd.prefs.mk is included before go-package.mk in a package, then this
@@ -46,6 +46,10 @@
 .elif ${MACHINE_ARCH} == "x86_64"
 GOARCH=                        amd64
 GOCHAR=                        6
+# go118 hardcodes GOARCH=arm64 even when running in an x86_64 chroot
+.  if ${OPSYS} == "Darwin"
+GOOPT+=                        GOHOSTARCH=amd64
+.  endif
 .elif ${MACHINE_ARCH} == "earmv6hf" || ${MACHINE_ARCH} == "earmv7hf"
 GOARCH=                        arm
 GOCHAR=                        5



Home | Main Index | Thread Index | Old Index