Created
September 26, 2020 00:49
-
-
Save codyps/1affee5eb3022edb137267f999516497 to your computer and use it in GitHub Desktop.
0001-update-for-go-package-guidelines.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 8b7834b7d21487410df5ba768f2e6e9fb709e8c0 Mon Sep 17 00:00:00 2001 | |
From: Cody Schafer <cody@berkshiregrey.com> | |
Date: Fri, 25 Sep 2020 20:49:51 -0400 | |
Subject: [PATCH] update for go package guidelines | |
--- | |
PKGBUILD | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
diff --git a/PKGBUILD b/PKGBUILD | |
index 549dd58..d7a2770 100644 | |
--- a/PKGBUILD | |
+++ b/PKGBUILD | |
@@ -19,13 +19,14 @@ build() { | |
export CGO_CPPFLAGS="${CPPFLAGS}" | |
export CGO_CFLAGS="${CFLAGS}" | |
export CGO_CXXFLAGS="${CXXFLAGS}" | |
+ export CGO_LDFLAGS="${LDFLAGS}" | |
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" | |
GO_LDFLAGS="-X github.com/zrepl/zrepl/version.zreplVersion=${zrepl_version}" | |
cd "${pkgname}-${pkgver}" | |
go build \ | |
- -ldflags "${GO_LDFLAGS} -extldflags ${LDFLAGS}" \ | |
+ -ldflags "${GO_LDFLAGS} -linkmode=external -extldflags ${LDFLAGS}" \ | |
-o "${pkgname}" . | |
} | |
-- | |
2.28.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment