Skip to content

Commit 9901d15

Browse files
[3.9] bpo-45405: Prevent internal configure error when running configure with recent versions of non-Apple clang. (GH-28845) (GH-28910)
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 <[email protected]> (cherry picked from commit 9c47667) Co-authored-by: David Bohman <[email protected]> Automerge-Triggered-By: GH:ned-deily
1 parent 6d4d4ec commit 9901d15

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Prevent ``internal configure error`` when running ``configure``
2+
with recent versions of non-Apple clang. Patch by David Bohman.

configure

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5196,9 +5196,6 @@ $as_echo "$as_me:
51965196
fi
51975197

51985198

5199-
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5200-
5201-
52025199
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
52035200
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
52045201
cat >> conftest.c <<EOF
@@ -5357,6 +5354,11 @@ $as_echo "none" >&6; }
53575354
fi
53585355
rm -f conftest.c conftest.out
53595356

5357+
if test x$PLATFORM_TRIPLET != xdarwin; then
5358+
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5359+
fi
5360+
5361+
53605362
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
53615363
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
53625364
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5

configure.ac

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -727,9 +727,6 @@ then
727727
fi
728728

729729

730-
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
731-
AC_SUBST(MULTIARCH)
732-
733730
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
734731
cat >> conftest.c <<EOF
735732
#undef bfin
@@ -885,6 +882,11 @@ else
885882
fi
886883
rm -f conftest.c conftest.out
887884

885+
if test x$PLATFORM_TRIPLET != xdarwin; then
886+
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
887+
fi
888+
AC_SUBST(MULTIARCH)
889+
888890
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
889891
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
890892
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])

0 commit comments

Comments
 (0)