pkgsrc-WIP-changes archive

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

Rebase patches on top of Go 1.10.



Module Name:	pkgsrc-wip
Committed By:	Benny Siegert <bsiegert%gmail.com@localhost>
Pushed By:	bsiegert
Date:		Tue Feb 20 21:12:54 2018 +0100
Changeset:	2bbba1fb46f3bd4ba899b5f349debd801e26808f

Modified Files:
	go/distinfo
	go/patches/patch-src_cmd_link_internal_ld_elf.go
Removed Files:
	go/patches/patch-src_runtime_rt0__netbsd__arm.s

Log Message:
Rebase patches on top of Go 1.10.

The elf.go one needed some more changes because there has been
quite a bit of refactoring.

I am hoping that the netbsd_arm.s change is no longer needed, will
verify on real hardware.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=2bbba1fb46f3bd4ba899b5f349debd801e26808f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 go/distinfo                                      |  3 +-
 go/patches/patch-src_cmd_link_internal_ld_elf.go | 87 +++++++++++++++---------
 go/patches/patch-src_runtime_rt0__netbsd__arm.s  | 13 ----
 3 files changed, 54 insertions(+), 49 deletions(-)

diffs:
diff --git a/go/distinfo b/go/distinfo
index b6bf7922da..9f2df1fa90 100644
--- a/go/distinfo
+++ b/go/distinfo
@@ -6,7 +6,6 @@ SHA512 (go1.10.src.tar.gz) = 59f089e1ffb2d3aba5ada329d4f0d1181c3c4f01fa64f19d0b7
 Size (go1.10.src.tar.gz) = 18300467 bytes
 SHA1 (patch-misc_io_clangwrap.sh) = cd91c47ba0fe7b6eb8009dd261c0c26c7d581c29
 SHA1 (patch-src_cmd_dist_util.go) = 24e6f1b6ded842a8ce322a40e8766f7d344bc47e
-SHA1 (patch-src_cmd_link_internal_ld_elf.go) = acc8d92b7eae1b77470bd3e88af93d458695ac76
+SHA1 (patch-src_cmd_link_internal_ld_elf.go) = 7afd0da4734f201c8b885b743e83e5b70ddb0bf0
 SHA1 (patch-src_crypto_x509_root__bsd.go) = 93a2de7c685a0919fe93f5bc99f156e105dace4d
 SHA1 (patch-src_runtime_os__netbsd.go) = 9b80de94667e3f8d8d1ae3648ab1fe43dd55d577
-SHA1 (patch-src_runtime_rt0__netbsd__arm.s) = 45e727f4e89470505664e7c38bdb8ebd314bcaf5
diff --git a/go/patches/patch-src_cmd_link_internal_ld_elf.go b/go/patches/patch-src_cmd_link_internal_ld_elf.go
index 9def274133..2e22de4280 100644
--- a/go/patches/patch-src_cmd_link_internal_ld_elf.go
+++ b/go/patches/patch-src_cmd_link_internal_ld_elf.go
@@ -1,17 +1,25 @@
 $NetBSD: patch-src_cmd_link_internal_ld_elf.go,v 1.2 2018/01/20 18:13:25 christos Exp $
 
---- src/cmd/link/internal/ld/elf.go.orig	2017-10-25 14:30:21.000000000 -0400
-+++ src/cmd/link/internal/ld/elf.go	2018-01-20 11:49:02.046813855 -0500
-@@ -1263,6 +1263,8 @@
- 	ELF_NOTE_NETBSD_DESCSZ  = 4
- 	ELF_NOTE_NETBSD_TAG     = 1
- 	ELF_NOTE_NETBSD_VERSION = 599000000 /* NetBSD 5.99 */
+--- src/cmd/link/internal/ld/elf.go.orig	2018-02-16 17:12:19.000000000 +0000
++++ src/cmd/link/internal/ld/elf.go
+@@ -821,10 +821,12 @@ func elfwritenotehdr(out *OutBuf, str st
+ 
+ // NetBSD Signature (as per sys/exec_elf.h)
+ const (
+-	ELF_NOTE_NETBSD_NAMESZ  = 7
+-	ELF_NOTE_NETBSD_DESCSZ  = 4
+-	ELF_NOTE_NETBSD_TAG     = 1
+-	ELF_NOTE_NETBSD_VERSION = 599000000 /* NetBSD 5.99 */
++	ELF_NOTE_NETBSD_NAMESZ       = 7
++	ELF_NOTE_NETBSD_DESCSZ       = 4
++	ELF_NOTE_NETBSD_TAG          = 1
++	ELF_NOTE_NETBSD_VERSION      = 599000000 /* NetBSD 5.99 */
 +	ELF_NOTE_NETBSD_MARCH_NAMESZ = 7
 +	ELF_NOTE_NETBSD_MARCH_TAG    = 5
  )
  
  var ELF_NOTE_NETBSD_NAME = []byte("NetBSD\x00")
-@@ -1272,6 +1274,23 @@
+@@ -834,6 +836,23 @@ func elfnetbsdsig(sh *ElfShdr, startva u
  	return elfnote(sh, startva, resoff, n, true)
  }
  
@@ -32,46 +40,47 @@ $NetBSD: patch-src_cmd_link_internal_ld_elf.go,v 1.2 2018/01/20 18:13:25 christo
 +	return elfnote(sh, startva, resoff, n, true)
 +}
 +
