]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.9] bpo-45405: Prevent ``internal configure error`` when running ``configure``...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 13 Oct 2021 00:35:59 +0000 (17:35 -0700)
committerGitHub <noreply@github.com>
Wed, 13 Oct 2021 00:35:59 +0000 (17:35 -0700)
Change the configure logic to function properly on macOS when the compiler
outputs a platform triplet for option --print-multiarch.

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
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..a2dc5bc
--- /dev/null
@@ -0,0 +1,2 @@
+Prevent ``internal configure error`` when running ``configure``
+with recent versions of non-Apple clang.  Patch by David Bohman.
index 7cad0e2f98ba1dfecbfaf93d2f205f97e5c0e7e2..c0dfcd64c52a57b9968f050d77ff0ab15730792f 100755 (executable)
--- a/configure
+++ b/configure
@@ -5196,9 +5196,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
@@ -5357,6 +5354,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 be28e3a38f7ab8573b924da8232efa2a52073ca0..c9bf86b71a97f41a906051489732a683fd6adb88 100644 (file)
@@ -727,9 +727,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
@@ -885,6 +882,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])