Skip to content

Commit eeec362

Browse files
committed
Merge pull request docker-archive-public#2673 from dgageot/no-32bits-osx-linux
FIX docker-archive-public#2271 don't build 32bits binaries for linux/osx
2 parents 5bb3d90 + 8e2ccd9 commit eeec362

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mk/build.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
extension = $(patsubst windows,.exe,$(filter windows,$(1)))
22

3+
# Valid target combinations
4+
VALID_OS_ARCH := "[darwin/amd64][linux/amd64][windows/amd64][windows/386]"
5+
36
define gocross
7+
$(if $(findstring [$(1)/$(2)],$(VALID_OS_ARCH)), \
48
GOOS=$(1) GOARCH=$(2) CGO_ENABLED=0 \
59
$(GO) build \
610
-o $(PREFIX)/bin/docker-machine_$(1)-$(2)$(call extension,$(GOOS)) \
711
-a $(VERBOSE_GO) -tags "static_build netgo $(BUILDTAGS)" -installsuffix netgo \
8-
-ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/machine.go;
12+
-ldflags "$(GO_LDFLAGS) -extldflags -static" $(GO_GCFLAGS) ./cmd/machine.go;)
913
endef
1014

1115
build-clean:

0 commit comments

Comments
 (0)