summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCody Schafer2020-10-26 12:51:38 -0400
committerMaciek Borzecki2020-10-26 18:02:33 +0100
commit524d21859eb8ec1dd74c9096dc90e0856d87435f (patch)
tree06f79e2f44ea2485701f931d1547ffa93f582631
parente37b2f4b19f783681db03965103ff3859fda6aad (diff)
downloadaur-524d21859eb8ec1dd74c9096dc90e0856d87435f.tar.gz
use linkmode external to fix build
Otherwise, the link fails: .rela: relocation target _cgo_26061493d47f_C2func_getaddrinfo not defined The `-linkmode external` option is included in the current go packaging guidelines
-rw-r--r--PKGBUILD2
1 files changed, 1 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 614097dae9ff..3c64ebcf58f1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -61,7 +61,7 @@ build() {
# because argument expansion with quoting in bash is hard, and -ldflags=-extldflags='-foo'
# is not exactly the same as -ldflags "-extldflags '-foo'" use the array trick
# to pass exactly what we want
- flags=(-buildmode=pie -ldflags "-s -extldflags '$LDFLAGS'" -trimpath)
+ flags=(-buildmode=pie -ldflags "-s -linkmode external -extldflags '$LDFLAGS'" -trimpath)
staticflags=(-buildmode=pie -ldflags "-s -linkmode external -extldflags '$LDFLAGS -static'" -trimpath)
# Build/install snap and snapd
go build "${flags[@]}" -o "$srcdir/go/bin/snap" "${_gourl}/cmd/snap"