Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e31db2a

Browse files
author
Stefan Krah
committed
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).
1 parent 49c521f commit e31db2a

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

configure

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13397,12 +13397,13 @@ main ()
1339713397
return 0;
1339813398
}
1339913399
_ACEOF
13400-
if ac_fn_c_try_compile "$LINENO"; then :
13400+
if ac_fn_c_try_link "$LINENO"; then :
1340113401
have_gcc_asm_for_x64=yes
1340213402
else
1340313403
have_gcc_asm_for_x64=no
1340413404
fi
13405-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13405+
rm -f core conftest.err conftest.$ac_objext \
13406+
conftest$ac_exeext conftest.$ac_ext
1340613407
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
1340713408
$as_echo "$have_gcc_asm_for_x64" >&6; }
1340813409
if test "$have_gcc_asm_for_x64" = yes
@@ -13573,12 +13574,13 @@ main ()
1357313574
return 0;
1357413575
}
1357513576
_ACEOF
13576-
if ac_fn_c_try_compile "$LINENO"; then :
13577+
if ac_fn_c_try_link "$LINENO"; then :
1357713578
have_gcc_asm_for_x87=yes
1357813579
else
1357913580
have_gcc_asm_for_x87=no
1358013581
fi
13581-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13582+
rm -f core conftest.err conftest.$ac_objext \
13583+
conftest$ac_exeext conftest.$ac_ext
1358213584
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
1358313585
$as_echo "$have_gcc_asm_for_x87" >&6; }
1358413586
if test "$have_gcc_asm_for_x87" = yes
@@ -13605,12 +13607,13 @@ main ()
1360513607
return 0;
1360613608
}
1360713609
_ACEOF
13608-
if ac_fn_c_try_compile "$LINENO"; then :
13610+
if ac_fn_c_try_link "$LINENO"; then :
1360913611
have_gcc_asm_for_mc68881=yes
1361013612
else
1361113613
have_gcc_asm_for_mc68881=no
1361213614
fi
13613-
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13615+
rm -f core conftest.err conftest.$ac_objext \
13616+
conftest$ac_exeext conftest.$ac_ext
1361413617
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
1361513618
$as_echo "$have_gcc_asm_for_mc68881" >&6; }
1361613619
if test "$have_gcc_asm_for_mc68881" = yes

configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3910,7 +3910,7 @@ fi],
39103910
# **************************************
39113911

39123912
AC_MSG_CHECKING(for x64 gcc inline assembler)
3913-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
3913+
AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[
39143914
__asm__ __volatile__ ("movq %rcx, %rax");
39153915
]])],[have_gcc_asm_for_x64=yes],[have_gcc_asm_for_x64=no])
39163916
AC_MSG_RESULT($have_gcc_asm_for_x64)
@@ -4008,7 +4008,7 @@ fi
40084008
# so we try it on all platforms.
40094009

40104010
AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set x87 control word)
4011-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
4011+
AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[
40124012
unsigned short cw;
40134013
__asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
40144014
__asm__ __volatile__ ("fldcw %0" : : "m" (cw));
@@ -4021,7 +4021,7 @@ then
40214021
fi
40224022

40234023
AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set mc68881 fpcr)
4024-
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
4024+
AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[
40254025
unsigned int fpcr;
40264026
__asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
40274027
__asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));

0 commit comments

Comments
 (0)