diff --git a/GNUmakefile b/GNUmakefile index bf2b677..b047a9c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -5,11 +5,19 @@ ALL = b2sum b3sum md5sum sha1sum sha256sum sha512sum GO := go -.PHONY: all -all: $(BIN) +# https://github.com/golang/go/issues/64875 +arch := $(shell uname -m) +ifeq ($(arch),s390x) +CGO_ENABLED = 0 +else +CGO_ENABLED := 1 +endif $(BIN): *.go - CGO_ENABLED=0 $(GO) build -trimpath -ldflags="-s -w -buildid=" -buildmode=pie + CGO_ENABLED=$(CGO_ENABLED) $(GO) build -trimpath -ldflags="-s -w -buildid=" -buildmode=pie + +.PHONY: all +all: $(BIN) .PHONY: test test: