aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-10 23:39:16 +0000
committerlloyd <[email protected]>2014-01-10 23:39:16 +0000
commitd3dccecc381a4e35a79eb9ff4e7591d0ac58ede7 (patch)
treea012dd8e07f7b86c2f6965bcd05db1458e7c35d6
parentad6555f522ae16f6284e8dafa02f630b88bcf289 (diff)
Fix dependency checks for intrinsics and runtime Altivec check
-rwxr-xr-xconfigure.py15
-rw-r--r--src/lib/utils/cpuid.cpp2
2 files changed, 8 insertions, 9 deletions
diff --git a/configure.py b/configure.py
index ce829b666..e76ddf14c 100755
--- a/configure.py
+++ b/configure.py
@@ -657,21 +657,20 @@ class ModuleInfo(object):
return ['HAS_' + d[0] + ' ' + d[1] for d in chunks(self.define, 2)]
def compatible_cpu(self, archinfo, options):
-
arch_name = archinfo.basename
cpu_name = options.cpu
+ for isa in self.need_isa:
+ if isa in options.disable_intrinsics:
+ return False # explicitly disabled
+
+ if isa not in archinfo.isa_extensions:
+ return False
+
if self.arch != []:
if arch_name not in self.arch and cpu_name not in self.arch:
return False
- for isa in self.need_isa:
- if isa in options.disable_intrinsics:
- return False # explicitly disabled
-
- if isa not in archinfo.isa_extensions:
- return False
-
return True
def compatible_os(self, os):
diff --git a/src/lib/utils/cpuid.cpp b/src/lib/utils/cpuid.cpp
index 6da5673c1..c49eb0752 100644
--- a/src/lib/utils/cpuid.cpp
+++ b/src/lib/utils/cpuid.cpp
@@ -183,7 +183,7 @@ void CPUID::initialize()
{
#if defined(BOTAN_TARGET_CPU_IS_PPC_FAMILY)
if(altivec_check_sysctl() || altivec_check_pvr_emul())
- altivec_capable = true;
+ m_altivec_capable = true;
#endif
#if defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)