Skip to content

Commit

Permalink
go: Switch illumos platforms to native GOOS=illumos.
Browse files Browse the repository at this point in the history
Ensures that native interfaces such as flock(3C) that aren't available on
Solaris can be used.
  • Loading branch information
jperkin committed Jan 28, 2023
1 parent 35cb4b8 commit 428ecfe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lang/go/bootstrap.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# $NetBSD: bootstrap.mk,v 1.8 2022/03/09 15:15:59 bacon Exp $
# $NetBSD: bootstrap.mk,v 1.9 2023/01/28 12:34:30 jperkin Exp $

.if !defined(GOROOT_BOOTSTRAP) || !exists(${GOROOT_BOOTSTRAP}/bin/go)
. if ${MACHINE_ARCH} == "aarch64" || ${OPSYS} == "Darwin" && ${OPSYS_VERSION} >= 120000
. if ${MACHINE_ARCH} == "aarch64" || \
(${OPSYS} == "Darwin" && ${OPSYS_VERSION} >= 120000) || \
(${OPSYS} == "SunOS" && ${OS_VARIANT} != "Solaris")
BUILD_DEPENDS+= go-bin-[0-9]*:../../lang/go-bin
GOROOT_BOOTSTRAP= ${PREFIX}/go-bin
. else
Expand Down
8 changes: 7 additions & 1 deletion lang/go/version.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $NetBSD: version.mk,v 1.169 2023/01/11 17:24:29 bsiegert Exp $
# $NetBSD: version.mk,v 1.170 2023/01/28 12:34:30 jperkin Exp $

#
# If bsd.prefs.mk is included before go-package.mk in a package, then this
Expand Down Expand Up @@ -50,7 +50,13 @@ GOOPT= GOARM=6
.elif ${MACHINE_ARCH} == "earmv7hf"
GOOPT= GOARM=7
.endif

.if ${OPSYS} == "SunOS" && ${OS_VARIANT} != "Solaris"
GO_PLATFORM= illumos_${GOARCH}
.else
GO_PLATFORM= ${LOWER_OPSYS}_${GOARCH}
.endif

PLIST_SUBST+= GO_PLATFORM=${GO_PLATFORM:Q} GOARCH=${GOARCH:Q}
PLIST_SUBST+= GOCHAR=${GOCHAR:Q}

Expand Down

0 comments on commit 428ecfe

Please sign in to comment.