mirror of https://github.com/docker/docs.git
Merge pull request #2673 from dgageot/no-32bits-osx-linux
FIX #2271 don't build 32bits binaries for linux/osx
This commit is contained in:
commit
eeec362ba4
|
@ -1,11 +1,15 @@
|
||||||
extension = $(patsubst windows,.exe,$(filter windows,$(1)))
|
extension = $(patsubst windows,.exe,$(filter windows,$(1)))
|
||||||
|
|
||||||
|
# Valid target combinations
|
||||||
|
VALID_OS_ARCH := "[darwin/amd64][linux/amd64][windows/amd64][windows/386]"
|
||||||
|
|
||||||
define gocross
|
define gocross
|
||||||
|
$(if $(findstring [$(1)/$(2)],$(VALID_OS_ARCH)), \
|
||||||
GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 \
|
GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 \
|
||||||
$(GO) build \
|
$(GO) build \
|
||||||
-o $(PREFIX)/bin/docker-machine_$(1)-$(2)$(call extension,$(GOOS)) \
|
-o $(PREFIX)/bin/docker-machine_$(1)-$(2)$(call extension,$(GOOS)) \
|
||||||
-a $(VERBOSE_GO) -tags "static_build netgo $(BUILDTAGS)" -installsuffix netgo \
|
-a $(VERBOSE_GO) -tags "static_build netgo $(BUILDTAGS)" -installsuffix netgo \
|
||||||
-ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/machine.go;
|
-ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/machine.go;)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
build-clean:
|
build-clean:
|
||||||
|
|
Loading…
Reference in New Issue