summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcell Meszaros2022-06-22 17:43:36 +0200
committerMarcell Meszaros2022-06-22 18:40:17 +0200
commitc16aebd108793eb0ad86e35126f6deb018e1689a (patch)
treed1b386d32242a1cdc9afa6b77f113296dd82ea67
parent43756e90e6f5bd2f3fa78419d1976bb59e021868 (diff)
downloadaur-c16aebd108793eb0ad86e35126f6deb018e1689a.tar.gz
fix: define LDFLAGS for Go the proper way
-rw-r--r--PKGBUILD10
1 files changed, 8 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1607de4f0cd2..5464a80a8937 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -31,8 +31,14 @@ build() {
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
- export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
- go build -o "${pkgname%-*}" .
+ go build \
+ -o "${pkgname%-*}" \
+ -trimpath \
+ -buildmode='pie' \
+ -mod='readonly' \
+ -modcacherw \
+ -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
+ .
}
package() {