diff --git a/Makefile b/Makefile index 33cb220b..75564247 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ ARCHITECTURES=amd64 arm64 ppc64le s390x .PHONY: build build: - go build -o $(BINARY) -ldflags "-X github.com/redhat-openshift-ecosystem/openshift-preflight/version.commit=$(VERSION) -X github.com/redhat-openshift-ecosystem/openshift-preflight/version.version=$(RELEASE_TAG)" cmd/preflight/main.go + CGO_ENABLED=0 go build -o $(BINARY) -ldflags "-X github.com/redhat-openshift-ecosystem/openshift-preflight/version.commit=$(VERSION) -X github.com/redhat-openshift-ecosystem/openshift-preflight/version.version=$(RELEASE_TAG)" cmd/preflight/main.go @ls | grep -e '^preflight$$' &> /dev/null .PHONY: build-multi-arch @@ -20,7 +20,7 @@ build-multi-arch: $(addprefix build-linux-,$(ARCHITECTURES)) define ARCHITECTURE_template .PHONY: build-linux-$(1) build-linux-$(1): - GOOS=linux GOARCH=$(1) go build -o $(BINARY)-linux-$(1) -ldflags "-X github.com/redhat-openshift-ecosystem/openshift-preflight/version.commit=$(VERSION) \ + GOOS=linux GOARCH=$(1) CGO_ENABLED=0 go build -o $(BINARY)-linux-$(1) -ldflags "-X github.com/redhat-openshift-ecosystem/openshift-preflight/version.commit=$(VERSION) \ -X github.com/redhat-openshift-ecosystem/openshift-preflight/version.version=$(RELEASE_TAG)" cmd/preflight/main.go endef