diff --git a/Makefile b/Makefile index be86f075730..2169d26b186 100644 --- a/Makefile +++ b/Makefile @@ -757,6 +757,11 @@ security-check: go run $(GOVULNCHECK_PACKAGE) -show color ./... $(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ) +ifneq ($(STATIC),) +ifneq (,$(findstring pam,$(TAGS))) + $(error pam support set via TAGS dont support static builds) +endif +endif CGO_ENABLED="$(CGO_ENABLED)" CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(EXTLDFLAGS) $(LDFLAGS)' -o $@ .PHONY: release