On 21-02-19 17:22:09, Aaron Bieber wrote: > Here is a fairly well tested update to Go. This version now uses libc[1] > thanks > to jsing@'s hard work!
Just to clarify, Go 1.16 uses libc-based syscalls for amd64 and arm64. The remaining platforms (openbsd/386, openbsd/arm, openbsd/mips64) are still using direct syscalls. Once this update lands I'll patch the remaining platforms in ports. > Some other changes that impact OpenBSD: > > - Modules are used by default now. This breaks sysutils/amazon-ssm-agent, > sysutils/fleetctl and textproc/loccount, but I have fixes standing by[2] > for > when this goes in. > - GO386=387 support was dropped[3]. We now use "GO386=softfloat". I have done > a > mini-bulk on i386 and everything works as expected. > > Test results are fairly typical, amd64 and i386 pass, arm{v7,64} have some > sporadic issues like before. > > The diff also includes a fix for portgen. The behavior of 'go list -m all' > changed a bit[4]. > > Also tested but not included: mips64 support \o/ This will still require a little effort and bootstrap, I'll deal with this once we've got Go 1.16 with libc-based syscalls for the existing four platforms. > OK? ok jsing@, see comment inline. > [1] https://github.com/golang/go/issues/36435 > [2] https://github.com/openbsd/ports/compare/master...qbit:go1.16rc1 > [3] https://github.com/golang/go/issues/40255 > [4] https://github.com/golang/go/issues/44238 > > Index: infrastructure/lib/OpenBSD/PortGen/Port/Go.pm > =================================================================== > RCS file: /cvs/ports/infrastructure/lib/OpenBSD/PortGen/Port/Go.pm,v > retrieving revision 1.7 > diff -u -p -r1.7 Go.pm > --- infrastructure/lib/OpenBSD/PortGen/Port/Go.pm 16 Jan 2021 23:38:13 > -0000 1.7 > +++ infrastructure/lib/OpenBSD/PortGen/Port/Go.pm 20 Feb 2021 00:18:03 > -0000 > @@ -144,7 +144,7 @@ sub _go_mod_info > close $fh; > > # Outputs: "dep version" > - my @raw_deps = $self->_run($dir, qw(go list -m all)); > + my @raw_deps = $self->_run($dir, qw(go list -mod=mod -m all)); > my @deps; > my $all_deps = {}; > foreach my $dep (@raw_deps) { > Index: lang/go/Makefile > =================================================================== > RCS file: /cvs/ports/lang/go/Makefile,v > retrieving revision 1.91 > diff -u -p -r1.91 Makefile > --- lang/go/Makefile 21 Jan 2021 14:47:15 -0000 1.91 > +++ lang/go/Makefile 20 Feb 2021 00:18:03 -0000 > @@ -7,7 +7,7 @@ BIN_BOOTSTRAP_VERSION = 1.13.9 > > COMMENT = Go programming language > > -VERSION = 1.15.7 > +VERSION = 1.16 > DISTNAME = go${VERSION}.src > PKGNAME = go-${VERSION} > PKGSPEC = ${FULLPKGNAME:S/go-/go-=/} > @@ -54,11 +54,6 @@ GOARCH = arm64 > .elif ${MACHINE_ARCH} == "i386" > GOARCH = 386 > .endif > - > -# We cannot assume that the maching running the built code will have SSE, > -# even though the machine building the package has SSE. As such, we need > -# to explicitly disable SSE on i386 builds. > -MAKE_ENV += GO386=387 We'll presumably want to keep this with GO386=softfloat - otherwise the go binary package will only be useable on i386 CPUs with SSE support. > .for arch in ${BIN_BOOTSTRAP_GOARCHS} > SUPDISTFILES += > go-openbsd-${arch}-bootstrap-${BIN_BOOTSTRAP_VERSION}${EXTRACT_SUFX}:0 > Index: lang/go/distinfo > =================================================================== > RCS file: /cvs/ports/lang/go/distinfo,v > retrieving revision 1.56 > diff -u -p -r1.56 distinfo > --- lang/go/distinfo 21 Jan 2021 14:47:15 -0000 1.56 > +++ lang/go/distinfo 20 Feb 2021 00:18:03 -0000 > @@ -1,6 +1,6 @@ > SHA256 (go-openbsd-arm-bootstrap-1.13.9.tar.gz) = > j+uAyYE4OsdncBvt6YDTXhjGc9gQq0XCjmSUdOesiq8= > SHA256 (go-openbsd-arm64-bootstrap-1.13.9.tar.gz) = > 84YoDEuNNmXbGCSzP8g5X1zqPdoOPB8yW71vsUL+5jw= > -SHA256 (go1.15.7.src.tar.gz) = hjGzqv2Oy5JE7C/7iiqLSYPPStFVcrmAH3xbFnwaKrw= > +SHA256 (go1.16.src.tar.gz) = dogGPVVlYQWJjzI9kKeaOcN42G/omuGS6zt/xGNHyVo= > SIZE (go-openbsd-arm-bootstrap-1.13.9.tar.gz) = 120208513 > SIZE (go-openbsd-arm64-bootstrap-1.13.9.tar.gz) = 118521763 > -SIZE (go1.15.7.src.tar.gz) = 23017978 > +SIZE (go1.16.src.tar.gz) = 20895394 > Index: lang/go/go.port.mk > =================================================================== > RCS file: /cvs/ports/lang/go/go.port.mk,v > retrieving revision 1.38 > diff -u -p -r1.38 go.port.mk > --- lang/go/go.port.mk 14 Feb 2021 23:35:22 -0000 1.38 > +++ lang/go/go.port.mk 20 Feb 2021 00:18:03 -0000 > @@ -47,7 +47,7 @@ MODGO_GOPATH ?= ${MODGO_WORKSPACE}:${MO > # We cannot assume that the maching running the built code will have SSE, > # even though the machine building the package has SSE. As such, we need > # to explicitly disable SSE on i386 builds. > -MAKE_ENV += GO386=387 > +MAKE_ENV += GO386=softfloat > MAKE_ENV += GOCACHE="${MODGO_GOCACHE}" > > MODGO_CMD ?= ${SETENV} ${MAKE_ENV} go > Index: lang/go/pkg/PLIST > =================================================================== > RCS file: /cvs/ports/lang/go/pkg/PLIST,v > retrieving revision 1.44 > diff -u -p -r1.44 PLIST > --- lang/go/pkg/PLIST 21 Jan 2021 14:47:15 -0000 1.44 > +++ lang/go/pkg/PLIST 20 Feb 2021 00:18:03 -0000 > @@ -20,6 +20,7 @@ go/api/go1.12.txt > go/api/go1.13.txt > go/api/go1.14.txt > go/api/go1.15.txt > +go/api/go1.16.txt > go/api/go1.2.txt > go/api/go1.3.txt > go/api/go1.4.txt [snip]