diff options
author | bsiegert <bsiegert@pkgsrc.org> | 2016-02-21 14:32:24 +0000 |
---|---|---|
committer | bsiegert <bsiegert@pkgsrc.org> | 2016-02-21 14:32:24 +0000 |
commit | acf833dfd994e06115d54239fc7a931412d0fe3b (patch) | |
tree | 5a1204474519875dd67ac622b065f9d350cb1fe8 /lang | |
parent | dd0610499b12ce713c06e91f19fd408fd80c4592 (diff) | |
download | pkgsrc-acf833dfd994e06115d54239fc7a931412d0fe3b.tar.gz |
Backport fix for new binutils to make go14 compile under NetBSD-current.
Patch from Ryo Onodera in PR pkg/50777.
The upstream bug report is https://github.com/golang/go/issues/13114.
Bump PKGREVISION.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/go14/Makefile | 4 | ||||
-rw-r--r-- | lang/go14/distinfo | 8 | ||||
-rw-r--r-- | lang/go14/patches/patch-src_cmd_6l_asm.c | 17 | ||||
-rw-r--r-- | lang/go14/patches/patch-src_cmd_8l_asm.c | 14 | ||||
-rw-r--r-- | lang/go14/patches/patch-src_cmd_ld_elf.h | 154 | ||||
-rw-r--r-- | lang/go14/patches/patch-src_cmd_ld_ldelf.c | 20 |
6 files changed, 205 insertions, 12 deletions
diff --git a/lang/go14/Makefile b/lang/go14/Makefile index 91d4d45a5d9..212ca032864 100644 --- a/lang/go14/Makefile +++ b/lang/go14/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.6 2015/12/21 20:20:02 bsiegert Exp $ +# $NetBSD: Makefile,v 1.7 2016/02/21 14:32:24 bsiegert Exp $ .include "../../lang/go/version.mk" DISTNAME= go${GO14_VERSION}.src PKGNAME= go14-${GO14_VERSION} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= lang MASTER_SITES= https://storage.googleapis.com/golang/ PATCH_SITES= https://codereview.appspot.com/download/ diff --git a/lang/go14/distinfo b/lang/go14/distinfo index 77503b380f5..0315e51ad6c 100644 --- a/lang/go14/distinfo +++ b/lang/go14/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.5 2015/12/21 20:20:02 bsiegert Exp $ +$NetBSD: distinfo,v 1.6 2016/02/21 14:32:24 bsiegert Exp $ SHA1 (go1.4.3.src.tar.gz) = 486db10dc571a55c8d795365070f66d343458c48 RMD160 (go1.4.3.src.tar.gz) = b1fbb2805a777c8107e7c946f36a881303ac5e35 @@ -10,12 +10,14 @@ SHA1 (patch-misc_cgo_testso_cgoso.go) = ef782a6f173c814656eac0df640aedaa1a923bbc SHA1 (patch-misc_cgo_testso_cgoso__unix.go) = 58e221e1ce123428a3fe6ecededf0590cbfb81ca SHA1 (patch-src_cmd_5l_asm.c) = fd78203b7c92b9bbd057077671d649bac2d121ee SHA1 (patch-src_cmd_6c_txt.c) = 7ccddadedceb13b6a7c2f29cdfca501a85888488 -SHA1 (patch-src_cmd_6l_asm.c) = 1f244d7c760e738057b1649ed486206a6ec3812b -SHA1 (patch-src_cmd_8l_asm.c) = e5233a3d9b08f2ef8d809756ef7d6fc4b03303b9 +SHA1 (patch-src_cmd_6l_asm.c) = e15ece4886c459c500b91b3b0c6a4ccbe111bfc0 +SHA1 (patch-src_cmd_8l_asm.c) = a402a0db31d875cc04e8e15b2e4567ff2f77fee3 SHA1 (patch-src_cmd_go_build.go) = f7705aa955241d3add353a144a676a58a0a1617e SHA1 (patch-src_cmd_go_pkg.go) = e70441f3fdf312eb389e4dd5408c207a4d4b8350 SHA1 (patch-src_cmd_ld_data.c) = 96181bac03333f7bc5293ab9ddbd68bb9174ed47 SHA1 (patch-src_cmd_ld_doc.go) = 000447f5a5862358a85a7510dc92195494972e26 +SHA1 (patch-src_cmd_ld_elf.h) = 067272ae88ec8631917e260c260ecbc84ce33dd5 +SHA1 (patch-src_cmd_ld_ldelf.c) = fce969ab60486b892b1bb81cd84237b77bf6e65f SHA1 (patch-src_cmd_ld_lib.h) = e6aa8b9520e1b75f435e179e5ea4f0ef738621f4 SHA1 (patch-src_cmd_ld_pobj.c) = eaf67d6bc4f9ba835893f9d8c2d36941ff84933d SHA1 (patch-src_crypto_x509_root__unix.go) = c933f334da1c8de48a06d23abd12da01f73776e6 diff --git a/lang/go14/patches/patch-src_cmd_6l_asm.c b/lang/go14/patches/patch-src_cmd_6l_asm.c index ed430260909..de0e0f0f1aa 100644 --- a/lang/go14/patches/patch-src_cmd_6l_asm.c +++ b/lang/go14/patches/patch-src_cmd_6l_asm.c @@ -1,10 +1,19 @@ -$NetBSD: patch-src_cmd_6l_asm.c,v 1.1 2015/07/31 14:46:25 bsiegert Exp $ +$NetBSD: patch-src_cmd_6l_asm.c,v 1.2 2016/02/21 14:32:24 bsiegert Exp $ Support cgo on illumos. ---- src/cmd/6l/asm.c.orig 2014-12-11 01:18:10.000000000 +0000 +--- src/cmd/6l/asm.c.orig 2015-09-23 04:37:36.000000000 +0000 +++ src/cmd/6l/asm.c -@@ -209,12 +209,23 @@ adddynrel(LSym *s, Reloc *r) +@@ -118,6 +118,8 @@ adddynrel(LSym *s, Reloc *r) + return; + + case 256 + R_X86_64_GOTPCREL: ++ case 256 + R_X86_64_GOTPCRELX: ++ case 256 + R_X86_64_REX_GOTPCRELX: + if(targ->type != SDYNIMPORT) { + // have symbol + if(r->off >= 2 && s->p[r->off-2] == 0x8b) { +@@ -209,12 +211,23 @@ adddynrel(LSym *s, Reloc *r) case R_ADDR: if(s->type == STEXT && iself) { @@ -34,7 +43,7 @@ Support cgo on illumos. return; } if(s->type != SDATA) -@@ -539,28 +550,9 @@ adddynsym(Link *ctxt, LSym *s) +@@ -539,28 +552,9 @@ adddynsym(Link *ctxt, LSym *s) /* reserved */ adduint8(ctxt, d, 0); diff --git a/lang/go14/patches/patch-src_cmd_8l_asm.c b/lang/go14/patches/patch-src_cmd_8l_asm.c index d40678259e4..f39d4bc75c0 100644 --- a/lang/go14/patches/patch-src_cmd_8l_asm.c +++ b/lang/go14/patches/patch-src_cmd_8l_asm.c @@ -1,10 +1,18 @@ -$NetBSD: patch-src_cmd_8l_asm.c,v 1.1 2015/07/31 14:46:25 bsiegert Exp $ +$NetBSD: patch-src_cmd_8l_asm.c,v 1.2 2016/02/21 14:32:24 bsiegert Exp $ Support cgo on illumos. ---- src/cmd/8l/asm.c.orig 2014-12-11 01:18:10.000000000 +0000 +--- src/cmd/8l/asm.c.orig 2015-09-23 04:37:36.000000000 +0000 +++ src/cmd/8l/asm.c -@@ -508,27 +508,8 @@ adddynsym(Link *ctxt, LSym *s) +@@ -115,6 +115,7 @@ adddynrel(LSym *s, Reloc *r) + return; + + case 256 + R_386_GOT32: ++ case 256 + R_386_GOT32X: + if(targ->type != SDYNIMPORT) { + // have symbol + if(r->off >= 2 && s->p[r->off-2] == 0x8b) { +@@ -508,27 +509,8 @@ adddynsym(Link *ctxt, LSym *s) adduint8(ctxt, d, t); adduint8(ctxt, d, 0); diff --git a/lang/go14/patches/patch-src_cmd_ld_elf.h b/lang/go14/patches/patch-src_cmd_ld_elf.h new file mode 100644 index 00000000000..67abff3bd99 --- /dev/null +++ b/lang/go14/patches/patch-src_cmd_ld_elf.h @@ -0,0 +1,154 @@ +$NetBSD: patch-src_cmd_ld_elf.h,v 1.1 2016/02/21 14:32:24 bsiegert Exp $ + +--- src/cmd/ld/elf.h.orig 2015-09-23 04:37:36.000000000 +0000 ++++ src/cmd/ld/elf.h +@@ -478,32 +478,47 @@ typedef struct { + * Relocation types. + */ + +-#define R_X86_64_NONE 0 /* No relocation. */ +-#define R_X86_64_64 1 /* Add 64 bit symbol value. */ +-#define R_X86_64_PC32 2 /* PC-relative 32 bit signed sym value. */ +-#define R_X86_64_GOT32 3 /* PC-relative 32 bit GOT offset. */ +-#define R_X86_64_PLT32 4 /* PC-relative 32 bit PLT offset. */ +-#define R_X86_64_COPY 5 /* Copy data from shared object. */ +-#define R_X86_64_GLOB_DAT 6 /* Set GOT entry to data address. */ +-#define R_X86_64_JMP_SLOT 7 /* Set GOT entry to code address. */ +-#define R_X86_64_RELATIVE 8 /* Add load address of shared object. */ +-#define R_X86_64_GOTPCREL 9 /* Add 32 bit signed pcrel offset to GOT. */ +-#define R_X86_64_32 10 /* Add 32 bit zero extended symbol value */ +-#define R_X86_64_32S 11 /* Add 32 bit sign extended symbol value */ +-#define R_X86_64_16 12 /* Add 16 bit zero extended symbol value */ +-#define R_X86_64_PC16 13 /* Add 16 bit signed extended pc relative symbol value */ +-#define R_X86_64_8 14 /* Add 8 bit zero extended symbol value */ +-#define R_X86_64_PC8 15 /* Add 8 bit signed extended pc relative symbol value */ +-#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */ +-#define R_X86_64_DTPOFF64 17 /* Offset in TLS block */ +-#define R_X86_64_TPOFF64 18 /* Offset in static TLS block */ +-#define R_X86_64_TLSGD 19 /* PC relative offset to GD GOT entry */ +-#define R_X86_64_TLSLD 20 /* PC relative offset to LD GOT entry */ +-#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ +-#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */ +-#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */ +- +-#define R_X86_64_COUNT 24 /* Count of defined relocation types. */ ++#define R_X86_64_NONE 0 ++#define R_X86_64_64 1 ++#define R_X86_64_PC32 2 ++#define R_X86_64_GOT32 3 ++#define R_X86_64_PLT32 4 ++#define R_X86_64_COPY 5 ++#define R_X86_64_GLOB_DAT 6 ++#define R_X86_64_JMP_SLOT 7 ++#define R_X86_64_RELATIVE 8 ++#define R_X86_64_GOTPCREL 9 ++#define R_X86_64_32 10 ++#define R_X86_64_32S 11 ++#define R_X86_64_16 12 ++#define R_X86_64_PC16 13 ++#define R_X86_64_8 14 ++#define R_X86_64_PC8 15 ++#define R_X86_64_DTPMOD64 16 ++#define R_X86_64_DTPOFF64 17 ++#define R_X86_64_TPOFF64 18 ++#define R_X86_64_TLSGD 19 ++#define R_X86_64_TLSLD 20 ++#define R_X86_64_DTPOFF32 21 ++#define R_X86_64_GOTTPOFF 22 ++#define R_X86_64_TPOFF32 23 ++#define R_X86_64_PC64 24 ++#define R_X86_64_GOTOFF64 25 ++#define R_X86_64_GOTPC32 26 ++#define R_X86_64_GOT64 27 ++#define R_X86_64_GOTPCREL64 28 ++#define R_X86_64_GOTPC64 29 ++#define R_X86_64_GOTPLT64 30 ++#define R_X86_64_PLTOFF64 31 ++#define R_X86_64_SIZE32 32 ++#define R_X86_64_SIZE64 33 ++#define R_X86_64_GOTPC32_TLSDEC 34 ++#define R_X86_64_TLSDESC_CALL 35 ++#define R_X86_64_TLSDESC 36 ++#define R_X86_64_IRELATIVE 37 ++#define R_X86_64_PC32_BND 40 ++#define R_X86_64_GOTPCRELX 41 ++#define R_X86_64_REX_GOTPCRELX 42 + + + #define R_ALPHA_NONE 0 /* No reloc */ +@@ -581,39 +596,42 @@ typedef struct { + #define R_ARM_COUNT 38 /* Count of defined relocation types. */ + + +-#define R_386_NONE 0 /* No relocation. */ +-#define R_386_32 1 /* Add symbol value. */ +-#define R_386_PC32 2 /* Add PC-relative symbol value. */ +-#define R_386_GOT32 3 /* Add PC-relative GOT offset. */ +-#define R_386_PLT32 4 /* Add PC-relative PLT offset. */ +-#define R_386_COPY 5 /* Copy data from shared object. */ +-#define R_386_GLOB_DAT 6 /* Set GOT entry to data address. */ +-#define R_386_JMP_SLOT 7 /* Set GOT entry to code address. */ +-#define R_386_RELATIVE 8 /* Add load address of shared object. */ +-#define R_386_GOTOFF 9 /* Add GOT-relative symbol address. */ +-#define R_386_GOTPC 10 /* Add PC-relative GOT table address. */ +-#define R_386_TLS_TPOFF 14 /* Negative offset in static TLS block */ +-#define R_386_TLS_IE 15 /* Absolute address of GOT for -ve static TLS */ +-#define R_386_TLS_GOTIE 16 /* GOT entry for negative static TLS block */ +-#define R_386_TLS_LE 17 /* Negative offset relative to static TLS */ +-#define R_386_TLS_GD 18 /* 32 bit offset to GOT (index,off) pair */ +-#define R_386_TLS_LDM 19 /* 32 bit offset to GOT (index,zero) pair */ +-#define R_386_TLS_GD_32 24 /* 32 bit offset to GOT (index,off) pair */ +-#define R_386_TLS_GD_PUSH 25 /* pushl instruction for Sun ABI GD sequence */ +-#define R_386_TLS_GD_CALL 26 /* call instruction for Sun ABI GD sequence */ +-#define R_386_TLS_GD_POP 27 /* popl instruction for Sun ABI GD sequence */ +-#define R_386_TLS_LDM_32 28 /* 32 bit offset to GOT (index,zero) pair */ +-#define R_386_TLS_LDM_PUSH 29 /* pushl instruction for Sun ABI LD sequence */ +-#define R_386_TLS_LDM_CALL 30 /* call instruction for Sun ABI LD sequence */ +-#define R_386_TLS_LDM_POP 31 /* popl instruction for Sun ABI LD sequence */ +-#define R_386_TLS_LDO_32 32 /* 32 bit offset from start of TLS block */ +-#define R_386_TLS_IE_32 33 /* 32 bit offset to GOT static TLS offset entry */ +-#define R_386_TLS_LE_32 34 /* 32 bit offset within static TLS block */ +-#define R_386_TLS_DTPMOD32 35 /* GOT entry containing TLS index */ +-#define R_386_TLS_DTPOFF32 36 /* GOT entry containing TLS offset */ +-#define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */ +- +-#define R_386_COUNT 38 /* Count of defined relocation types. */ ++#define R_386_NONE 0 ++#define R_386_32 1 ++#define R_386_PC32 2 ++#define R_386_GOT32 3 ++#define R_386_PLT32 4 ++#define R_386_COPY 5 ++#define R_386_GLOB_DAT 6 ++#define R_386_JMP_SLOT 7 ++#define R_386_RELATIVE 8 ++#define R_386_GOTOFF 9 ++#define R_386_GOTPC 10 ++#define R_386_TLS_TPOFF 14 ++#define R_386_TLS_IE 15 ++#define R_386_TLS_GOTIE 16 ++#define R_386_TLS_LE 17 ++#define R_386_TLS_GD 18 ++#define R_386_TLS_LDM 19 ++#define R_386_TLS_GD_32 24 ++#define R_386_TLS_GD_PUSH 25 ++#define R_386_TLS_GD_CALL 26 ++#define R_386_TLS_GD_POP 27 ++#define R_386_TLS_LDM_32 28 ++#define R_386_TLS_LDM_PUSH 29 ++#define R_386_TLS_LDM_CALL 30 ++#define R_386_TLS_LDM_POP 31 ++#define R_386_TLS_LDO_32 32 ++#define R_386_TLS_IE_32 33 ++#define R_386_TLS_LE_32 34 ++#define R_386_TLS_DTPMOD32 35 ++#define R_386_TLS_DTPOFF32 36 ++#define R_386_TLS_TPOFF32 37 ++#define R_386_TLS_GOTDESC 39 ++#define R_386_TLS_DESC_CALL 40 ++#define R_386_TLS_DESC 41 ++#define R_386_IRELATIVE 42 ++#define R_386_GOT32X 43 + + #define R_PPC_NONE 0 /* No relocation. */ + #define R_PPC_ADDR32 1 diff --git a/lang/go14/patches/patch-src_cmd_ld_ldelf.c b/lang/go14/patches/patch-src_cmd_ld_ldelf.c new file mode 100644 index 00000000000..b18e58d7bbf --- /dev/null +++ b/lang/go14/patches/patch-src_cmd_ld_ldelf.c @@ -0,0 +1,20 @@ +$NetBSD: patch-src_cmd_ld_ldelf.c,v 1.1 2016/02/21 14:32:24 bsiegert Exp $ + +--- src/cmd/ld/ldelf.c.orig 2015-09-23 04:37:36.000000000 +0000 ++++ src/cmd/ld/ldelf.c +@@ -888,12 +888,15 @@ reltype(char *pn, int elftype, uchar *si + case R('6', R_X86_64_PC32): + case R('6', R_X86_64_PLT32): + case R('6', R_X86_64_GOTPCREL): ++ case R('6', R_X86_64_GOTPCRELX): ++ case R('6', R_X86_64_REX_GOTPCRELX): + case R('8', R_386_32): + case R('8', R_386_PC32): + case R('8', R_386_GOT32): + case R('8', R_386_PLT32): + case R('8', R_386_GOTOFF): + case R('8', R_386_GOTPC): ++ case R('8', R_386_GOT32X): + *siz = 4; + break; + case R('6', R_X86_64_64): |