Skip to content

Commit dea270a

Browse files
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 <[email protected]> (cherry picked from commit 9c47667) Co-authored-by: David Bohman <[email protected]> Automerge-Triggered-By: GH:ned-deily (cherry picked from commit 9901d15) Co-authored-by: Miss Islington (bot) <[email protected]>
1 parent ccbc31e commit dea270a

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 clang. Patch by David Bohman.

configure

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

51625162

5163-
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5164-
5165-
51665163
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
51675164
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
51685165
cat >> conftest.c <<EOF
@@ -5321,6 +5318,11 @@ $as_echo "none" >&6; }
53215318
fi
53225319
rm -f conftest.c conftest.out
53235320

5321+
if test x$PLATFORM_TRIPLET != xdarwin; then
5322+
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5323+
fi
5324+
5325+
53245326
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
53255327
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
53265328
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
@@ -719,9 +719,6 @@ then
719719
fi
720720

721721

722-
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
723-
AC_SUBST(MULTIARCH)
724-
725722
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
726723
cat >> conftest.c <<EOF
727724
#undef bfin
@@ -877,6 +874,11 @@ else
877874
fi
878875
rm -f conftest.c conftest.out
879876

877+
if test x$PLATFORM_TRIPLET != xdarwin; then
878+
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
879+
fi
880+
AC_SUBST(MULTIARCH)
881+
880882
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
881883
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
882884
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])

0 commit comments

Comments
 (0)