]> granicus.if.org Git - python/commitdiff
Issue #24543: Use AC_LINK instead of AC_COMPILE in order to prevent false
authorStefan Krah <skrah@bytereef.org>
Fri, 3 Jul 2015 13:30:54 +0000 (15:30 +0200)
committerStefan Krah <skrah@bytereef.org>
Fri, 3 Jul 2015 13:30:54 +0000 (15:30 +0200)
positives with the -flto option (gcc >= 4.9.0 and clang).

configure
configure.ac

index 7ab0a4687703c616334818331aef540fb073d272..712787133fd1fbfee4d99a152d20644a8292e52e 100755 (executable)
--- a/configure
+++ b/configure
@@ -12747,12 +12747,13 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
   have_gcc_asm_for_x87=yes
 else
   have_gcc_asm_for_x87=no
 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 "$have_gcc_asm_for_x87" >&6; }
 if test "$have_gcc_asm_for_x87" = yes
index c2a183005bc000de1b260afe7ac1def60bbb1218..2c998b1ee98eab9b9ffd4b2f1f40b6a2657f2a00 100644 (file)
@@ -3723,7 +3723,7 @@ fi
 # 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_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
   unsigned short cw;
   __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
   __asm__ __volatile__ ("fldcw %0" : : "m" (cw));