summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-17 17:08:36 +0100
committerGitHub <noreply@github.com>2021-11-17 17:08:36 +0100
commit72031783c5152cc715a8f1b6dc39bb5de8bfc3ca (patch)
tree84c34e86b17f8aeeb29e19c2a1a5692ebe069477
parent4808a63e5f1ad72d754c61c005c2c7c29ce48014 (diff)
parent25f35ac9e82865650cfe239f68d0c0bd80781bce (diff)
downloadpodman-72031783c5152cc715a8f1b6dc39bb5de8bfc3ca.tar.gz
podman-72031783c5152cc715a8f1b6dc39bb5de8bfc3ca.tar.bz2
podman-72031783c5152cc715a8f1b6dc39bb5de8bfc3ca.zip
Merge pull request #12327 from zeha/backport-11976
Backport #11976 to 3.4
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d63cb4549..015690220 100644
--- a/Makefile
+++ b/Makefile
@@ -173,6 +173,15 @@ define go-get
$(GO) get -u ${1}
endef
+# Need to use CGO for mDNS resolution, but cross builds need CGO disabled
+# See https://github.com/golang/go/issues/12524 for details
+DARWIN_GCO := 0
+ifeq ($(NATIVE_GOOS),darwin)
+ifdef HOMEBREW_PREFIX
+ DARWIN_GCO := 1
+endif
+endif
+
###
### Primary entry-point targets
###
@@ -349,7 +358,7 @@ podman-remote-windows: ## Build podman-remote for Windows
.PHONY: podman-remote-darwin
podman-remote-darwin: ## Build podman-remote for macOS
$(MAKE) \
- CGO_ENABLED=0 \
+ CGO_ENABLED=$(DARWIN_GCO) \
GOOS=darwin \
bin/darwin/podman