From ba32c5c30113defae82b22b3d2a19137e5385d6d Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Wed, 22 Feb 2023 15:05:17 -0700 Subject: [PATCH] build: allow building on Mac with Apple silicon There are a couple minor changes needed to allow building Rook on Apple silicon. Signed-off-by: Blaine Gardner (cherry picked from commit 442e6480bd2e4de9d5601fd4d92b791251adebd7) --- build/makelib/common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/makelib/common.mk b/build/makelib/common.mk index 1985c20d8..99244430c 100644 --- a/build/makelib/common.mk +++ b/build/makelib/common.mk @@ -38,7 +38,7 @@ GOARCH := $(word 2, $(subst _, ,$(PLATFORM))) export GOOS GOARCH endif -ALL_PLATFORMS ?= darwin_amd64 windows_amd64 linux_amd64 linux_arm64 +ALL_PLATFORMS ?= darwin_amd64 darwin_arm64 windows_amd64 linux_amd64 linux_arm64 export GOARM @@ -83,7 +83,7 @@ endif # a registry that is scoped to the current build tree on this host ifeq ($(origin BUILD_REGISTRY), undefined) -BUILD_REGISTRY := build-$(shell echo $(HOSTNAME)-$(ROOT_DIR) | $(SHA256CMD) | cut -c1-8) +BUILD_REGISTRY := build-$(shell echo "$(HOSTNAME)-$(ROOT_DIR)" | $(SHA256CMD) | cut -c1-8) endif ifeq ($(BUILD_REGISTRY),build-) $(error Failed to get unique ID for host+dir. Check that '$(SHA256CMD)' functions or override SHA256CMD)