aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2022-02-13 19:58:05 -0800
committerAndrew G. Morgan <morgan@kernel.org>2022-02-13 19:58:05 -0800
commitaae937481ae28c0cfe502309e9acb5c34ba0b2cd (patch)
tree1ebf534f74393557934022dcdd2db4f139ea5fe1
parent66a8a1421e4520e9dda0a46704e25bafb989b1ae (diff)
downloadlibcap-aae937481ae28c0cfe502309e9acb5c34ba0b2cd.tar.gz
Be explicit about CGO_ENABLED=1 for compare-cap build.
It looks like go1.18 is going to default to CGO_ENABLED=0, so force CGO_ENABLED=1 when building this cap-libcap comparison program. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=215603 Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r--go/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/go/Makefile b/go/Makefile
index 4aface4..109581b 100644
--- a/go/Makefile
+++ b/go/Makefile
@@ -55,7 +55,7 @@ CAPGOPACKAGE: vendor/$(IMPORTDIR)/cap ../cap/*.go good-names.go $(PSXGOPACKAGE)
# Compiles something with this package to compare it to libcap. This
# tests more when run under sudotest (see ../progs/quicktest.sh for that).
compare-cap: compare-cap.go CAPGOPACKAGE
- CC="$(CC)" $(CGO_LDFLAGS_ALLOW) CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) build $(GO_BUILD_FLAGS) -mod=vendor $<
+ CC="$(CC)" CGO_ENABLED="1" $(CGO_LDFLAGS_ALLOW) CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(CGO_LDFLAGS)" $(GO) build $(GO_BUILD_FLAGS) -mod=vendor $<
web: ../goapps/web/web.go CAPGOPACKAGE
CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) $(GO) build $(GO_BUILD_FLAGS) -mod=vendor -o $@ $<
@@ -75,7 +75,7 @@ captree: ../goapps/captree/captree.go CAPGOPACKAGE
CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) $(GO) build $(GO_BUILD_FLAGS) -mod=vendor -o $@ $<
ok: ok.go
- CC="$(CC)" CGO_ENABLED=0 $(GO) build $(GO_BUILD_FLAGS) -mod=vendor $<
+ CC="$(CC)" CGO_ENABLED="0" $(GO) build $(GO_BUILD_FLAGS) -mod=vendor $<
try-launching: try-launching.go CAPGOPACKAGE ok
CC="$(CC)" CGO_ENABLED="$(CGO_REQUIRED)" $(CGO_LDFLAGS_ALLOW) $(GO) build $(GO_BUILD_FLAGS) -mod=vendor $<