mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 18:15:18 -07:00
Use AC_LINK_IFELSE instead of _COMPILE_IFELSE for cpuid detection
This apparently works around a bug on OpenSuSE on ARM and PPC when LTO is enabled. Still, as documented, LTO shouldn't be used when compiling the library.
This commit is contained in:
parent
a179b25eb0
commit
4b448b5095
5
configure
vendored
5
configure
vendored
@ -18568,7 +18568,7 @@ __asm__ __volatile__ ("xchgl %%ebx, %k1; cpuid; xchgl %%ebx, %k1" :
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_compile "$LINENO"; then :
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
@ -18579,7 +18579,8 @@ else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
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
|
||||
|
||||
fi
|
||||
|
||||
|
@ -694,7 +694,7 @@ AC_SUBST(HAVE_TI_MODE_V)
|
||||
HAVE_CPUID_V=0
|
||||
AS_IF([test "$enable_asm" != "no"],[
|
||||
AC_MSG_CHECKING(for cpuid instruction)
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[
|
||||
unsigned int cpu_info[4];
|
||||
__asm__ __volatile__ ("xchgl %%ebx, %k1; cpuid; xchgl %%ebx, %k1" :
|
||||
"=a" (cpu_info[0]), "=&r" (cpu_info[1]),
|
||||
|
Loading…
Reference in New Issue
Block a user