forked from pool/libsodium
- Add libsodium_configure_cpuid_chg.patch and call autoconf to regenerate configure script with proper CPUID checking. Required at least for PowerPC and ARM now that LTO enabled. OBS-URL: https://build.opensuse.org/request/show/723945 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libsodium?expand=0&rev=74
29 lines
1023 B
Diff
29 lines
1023 B
Diff
From: Michel Normand <normand@linux.vnet.ibm.com>
|
|
Subject: libsodium configure cpuid chg
|
|
Date: Fri, 16 Aug 2019 10:58:52 +0200
|
|
|
|
libsodium configure cpuid chg
|
|
|
|
To avoid to have bad detection of cpuid when lto is enabled.
|
|
This should solve the old upstream issue#604
|
|
https://github.com/jedisct1/libsodium/issues/604
|
|
|
|
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
|
|
---
|
|
configure.ac | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
Index: libsodium-1.0.18/configure.ac
|
|
===================================================================
|
|
--- libsodium-1.0.18.orig/configure.ac
|
|
+++ libsodium-1.0.18/configure.ac
|
|
@@ -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]),
|