From e39ed5a9ba4884e1eaef3e2a7ce6ac701a59c7af Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Sat, 6 May 2017 23:58:33 +0200 Subject: [PATCH] Enforce netgo build tag while cross-compilation --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 275e9619540d9..d078b87842320 100644 --- a/Makefile +++ b/Makefile @@ -140,7 +140,7 @@ release-windows: @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ go get -u github.com/karalabe/xgo; \ fi - xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) . + xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) . ifeq ($(CI),drone) mv /build/* $(DIST)/binaries endif @@ -150,7 +150,7 @@ release-linux: @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ go get -u github.com/karalabe/xgo; \ fi - xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out gitea-$(VERSION) . + xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/*' -out gitea-$(VERSION) . ifeq ($(CI),drone) mv /build/* $(DIST)/binaries endif @@ -160,7 +160,7 @@ release-darwin: @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ go get -u github.com/karalabe/xgo; \ fi - xgo -dest $(DIST)/binaries -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) . + xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) . ifeq ($(CI),drone) mv /build/* $(DIST)/binaries endif