diff options
author | Marcell Meszaros | 2022-06-22 17:43:36 +0200 |
---|---|---|
committer | Marcell Meszaros | 2022-06-22 18:40:17 +0200 |
commit | c16aebd108793eb0ad86e35126f6deb018e1689a (patch) | |
tree | d1b386d32242a1cdc9afa6b77f113296dd82ea67 | |
parent | 43756e90e6f5bd2f3fa78419d1976bb59e021868 (diff) | |
download | aur-c16aebd108793eb0ad86e35126f6deb018e1689a.tar.gz |
fix: define LDFLAGS for Go the proper way
-rw-r--r-- | PKGBUILD | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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() { |