diff --git a/Makefile b/Makefile index 89da488..317f4d3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PACKAGE_NAME?=github.com/projectcalico/pod2daemon -GO_BUILD_VER?=v0.53 +GO_BUILD_VER?=v0.58 ORGANIZATION=projectcalico SEMAPHORE_PROJECT_ID?=$(SEMAPHORE_POD2DAEMON_PROJECT_ID) @@ -39,6 +39,13 @@ include Makefile.common ############################################################################### +# We need CGO to leverage Boring SSL. However, the cross-compile doesn't support CGO yet. +ifeq ($(ARCH), $(filter $(ARCH),amd64)) +CGO_ENABLED=1 +else +CGO_ENABLED=0 +endif + SRC_FILES=$(shell find -name '*.go') .PHONY: clean @@ -72,7 +79,7 @@ bin/flexvol-armv7: ARCH=armv7 bin/flexvol-ppc64le: ARCH=ppc64le bin/flexvol-s390x: ARCH=s390x bin/flexvol-%: $(SRC_FILES) - $(DOCKER_RUN) $(CALICO_BUILD) go build -v -o bin/flexvol-$(ARCH) flexvol/flexvoldriver.go + $(DOCKER_RUN) -e CGO_ENABLED=$(CGO_ENABLED) $(CALICO_BUILD) go build -v -o bin/flexvol-$(ARCH) flexvol/flexvoldriver.go ############################################################################### # Building the image