https://github.com/python/cpython/pull/28845

--- configure.orig	2021-09-04 13:49:41.000000000 +1000
+++ configure	2022-05-10 20:44:33.000000000 +1000
@@ -5203,7 +5203,6 @@
 fi
 
 
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
@@ -5334,6 +5333,10 @@
 fi
 rm -f conftest.c conftest.out
 
+if test x$PLATFORM_TRIPLET != xdarwin; then
+    MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+fi
+
 if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
   if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
     as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
