summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authororhun2020-11-25 18:52:29 +0300
committerorhun2020-11-25 18:52:29 +0300
commitcfc17a88d39256b75bb885227ad76e13790b424e (patch)
tree31e22b3b140b4f63e4d0fd52fbfa232d12605bd0 /PKGBUILD
parent6dc03dd68d53f6e0ff1855c710bb32412863f2bd (diff)
downloadaur-pkgtop-git.tar.gz
upgpkg: pkgtop-git 2.4.r0.g639b2fe-2
Respect go flags for PIE and RELRO
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD12
1 files changed, 6 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2887d352d7a..1ff34e21fb6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -21,12 +21,12 @@ pkgver() {
build() {
cd "${pkgname%-git}/src"
- go get -d ./...
- go build \
- -gcflags "all=-trimpath=$PWD" \
- -asmflags "all=-trimpath=$PWD" \
- -ldflags "-extldflags $LDFLAGS" \
- -o "${pkgname%-git}" .
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ 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%-git}" .
}
package() {