- func elfwritenetbsdsig() int {
+ func elfwritenetbsdsig(out *OutBuf) int {
  	// Write Elf_Note header.
- 	sh := elfwritenotehdr(".note.netbsd.ident", ELF_NOTE_NETBSD_NAMESZ, ELF_NOTE_NETBSD_DESCSZ, ELF_NOTE_NETBSD_TAG)
-@@ -1285,7 +1304,20 @@
- 	Cput(0)
- 
- 	Thearch.Lput(ELF_NOTE_NETBSD_VERSION)
--
-+	if SysArch.Family == sys.ARM {
-+		mArch := elfnetbsdarmarch()
-+		descsz := len(mArch)
-+		sh2 := elfwritenotehdr(".note.netbsd.march",
-+			ELF_NOTE_NETBSD_MARCH_NAMESZ, uint32(descsz),
-+			ELF_NOTE_NETBSD_MARCH_TAG)
-+		if sh2 == nil {
-+			return 0
-+		}
-+		Cwrite(ELF_NOTE_NETBSD_NAME)
-+		Cput(0)
-+		Cwrite(mArch)
-+		return int(sh.size) + int(sh2.size)
-+	}
+ 	sh := elfwritenotehdr(out, ".note.netbsd.ident", ELF_NOTE_NETBSD_NAMESZ, ELF_NOTE_NETBSD_DESCSZ, ELF_NOTE_NETBSD_TAG)
+@@ -850,6 +869,22 @@ func elfwritenetbsdsig(out *OutBuf) int
  	return int(sh.size)
  }
  
-@@ -1902,6 +1934,9 @@
++func elfwritenetbsdarmsig(out *OutBuf) int {
++	mArch := elfnetbsdarmarch()
++	descsz := len(mArch)
++	sh := elfwritenotehdr(out, ".note.netbsd.march",
++		ELF_NOTE_NETBSD_MARCH_NAMESZ, uint32(descsz),
++		ELF_NOTE_NETBSD_MARCH_TAG)
++	if sh == nil {
++		return 0
++	}
++	out.Write(ELF_NOTE_NETBSD_NAME)
++	out.Write8(0)
++	out.Write(mArch)
++
++	return int(sh.size)
++}
++
+ // OpenBSD Signature
+ const (
+ 	ELF_NOTE_OPENBSD_NAMESZ  = 8
+@@ -1452,6 +1487,9 @@ func (ctxt *Link) doelf() {
  	}
- 	if Headtype == objabi.Hnetbsd {
+ 	if ctxt.HeadType == objabi.Hnetbsd {
  		Addstring(shstrtab, ".note.netbsd.ident")
-+		if SysArch.Family == sys.ARM {
++		if ctxt.Arch.Family == sys.ARM {
 +			Addstring(shstrtab, ".note.netbsd.march")
 +		}
  	}
- 	if Headtype == objabi.Hopenbsd {
+ 	if ctxt.HeadType == objabi.Hopenbsd {
  		Addstring(shstrtab, ".note.openbsd.ident")
-@@ -2340,6 +2375,15 @@
+@@ -1890,6 +1928,15 @@ func Asmbelf(ctxt *Link, symo int64) {
  		pnote.flags = PF_R
  		phsh(pnote, sh)
  	}
-+	if Headtype == objabi.Hnetbsd && SysArch.Family == sys.ARM {
++	if ctxt.HeadType == objabi.Hnetbsd && ctxt.Arch.Family == sys.ARM {
 +		var sh *ElfShdr
 +		sh = elfshname(".note.netbsd.march")
 +		resoff -= int64(elfnetbsdarmsig(sh, uint64(startva), uint64(resoff)))
@@ -83,3 +92,13 @@ $NetBSD: patch-src_cmd_link_internal_ld_elf.go,v 1.2 2018/01/20 18:13:25 christo
  
  	if len(buildinfo) > 0 {
  		sh := elfshname(".note.gnu.build-id")
+@@ -2232,6 +2279,9 @@ elfobj:
+ 	if ctxt.LinkMode != LinkExternal {
+ 		if ctxt.HeadType == objabi.Hnetbsd {
+ 			a += int64(elfwritenetbsdsig(ctxt.Out))
++			if ctxt.Arch.Family == sys.ARM {
++				a += int64(elfwritenetbsdarmsig(ctxt.Out))
++			}
+ 		}
+ 		if ctxt.HeadType == objabi.Hopenbsd {
+ 			a += int64(elfwriteopenbsdsig(ctxt.Out))
diff --git a/go/patches/patch-src_runtime_rt0__netbsd__arm.s b/go/patches/patch-src_runtime_rt0__netbsd__arm.s
deleted file mode 100644
index a562c8af40..0000000000
--- a/go/patches/patch-src_runtime_rt0__netbsd__arm.s
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-src_runtime_rt0__netbsd__arm.s,v 1.1 2018/01/20 16:55:05 christos Exp $
-
---- src/runtime/rt0_netbsd_arm.s.orig	2017-02-16 19:12:24.000000000 +0000
-+++ src/runtime/rt0_netbsd_arm.s
-@@ -9,3 +9,8 @@ TEXT _rt0_arm_netbsd(SB),NOSPLIT,$-4
- 	MOVW	$4(R13), R1		// argv
- 	MOVM.DB.W [R0-R1], (R13)
- 	B runtime·rt0_go(SB)
-+
-+TEXT main(SB),NOSPLIT,$-4
-+	MOVM.DB.W [R0-R1], (R13)
-+	MOVW	$runtime·rt0_go(SB), R4
-+	B	(R4)


Home | Main Index | Thread Index | Old Index