mirror of https://github.com/python/cpython
Issue #24543: Use AC_LINK instead of AC_COMPILE in order to prevent false
positives with the -flto option (gcc >= 4.9.0 and clang).
This commit is contained in:
parent
49c521fd5d
commit
e31db2a821
|
@ -13397,12 +13397,13 @@ main ()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
have_gcc_asm_for_x64=yes
|
have_gcc_asm_for_x64=yes
|
||||||
else
|
else
|
||||||
have_gcc_asm_for_x64=no
|
have_gcc_asm_for_x64=no
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
|
||||||
$as_echo "$have_gcc_asm_for_x64" >&6; }
|
$as_echo "$have_gcc_asm_for_x64" >&6; }
|
||||||
if test "$have_gcc_asm_for_x64" = yes
|
if test "$have_gcc_asm_for_x64" = yes
|
||||||
|
@ -13573,12 +13574,13 @@ main ()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
have_gcc_asm_for_x87=yes
|
have_gcc_asm_for_x87=yes
|
||||||
else
|
else
|
||||||
have_gcc_asm_for_x87=no
|
have_gcc_asm_for_x87=no
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
|
||||||
$as_echo "$have_gcc_asm_for_x87" >&6; }
|
$as_echo "$have_gcc_asm_for_x87" >&6; }
|
||||||
if test "$have_gcc_asm_for_x87" = yes
|
if test "$have_gcc_asm_for_x87" = yes
|
||||||
|
@ -13605,12 +13607,13 @@ main ()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
have_gcc_asm_for_mc68881=yes
|
have_gcc_asm_for_mc68881=yes
|
||||||
else
|
else
|
||||||
have_gcc_asm_for_mc68881=no
|
have_gcc_asm_for_mc68881=no
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
|
||||||
$as_echo "$have_gcc_asm_for_mc68881" >&6; }
|
$as_echo "$have_gcc_asm_for_mc68881" >&6; }
|
||||||
if test "$have_gcc_asm_for_mc68881" = yes
|
if test "$have_gcc_asm_for_mc68881" = yes
|
||||||
|
|
|
@ -3910,7 +3910,7 @@ fi],
|
||||||
# **************************************
|
# **************************************
|
||||||
|
|
||||||
AC_MSG_CHECKING(for x64 gcc inline assembler)
|
AC_MSG_CHECKING(for x64 gcc inline assembler)
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
|
AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[
|
||||||
__asm__ __volatile__ ("movq %rcx, %rax");
|
__asm__ __volatile__ ("movq %rcx, %rax");
|
||||||
]])],[have_gcc_asm_for_x64=yes],[have_gcc_asm_for_x64=no])
|
]])],[have_gcc_asm_for_x64=yes],[have_gcc_asm_for_x64=no])
|
||||||
AC_MSG_RESULT($have_gcc_asm_for_x64)
|
AC_MSG_RESULT($have_gcc_asm_for_x64)
|
||||||
|
@ -4008,7 +4008,7 @@ fi
|
||||||
# so we try it on all platforms.
|
# so we try it on all platforms.
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set x87 control word)
|
AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set x87 control word)
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
|
AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[
|
||||||
unsigned short cw;
|
unsigned short cw;
|
||||||
__asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
|
__asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
|
||||||
__asm__ __volatile__ ("fldcw %0" : : "m" (cw));
|
__asm__ __volatile__ ("fldcw %0" : : "m" (cw));
|
||||||
|
@ -4021,7 +4021,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set mc68881 fpcr)
|
AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set mc68881 fpcr)
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
|
AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[
|
||||||
unsigned int fpcr;
|
unsigned int fpcr;
|
||||||
__asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
|
__asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
|
||||||
__asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
|
__asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
|
||||||
|
|
Loading…
Reference in New Issue