db-move: moved webkitgtk-6.0 from [testing] to [extra] (x86_64)
[arch-packages.git] / libcap / repos / core-x86_64 / libcap-2.68-cgo_flags.patch
blob84ccbafa2a2bb3907e768d90d74345f4b6d901dc
1 From 522b78b9d6a1b6cf282a22657dea59bc5c960557 Mon Sep 17 00:00:00 2001
2 From: David Runge <dvzrv@archlinux.org>
3 Date: Tue, 28 Mar 2023 13:44:20 +0200
4 Subject: [PATCH] Provide flags when building go binaries
6 go/Makefile:
7 Provide CGO_CFLAGS, CGO_CPPFLAGS, CGO_CXXFLAGS, CGO_LDFLAGS and GOFLAGS
8 to the go compiler, so that they may be set for e.g. supplying
9 downstream flags (such as for PIE and full RELRO).
10 ---
11 go/Makefile | 8 ++++----
12 1 file changed, 4 insertions(+), 4 deletions(-)
14 diff --git a/go/Makefile b/go/Makefile
15 index 38c1cf3..3a98af3 100644
16 --- a/go/Makefile
17 +++ b/go/Makefile
18 @@ -68,16 +68,16 @@ ifeq ($(RAISE_GO_FILECAP),yes)
19 endif
21 setid: ../goapps/setid/setid.go CAPGOPACKAGE PSXGOPACKAGE
22 - CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) $(GO) build $(GO_BUILD_FLAGS) -mod=vendor -o $@ $<
23 + CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) CGO_CFLAGS="$(CGO_CFLAGS)" CGO_CPPFLAGS="$(CGO_CPPFLAGS)" CGO_CXXFLAGS="$(CGO_CXXFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) build $(GO_BUILD_FLAGS) $(GOFLAGS) -mod=vendor -o $@ $<
25 gowns: ../goapps/gowns/gowns.go CAPGOPACKAGE
26 - CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) $(GO) build $(GO_BUILD_FLAGS) -mod=vendor -o $@ $<
27 + CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) CGO_CFLAGS="$(CGO_CFLAGS)" CGO_CPPFLAGS="$(CGO_CPPFLAGS)" CGO_CXXFLAGS="$(CGO_CXXFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) build $(GO_BUILD_FLAGS) $(GOFLAGS) -mod=vendor -o $@ $<
29 captree: ../goapps/captree/captree.go CAPGOPACKAGE
30 - CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) $(GO) build $(GO_BUILD_FLAGS) -mod=vendor -o $@ $<
31 + CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) CGO_CFLAGS="$(CGO_CFLAGS)" CGO_CPPFLAGS="$(CGO_CPPFLAGS)" CGO_CXXFLAGS="$(CGO_CXXFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) build $(GO_BUILD_FLAGS) $(GOFLAGS) -mod=vendor -o $@ $<
33 captrace: ../goapps/captrace/captrace.go CAPGOPACKAGE
34 - CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) $(GO) build $(GO_BUILD_FLAGS) -mod=vendor -o $@ $<
35 + CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) CGO_CFLAGS="$(CGO_CFLAGS)" CGO_CPPFLAGS="$(CGO_CPPFLAGS)" CGO_CXXFLAGS="$(CGO_CXXFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) build $(GO_BUILD_FLAGS) $(GOFLAGS) -mod=vendor -o $@ $<
37 ok: ok.go vendor/modules.txt
38 CC="$(CC)" CGO_ENABLED="0" $(GO) build $(GO_BUILD_FLAGS) -mod=vendor $<
39 --
40 2.40.0