summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNed Deily <nad@python.org>2022-03-15 14:39:20 (GMT)
committerGitHub <noreply@github.com>2022-03-15 14:39:20 (GMT)
commitdea270a2a80214de22afadaaca2043d0d782eb7d (patch)
tree23cdfb7d4e4d10525741d1f1286e4d65751eeb14 /configure.ac
parentccbc31ecf3a08ef626be9bbb099f0ce801142fc8 (diff)
downloadcpython-dea270a2a80214de22afadaaca2043d0d782eb7d.zip
cpython-dea270a2a80214de22afadaaca2043d0d782eb7d.tar.gz
cpython-dea270a2a80214de22afadaaca2043d0d782eb7d.tar.bz2
bpo-45405: Prevent internal configure error when running configure with recent versions of clang. (GH-28845) (GH-31889)
Change the configure logic to function properly on macOS when the compiler outputs a platform triplet for option --print-multiarch. The Apple Clang included with Xcode 13.3 now supports --print-multiarch causing configure to fail without this change. Co-authored-by: Ned Deily <nad@python.org> (cherry picked from commit 9c4766772cda67648184f8ddba546a5fc0167f91) Co-authored-by: David Bohman <debohman@gmail.com> Automerge-Triggered-By: GH:ned-deily (cherry picked from commit 9901d153c201d852d27dc9d3074e283c26468f6d) Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index e02cc2c..de83332 100644
--- a/configure.ac
+++ b/configure.ac
@@ -719,9 +719,6 @@ then
fi
-MULTIARCH=$($CC --print-multiarch 2>/dev/null)
-AC_SUBST(MULTIARCH)
-
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
cat >> conftest.c <<EOF
#undef bfin
@@ -877,6 +874,11 @@ else
fi
rm -f conftest.c conftest.out
+if test x$PLATFORM_TRIPLET != xdarwin; then
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
+fi
+AC_SUBST(MULTIARCH)
+
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])