From b5f1d9edb05181b874231a22350c149406eecbcf Mon Sep 17 00:00:00 2001 From: Alex Zenla Date: Thu, 21 Mar 2024 18:39:06 -0700 Subject: [PATCH] build: consider x86_64 on aarch64 darwin to not be a cross-compile --- hack/build/cross-compile.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hack/build/cross-compile.sh b/hack/build/cross-compile.sh index a839201..23c65ca 100755 --- a/hack/build/cross-compile.sh +++ b/hack/build/cross-compile.sh @@ -21,6 +21,14 @@ then TARGET_OS="${HOST_OS}" fi +# Darwin can cross compile on all architectures to all other supported +# architectures without cross compilation consideration. For cross-compile +# check, make sure HOST_ARCH is TARGET_ARCH for comparison. +if [ "${TARGET_OS}" = "darwin" ] +then + HOST_ARCH="${TARGET_ARCH}" +fi + if [ "${HOST_ARCH}" != "${TARGET_ARCH}" ] || [ "${HOST_OS}" != "${TARGET_OS}" ] then echo "1"