]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45405: Prevent internal configure error when running configure with recent versio...
authorNed Deily <nad@python.org>
Tue, 15 Mar 2022 07:18:39 +0000 (03:18 -0400)
committerGitHub <noreply@github.com>
Tue, 15 Mar 2022 07:18:39 +0000 (03:18 -0400)
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>
Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst [new file with mode: 0644]
configure
configure.ac

diff --git a/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst b/Misc/NEWS.d/next/Build/2021-10-11-16-27-38.bpo-45405.iSfdW5.rst
new file mode 100644 (file)
index 0000000..13c93d1
--- /dev/null
@@ -0,0 +1,2 @@
+Prevent ``internal configure error`` when running ``configure``
+with recent versions of clang.  Patch by David Bohman.
index 829dd69bb8b30a5c015060ab47f536693627bae4..455481bc5005c3bb186ddebc8fbd067f92748058 100755 (executable)
--- a/configure
+++ b/configure
@@ -5183,9 +5183,6 @@ $as_echo "$as_me:
 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
 $as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
 cat >> conftest.c <<EOF
@@ -5342,6 +5339,11 @@ $as_echo "none" >&6; }
 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
index f1cc8e9bcb9ed6e7b5a8d30899bede6d264730c4..1afcba3307ade9727ce807acc1d2dfd34ddc84c0 100644 (file)
@@ -724,9 +724,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
@@ -880,6 +877,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])