Skip to content

Commit edae3e2

Browse files
[3.10] bpo-45405: Prevent internal configure error when running configure with recent versions of non-Apple clang. (GH-28845) (GH-28911)
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 854db7e commit edae3e2

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
@@ -5226,9 +5226,6 @@ $as_echo "$as_me:
52265226
fi
52275227

52285228

5229-
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5230-
5231-
52325229
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
52335230
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
52345231
cat >> conftest.c <<EOF
@@ -5387,6 +5384,11 @@ $as_echo "none" >&6; }
53875384
fi
53885385
rm -f conftest.c conftest.out
53895386

5387+
if test x$PLATFORM_TRIPLET != xdarwin; then
5388+
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5389+
fi
5390+
5391+
53905392
if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
53915393
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
53925394
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
@@ -717,9 +717,6 @@ then
717717
fi
718718

719719

720-
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
721-
AC_SUBST(MULTIARCH)
722-
723720
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
724721
cat >> conftest.c <<EOF
725722
#undef bfin
@@ -875,6 +872,11 @@ else
875872
fi
876873
rm -f conftest.c conftest.out
877874

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

0 commit comments

Comments
 (0)