[153178] trunk/dports/lang/go-1.4

ciserlohn at macports.org ciserlohn at macports.org
Mon Sep 26 06:30:25 PDT 2016


Revision: 153178
          https://trac.macports.org/changeset/153178
Author:   ciserlohn at macports.org
Date:     2016-09-26 06:30:25 -0700 (Mon, 26 Sep 2016)
Log Message:
-----------
go-1.4: fix build failure on macOS 10.12

Modified Paths:
--------------
    trunk/dports/lang/go-1.4/Portfile

Added Paths:
-----------
    trunk/dports/lang/go-1.4/files/
    trunk/dports/lang/go-1.4/files/patch-src-runtime-sys_darwin_386-sierra-clock_gettime.diff

Modified: trunk/dports/lang/go-1.4/Portfile
===================================================================
--- trunk/dports/lang/go-1.4/Portfile	2016-09-26 12:10:57 UTC (rev 153177)
+++ trunk/dports/lang/go-1.4/Portfile	2016-09-26 13:30:25 UTC (rev 153178)
@@ -50,6 +50,10 @@
 
 use_configure       no
 
+if {${os.major} >= 16} {
+    patchfiles-append patch-src-runtime-sys_darwin_386-sierra-clock_gettime.diff
+} 
+
 build.dir           ${worksrcpath}/src
 build.cmd           ./make.bash
 build.target

Added: trunk/dports/lang/go-1.4/files/patch-src-runtime-sys_darwin_386-sierra-clock_gettime.diff
===================================================================
--- trunk/dports/lang/go-1.4/files/patch-src-runtime-sys_darwin_386-sierra-clock_gettime.diff	                        (rev 0)
+++ trunk/dports/lang/go-1.4/files/patch-src-runtime-sys_darwin_386-sierra-clock_gettime.diff	2016-09-26 13:30:25 UTC (rev 153178)
@@ -0,0 +1,44 @@
+diff -U3 -r a/go/src/runtime/sys_darwin_386.s b/go/src/runtime/sys_darwin_386.s
+--- src/runtime/sys_darwin_386.s	2015-09-23 05:37:37.000000000 +0100
++++ src/runtime/sys_darwin_386.s	2016-09-18 15:50:43.000000000 +0100
+@@ -182,11 +182,17 @@
+ 
+ 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
+diff -U3 -r a/go/src/runtime/sys_darwin_amd64.s b/go/src/runtime/sys_darwin_amd64.s
+--- src/runtime/sys_darwin_amd64.s	2015-09-23 05:37:37.000000000 +0100
++++ src/runtime/sys_darwin_amd64.s	2016-09-18 15:50:41.000000000 +0100
+@@ -141,10 +141,16 @@
+ 
+ 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
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160926/e6d3b584/attachment.html>


More information about the macports-changes mailing list