aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-05-13 15:20:34 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-05-13 15:20:34 +0000
commitb63af710f28488e8ed7dec4c38c79f2964c02bb1 (patch)
tree30dd01f1165dc97fb484da135b239b54bb000835 /community
parent68bf7a0f48b3cebd0deea7f6990def04540a583f (diff)
downloadaports-b63af710f28488e8ed7dec4c38c79f2964c02bb1.tar.bz2
aports-b63af710f28488e8ed7dec4c38c79f2964c02bb1.tar.xz
community/go-bootstrap: fix build against binutils-2.26
Upstream: https://github.com/golang/go/issues/13114
Diffstat (limited to 'community')
-rw-r--r--community/go-bootstrap/APKBUILD14
-rw-r--r--community/go-bootstrap/new-binutils.patch186
2 files changed, 196 insertions, 4 deletions
diff --git a/community/go-bootstrap/APKBUILD b/community/go-bootstrap/APKBUILD
index a9fbc42dda..f106d36b46 100644
--- a/community/go-bootstrap/APKBUILD
+++ b/community/go-bootstrap/APKBUILD
@@ -4,7 +4,7 @@
pkgname=go-bootstrap
_realname="${pkgname%-*}"
pkgver=1.4.3
-pkgrel=1
+pkgrel=2
pkgdesc="Go programming language compiler used for bootstraping"
url="http://www.golang.org/"
arch="all"
@@ -21,6 +21,7 @@ source="
no-longjmp-redefine.patch
fix-arm-hackery.patch
default-sc-getpw-r-size-max.patch
+ new-binutils.patch
"
# NOTE: building go-bootstrap for x86 with grsec kernel requires:
@@ -44,6 +45,8 @@ build() {
export GOBIN="$GOROOT"/bin
export GOROOT_FINAL=/usr/lib/$pkgname
+ export CGO_ENABLED=0
+
case "$CARCH" in
x86) export GOARCH="386" ;;
x86_64) export GOARCH="amd64" ;;
@@ -79,14 +82,17 @@ md5sums="dfb604511115dd402a77a553a5923a04 go1.4.3.src.tar.gz
4391be88ce8bacdd7fee433b39635583 no-pic.patch
93ad940db4a6d51e086f80755eaa8f53 no-longjmp-redefine.patch
81ac9f3188df7a0c16c52cc4d8cc1ffa fix-arm-hackery.patch
-fd4d1a7ccb5d37da4ff9c3a2d97aa976 default-sc-getpw-r-size-max.patch"
+fd4d1a7ccb5d37da4ff9c3a2d97aa976 default-sc-getpw-r-size-max.patch
+baa3df0785a1d9981ea92872360a19a6 new-binutils.patch"
sha256sums="9947fc705b0b841b5938c48b22dc33e9647ec0752bae66e50278df4f23f64959 go1.4.3.src.tar.gz
86fc68a50bc4a9336a003239adf1dcc6d7cabfb9c1bcf09b0d53d09100ceff12 no-pic.patch
084020e0eb6cb0aceee047bd5962872ed51dbb45465174018d108eb195c26605 no-longjmp-redefine.patch
fced8436d9c32a43a5cc87f2243529e7a8209ba73a9afd4fd7733245bc55e4e3 fix-arm-hackery.patch
-3757d5f7c4e6d3b2fed4b01c7da6e3e8c0b7789333219ab10ec0b151fb163980 default-sc-getpw-r-size-max.patch"
+3757d5f7c4e6d3b2fed4b01c7da6e3e8c0b7789333219ab10ec0b151fb163980 default-sc-getpw-r-size-max.patch
+07c22d9241f1f669c9390b08a8e4ef9f94d17387512393afff3f116347c159e0 new-binutils.patch"
sha512sums="12bade4bce9aa4b34e2b9495ae65a1fc6a2449b3a43bc4de85c8b87ba223c2f999b2f37c1e2fe1188d8521118b5e5357d27afb8b85c0b8ebb4503d4125d25273 go1.4.3.src.tar.gz
a8e95c3c536a30e15b9bad5e623a085c521739639a58ac638679d99413a1bee8823729783123cbe4495ac42822df31f4776f0380a63786b9f4fc73190e012ae5 no-pic.patch
3a9b665f8fda89729c4c269ea82f82ee515f0026d26f1d51e2cf84054456e394afc14875e7ed29280a12488907d50c70af313e2e4a5b62c328bbade098db9d4d no-longjmp-redefine.patch
573146b72c980af5e41540fd7912b5579b050e41ac9d808e8d14268cf0a0fa1a70e6fade85011c0f18f1a428bc95b225d8b8345be1c50656dc69046ef1eb0b40 fix-arm-hackery.patch
-5de9747fe60bbc60aa8ac9870f397fa8750723f919fea25a6afc22066be45a8ad193f7935d3deacbe85c032be89b8ace0a7e82b6c9981ddaf3b7f6e8d140c61f default-sc-getpw-r-size-max.patch"
+5de9747fe60bbc60aa8ac9870f397fa8750723f919fea25a6afc22066be45a8ad193f7935d3deacbe85c032be89b8ace0a7e82b6c9981ddaf3b7f6e8d140c61f default-sc-getpw-r-size-max.patch
+9c25d58d8172ade339d468b86b51a2ad964bf1a2e80d917934f318a78b9e5820f261d4742afec467ef567a905039184829c449ee9ac8f08385029d130badaebf new-binutils.patch"
diff --git a/community/go-bootstrap/new-binutils.patch b/community/go-bootstrap/new-binutils.patch
new file mode 100644
index 0000000000..6669bd6330
--- /dev/null
+++ b/community/go-bootstrap/new-binutils.patch
@@ -0,0 +1,186 @@
+https://github.com/golang/go/issues/13114
+https://gnats.netbsd.org/50777
+
+--- a/src/cmd/6l/asm.c 2014-12-11 01:18:10.000000000 +0000
++++ b/src/cmd/6l/asm.c
+@@ -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) {
+
+--- a/src/cmd/ld/ldelf.c.orig 2015-09-23 04:37:36.000000000 +0000
++++ b/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):
+
+--- a/src/cmd/ld/elf.h.orig 2015-09-23 04:37:36.000000000 +0000
++++ b/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