Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK)) by mollari.NetBSD.org (Postfix) with ESMTPS id DB68D7A110 for ; Tue, 4 Oct 2016 18:45:24 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 4B65E85E85; Tue, 4 Oct 2016 18:45:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id D120585E77 for ; Tue, 4 Oct 2016 18:45:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id CiIswNRS58AR for ; Tue, 4 Oct 2016 18:45:23 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 23B3885E00 for ; Tue, 4 Oct 2016 18:45:23 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 213CDFBD2; Tue, 4 Oct 2016 18:45:23 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_14756067235030" MIME-Version: 1.0 Date: Tue, 4 Oct 2016 18:45:23 +0000 From: "Benny Siegert" Subject: CVS commit: pkgsrc/lang/go14 To: pkgsrc-changes@NetBSD.org Reply-To: bsiegert@netbsd.org X-Mailer: log_accum Message-Id: <20161004184523.213CDFBD2@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk This is a multi-part message in MIME format. --_----------=_14756067235030 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: bsiegert Date: Tue Oct 4 18:45:23 UTC 2016 Modified Files: pkgsrc/lang/go14: Makefile distinfo Added Files: pkgsrc/lang/go14/patches: patch-src_runtime_sys__darwin__386.s patch-src_runtime_sys__darwin__amd64.s patch-src_syscall_syscall__darwin__386.go patch-src_syscall_syscall__darwin__amd64.go Log Message: Backport fixes for compiling under macOS Sierra from https://github.com/golang/go/issues/16352. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 pkgsrc/lang/go14/Makefile cvs rdiff -u -r1.6 -r1.7 pkgsrc/lang/go14/distinfo cvs rdiff -u -r0 -r1.1 \ pkgsrc/lang/go14/patches/patch-src_runtime_sys__darwin__386.s \ pkgsrc/lang/go14/patches/patch-src_runtime_sys__darwin__amd64.s \ pkgsrc/lang/go14/patches/patch-src_syscall_syscall__darwin__386.go \ pkgsrc/lang/go14/patches/patch-src_syscall_syscall__darwin__amd64.go Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_14756067235030 Content-Disposition: inline Content-Length: 6935 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/lang/go14/Makefile diff -u pkgsrc/lang/go14/Makefile:1.8 pkgsrc/lang/go14/Makefile:1.9 --- pkgsrc/lang/go14/Makefile:1.8 Sat Jul 9 06:38:25 2016 +++ pkgsrc/lang/go14/Makefile Tue Oct 4 18:45:22 2016 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.8 2016/07/09 06:38:25 wiz Exp $ +# $NetBSD: Makefile,v 1.9 2016/10/04 18:45:22 bsiegert Exp $ .include "../../lang/go/version.mk" DISTNAME= go${GO14_VERSION}.src PKGNAME= go14-${GO14_VERSION} -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= lang MASTER_SITES= https://storage.googleapis.com/golang/ PATCH_SITES= https://codereview.appspot.com/download/ Index: pkgsrc/lang/go14/distinfo diff -u pkgsrc/lang/go14/distinfo:1.6 pkgsrc/lang/go14/distinfo:1.7 --- pkgsrc/lang/go14/distinfo:1.6 Sun Feb 21 14:32:24 2016 +++ pkgsrc/lang/go14/distinfo Tue Oct 4 18:45:22 2016 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.6 2016/02/21 14:32:24 bsiegert Exp $ +$NetBSD: distinfo,v 1.7 2016/10/04 18:45:22 bsiegert Exp $ SHA1 (go1.4.3.src.tar.gz) = 486db10dc571a55c8d795365070f66d343458c48 RMD160 (go1.4.3.src.tar.gz) = b1fbb2805a777c8107e7c946f36a881303ac5e35 @@ -33,5 +33,9 @@ SHA1 (patch-src_runtime_cgo_setenv.c) = SHA1 (patch-src_runtime_netpoll__solaris.c) = ae399518bb02d6b898734a52dfa7fe18f041e1ec SHA1 (patch-src_runtime_os__solaris.c) = eec5b293fe4a72f58e4cd51cd23ea6e6fce714b6 SHA1 (patch-src_runtime_os__solaris.h) = c0a39aa6ab57eca7056178c87ebb00bb21236499 +SHA1 (patch-src_runtime_sys__darwin__386.s) = e352e039bba8435a48b88c76290b245731c299ed +SHA1 (patch-src_runtime_sys__darwin__amd64.s) = 3eccddc8228657db1480393f8476ddd68ac942ff SHA1 (patch-src_runtime_sys__solaris__amd64.s) = 88f2e3fc43b0d6e4f17ef06d3f4f27cfed3103c6 SHA1 (patch-src_runtime_thunk__solaris__amd64.s) = 2835cdc171ae3209c61ef804fbfbf22cdf68bf43 +SHA1 (patch-src_syscall_syscall__darwin__386.go) = 2f0986bdb199feaa73e933a1a75df87e5c7a8bff +SHA1 (patch-src_syscall_syscall__darwin__amd64.go) = 1bfba4b0f1e2fe6dee55b24f7f8d7cd89d05dea0 Added files: Index: pkgsrc/lang/go14/patches/patch-src_runtime_sys__darwin__386.s diff -u /dev/null pkgsrc/lang/go14/patches/patch-src_runtime_sys__darwin__386.s:1.1 --- /dev/null Tue Oct 4 18:45:23 2016 +++ pkgsrc/lang/go14/patches/patch-src_runtime_sys__darwin__386.s Tue Oct 4 18:45:22 2016 @@ -0,0 +1,23 @@ +$NetBSD: patch-src_runtime_sys__darwin__386.s,v 1.1 2016/10/04 18:45:22 bsiegert Exp $ + +--- src/runtime/sys_darwin_386.s.orig 2016-10-04 18:40:17.000000000 +0000 ++++ src/runtime/sys_darwin_386.s +@@ -182,11 +182,17 @@ timeloop: + + systime: + // Fall back to system call (usually first call in this thread) +- LEAL 12(SP), AX // must be non-nil, unused ++ LEAL 16(SP), AX // must be non-nil, unused + MOVL AX, 4(SP) + MOVL $0, 8(SP) // time zone pointer ++ MOVL $0, 12(SP) // required as of Sierra; Issue 16570 + MOVL $116, AX + INT $0x80 ++ CMPL AX, $0 ++ JNE inreg ++ MOVL 16(SP), AX ++ MOVL 20(SP), DX ++inreg: + // sec is in AX, usec in DX + // convert to DX:AX nsec + MOVL DX, BX Index: pkgsrc/lang/go14/patches/patch-src_runtime_sys__darwin__amd64.s diff -u /dev/null pkgsrc/lang/go14/patches/patch-src_runtime_sys__darwin__amd64.s:1.1 --- /dev/null Tue Oct 4 18:45:23 2016 +++ pkgsrc/lang/go14/patches/patch-src_runtime_sys__darwin__amd64.s Tue Oct 4 18:45:22 2016 @@ -0,0 +1,22 @@ +$NetBSD: patch-src_runtime_sys__darwin__amd64.s,v 1.1 2016/10/04 18:45:22 bsiegert Exp $ + +--- src/runtime/sys_darwin_amd64.s.orig 2016-10-04 18:40:17.000000000 +0000 ++++ src/runtime/sys_darwin_amd64.s +@@ -141,10 +141,16 @@ timeloop: + + systime: + // Fall back to system call (usually first call in this thread). +- MOVQ SP, DI // must be non-nil, unused ++ MOVQ SP, DI + MOVQ $0, SI ++ MOVQ $0, DX // required as of Sierra; Issue 16570 + MOVL $(0x2000000+116), AX + SYSCALL ++ CMPQ AX, $0 ++ JNE inreg ++ MOVQ 0(SP), AX ++ MOVL 8(SP), DX ++inreg: + // sec is in AX, usec in DX + // return nsec in AX + IMULQ $1000000000, AX Index: pkgsrc/lang/go14/patches/patch-src_syscall_syscall__darwin__386.go diff -u /dev/null pkgsrc/lang/go14/patches/patch-src_syscall_syscall__darwin__386.go:1.1 --- /dev/null Tue Oct 4 18:45:23 2016 +++ pkgsrc/lang/go14/patches/patch-src_syscall_syscall__darwin__386.go Tue Oct 4 18:45:22 2016 @@ -0,0 +1,35 @@ +$NetBSD: patch-src_syscall_syscall__darwin__386.go,v 1.1 2016/10/04 18:45:22 bsiegert Exp $ + +Support Mac OS Sierra. https://github.com/golang/go/issues/16352 + +--- src/syscall/syscall_darwin_386.go.orig 2015-09-23 04:37:37.000000000 +0000 ++++ src/syscall/syscall_darwin_386.go +@@ -26,14 +26,21 @@ func NsecToTimeval(nsec int64) (tv Timev + } + + //sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error) +-func Gettimeofday(tv *Timeval) (err error) { +- // The tv passed to gettimeofday must be non-nil +- // but is otherwise unused. The answers come back +- // in the two registers. ++func Gettimeofday(tv *Timeval) error { ++ // The tv passed to gettimeofday must be non-nil. ++ // Before macOS Sierra (10.12), tv was otherwise unused and ++ // the answers came back in the two registers. ++ // As of Sierra, gettimeofday return zeros and populates ++ // tv itself. + sec, usec, err := gettimeofday(tv) +- tv.Sec = int32(sec) +- tv.Usec = int32(usec) +- return err ++ if err != nil { ++ return err ++ } ++ if sec != 0 || usec != 0 { ++ tv.Sec = int32(sec) ++ tv.Usec = int32(usec) ++ } ++ return nil + } + + func SetKevent(k *Kevent_t, fd, mode, flags int) { Index: pkgsrc/lang/go14/patches/patch-src_syscall_syscall__darwin__amd64.go diff -u /dev/null pkgsrc/lang/go14/patches/patch-src_syscall_syscall__darwin__amd64.go:1.1 --- /dev/null Tue Oct 4 18:45:23 2016 +++ pkgsrc/lang/go14/patches/patch-src_syscall_syscall__darwin__amd64.go Tue Oct 4 18:45:22 2016 @@ -0,0 +1,35 @@ +$NetBSD: patch-src_syscall_syscall__darwin__amd64.go,v 1.1 2016/10/04 18:45:22 bsiegert Exp $ + +Support Mac OS Sierra. https://github.com/golang/go/issues/16352 + +--- src/syscall/syscall_darwin_amd64.go.orig 2015-09-23 04:37:37.000000000 +0000 ++++ src/syscall/syscall_darwin_amd64.go +@@ -26,14 +26,21 @@ func NsecToTimeval(nsec int64) (tv Timev + } + + //sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error) +-func Gettimeofday(tv *Timeval) (err error) { +- // The tv passed to gettimeofday must be non-nil +- // but is otherwise unused. The answers come back +- // in the two registers. ++func Gettimeofday(tv *Timeval) error { ++ // The tv passed to gettimeofday must be non-nil. ++ // Before macOS Sierra (10.12), tv was otherwise unused and ++ // the answers came back in the two registers. ++ // As of Sierra, gettimeofday return zeros and populates ++ // tv itself. + sec, usec, err := gettimeofday(tv) +- tv.Sec = sec +- tv.Usec = usec +- return err ++ if err != nil { ++ return err ++ } ++ if sec != 0 || usec != 0 { ++ tv.Sec = sec ++ tv.Usec = usec ++ } ++ return nil + } + + func SetKevent(k *Kevent_t, fd, mode, flags int) { --_----------=_14756067235030--