Skip to content
Snippets Groups Projects
Unverified Commit dea270a2 authored by Ned Deily's avatar Ned Deily Committed by GitHub
Browse files

bpo-45405: Prevent internal configure error when running configure with recent...

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: default avatarNed Deily <nad@python.org>
(cherry picked from commit 9c476677)

Co-authored-by: default avatarDavid Bohman <debohman@gmail.com>

Automerge-Triggered-By: GH:ned-deily
(cherry picked from commit 9901d153)

Co-authored-by: default avatarMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
parent ccbc31ec
No related branches found
No related tags found
No related merge requests found
Prevent ``internal configure error`` when running ``configure``
with recent versions of clang. Patch by David Bohman.
......@@ -5160,9 +5160,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
......@@ -5321,6 +5318,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
......
......@@ -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])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment