diff options
| author | Sören Tempel <soeren+git@soeren-tempel.net> | 2020-02-15 21:58:15 +0100 |
|---|---|---|
| committer | Natanael Copa <ncopa@alpinelinux.org> | 2020-04-14 17:10:41 +0200 |
| commit | 024b5f3be131caef69208065ec3bcdd9b9800e8f (patch) | |
| tree | 192f315e6da0836f4eeae1cd134e837d7c1b7d7e /community/go | |
| parent | e199275be33d1c6b83f6009c8e0aa492331237ff (diff) | |
| download | aports-024b5f3be131caef69208065ec3bcdd9b9800e8f.tar.bz2 aports-024b5f3be131caef69208065ec3bcdd9b9800e8f.tar.xz | |
community/go: build go itself with PIE
With default-buildmode-pie.patch removed we must pass this explicitly
since make.bash unsets GOFLAGS.
Diffstat (limited to 'community/go')
| -rw-r--r-- | community/go/APKBUILD | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/community/go/APKBUILD b/community/go/APKBUILD index 10c0d1cb49..b37381b09f 100644 --- a/community/go/APKBUILD +++ b/community/go/APKBUILD @@ -4,7 +4,7 @@ pkgname=go # go binaries are statically linked, security updates require rebuilds pkgver=1.13.8 -pkgrel=1 +pkgrel=2 pkgdesc="Go programming language compiler" url="https://golang.org/" arch="all" @@ -75,6 +75,11 @@ mipsel) export GOARCH="mipsle" GOMIPS=softfloat ;; *) export GOARCH="unsupported";; esac +# compile go itself as a PIE on supported arches. +case "$CARCH" in +x86_64|s390x|aarch64) export GO_LDFLAGS=-buildmode=pie ;; +esac + builddir="$srcdir"/go build() { cd "$builddir/src" |
