aboutsummaryrefslogtreecommitdiffstats
path: root/community/go
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-07-07 11:44:55 +0300
committerTimo Teräs <timo.teras@iki.fi>2016-07-07 12:10:15 +0300
commit9515100a5f4a9ad7b6b1d44a5fb9a7b1a6083aa7 (patch)
tree02320565bd28bb140ff8ed30d580a2f6facc58ff /community/go
parent6321ef7fe6e86df2bd03666e0feaa7bfbf80b52c (diff)
downloadaports-9515100a5f4a9ad7b6b1d44a5fb9a7b1a6083aa7.tar.bz2
aports-9515100a5f4a9ad7b6b1d44a5fb9a7b1a6083aa7.tar.xz
community/go: default buildmode=pie
Diffstat (limited to 'community/go')
-rw-r--r--community/go/APKBUILD10
-rw-r--r--community/go/default-buildmode-pie.patch12
-rw-r--r--community/go/no-pic.patch16
3 files changed, 17 insertions, 21 deletions
diff --git a/community/go/APKBUILD b/community/go/APKBUILD
index 5328c448de..75814a3796 100644
--- a/community/go/APKBUILD
+++ b/community/go/APKBUILD
@@ -4,7 +4,7 @@ pkgname=go
pkgver=1.6.2
# This should be the latest commit on the corresponding release branch
_toolsver="c887be1b2ebd11663d4bf2fbca508c449172339e"
-pkgrel=4
+pkgrel=5
pkgdesc="Go programming language compiler"
url="http://www.golang.org/"
arch="all"
@@ -17,7 +17,7 @@ install=""
subpackages="$pkgname-doc $pkgname-tools $pkgname-cross"
source="http://golang.org/dl/go${pkgver}.src.tar.gz
$pkgname-tools-$pkgver.tar.gz::https://github.com/golang/tools/archive/${_toolsver}.tar.gz
- no-pic.patch
+ default-buildmode-pie.patch
"
# NOTE: building go for x86 with grsec kernel requires:
@@ -147,10 +147,10 @@ cross() {
}
md5sums="d1b50fa98d9a71eeee829051411e6207 go1.6.2.src.tar.gz
733a96b59562ed84ff552542f16a3ab3 go-tools-1.6.2.tar.gz
-efa8ac40fa8429f7cd6f23eca05a0a0f no-pic.patch"
+1e3ad4f657ac6c22a92e8fc907893e4f default-buildmode-pie.patch"
sha256sums="787b0b750d037016a30c6ed05a8a70a91b2e9db4bd9b1a2453aa502a63f1bccc go1.6.2.src.tar.gz
955e5a119babad356d9cf00cdaaf3c27648d4451109b467c872fad8cc94d5b56 go-tools-1.6.2.tar.gz
-1eb60ded9035e9692e4c17b2bb6e9c073e21261eaafa56ee0528d5d2c43a936d no-pic.patch"
+f3e5a8e0c1c05c34f489ccbfb65291ab2265fa0ef04b8b501e5c98b17547c4b9 default-buildmode-pie.patch"
sha512sums="e148022f9e18b5d5b05744f1aa9fa3ef82e255752179545711ade077e271216aa5b450859a764fdfb028ae4faa26adad8d0a0a5268b31396ab9d14de3cb2f20a go1.6.2.src.tar.gz
955def7cc3e5ceb5d8e47477400007d32c25f3bc2764f04a0451bd0235af507e63a0966d201a345f51ac764471da8620b5357d1099ec39e2422bd04d25fd71b8 go-tools-1.6.2.tar.gz
-51e4c3ee0cda98090db5d00468072bcbf5f0a1a429dd8dedddccaa1467b285f724b012be96d329566b195470bea0aaf4b464e8ba6d2029b0dd42678a7a14b663 no-pic.patch"
+13cd386c38875b951da4057586007f3c67503dc79ddf57befbf763af85ec2cd2a2e6b00614450c179c93f1f8747ee7456ee412adccd08a5f115b33812598a148 default-buildmode-pie.patch"
diff --git a/community/go/default-buildmode-pie.patch b/community/go/default-buildmode-pie.patch
new file mode 100644
index 0000000000..034692a098
--- /dev/null
+++ b/community/go/default-buildmode-pie.patch
@@ -0,0 +1,12 @@
+--- go/src/cmd/go/build.go.orig 2016-07-07 11:52:03.315793199 +0300
++++ go/src/cmd/go/build.go 2016-04-20 02:50:07.000000000 +0300
+@@ -363,7 +363,8 @@
+ ldBuildmode = "c-shared"
+ case "default":
+ switch platform {
++ case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le",
++ "android/amd64", "android/arm", "android/arm64", "android/386":
+- case "android/arm", "android/arm64", "android/amd64", "android/386":
+ codegenArg = "-shared"
+ ldBuildmode = "pie"
+ default:
diff --git a/community/go/no-pic.patch b/community/go/no-pic.patch
deleted file mode 100644
index db1f809dcc..0000000000
--- a/community/go/no-pic.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
-index 8ccbec9dd634..4e96bfadc260 100644
---- a/src/cmd/link/internal/ld/lib.go
-+++ b/src/cmd/link/internal/ld/lib.go
-@@ -1194,6 +1194,11 @@ func hostlink() {
- argv = append(argv, peimporteddlls()...)
- }
-
-+ // The Go linker does not currently support building PIE
-+ // executables when using the external linker. See:
-+ // https://github.com/golang/go/issues/6940
-+ argv = append(argv, "-fno-PIC")
-+
- if Debug['v'] != 0 {
- fmt.Fprintf(&Bso, "host link:")
- for _, v := range argv {