From ab13f1a25af404c6e4bc4904815ef9b94533a124 Mon Sep 17 00:00:00 2001 From: Christian Jullien Date: Thu, 8 Jul 2021 09:37:37 +0200 Subject: [PATCH] On Big Sur M1, force a x86_64 native build and count on Rosetta to make job as arm64 is not yet supported. --- configure | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configure b/configure index 6aa85545..4c9e51e0 100755 --- a/configure +++ b/configure @@ -60,6 +60,15 @@ case $targetos in cc=`readlink $cc || echo clang` tcc_usrinclude="`xcrun --show-sdk-path`/usr/include" DLLSUF=".dylib" + case $cpu in + arm64) + # We cannot yet build a native arm64 version, + # Use x86_64 and count on Rosetta to make the job. + cpu=x86_64 + CFLAGS="$CFLAGS -arch $cpu" + LDFLAGS="$LDFLAGS -arch $cpu" + ;; + esac ;; Windows_NT|MINGW*|MSYS*|CYGWIN*) mingw32=yes