diff options
author | Cody Schafer | 2020-10-26 12:51:38 -0400 |
---|---|---|
committer | Maciek Borzecki | 2020-10-26 18:02:33 +0100 |
commit | 524d21859eb8ec1dd74c9096dc90e0856d87435f (patch) | |
tree | 06f79e2f44ea2485701f931d1547ffa93f582631 | |
parent | e37b2f4b19f783681db03965103ff3859fda6aad (diff) | |
download | aur-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-- | PKGBUILD | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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" |