mirror of https://github.com/python/cpython
bpo-45405: Prevent ``internal configure error`` when running ``configure`` with recent versions of non-Apple clang. (#28845)
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>
This commit is contained in:
parent
dbe213de7e
commit
9c4766772c
|
@ -0,0 +1,2 @@
|
||||||
|
Prevent ``internal configure error`` when running ``configure``
|
||||||
|
with recent versions of non-Apple clang. Patch by David Bohman.
|
|
@ -5227,9 +5227,6 @@ $as_echo "$as_me:
|
||||||
fi
|
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 "$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; }
|
$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
|
||||||
cat >> conftest.c <<EOF
|
cat >> conftest.c <<EOF
|
||||||
|
@ -5388,6 +5385,11 @@ $as_echo "none" >&6; }
|
||||||
fi
|
fi
|
||||||
rm -f conftest.c conftest.out
|
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 && test x$MULTIARCH != x; then
|
||||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; 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
|
as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
|
||||||
|
|
|
@ -717,9 +717,6 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
MULTIARCH=$($CC --print-multiarch 2>/dev/null)
|
|
||||||
AC_SUBST(MULTIARCH)
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
|
||||||
cat >> conftest.c <<EOF
|
cat >> conftest.c <<EOF
|
||||||
#undef bfin
|
#undef bfin
|
||||||
|
@ -875,6 +872,11 @@ else
|
||||||
fi
|
fi
|
||||||
rm -f conftest.c conftest.out
|
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 && test x$MULTIARCH != x; then
|
||||||
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
|
||||||
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report])
|
||||||
|
|
Loading…
Reference in New Issue