[ovito] 02/05: Disable including cpuid.h as it is absent on some archs.
Anton Gladky
gladk at moszumanska.debian.org
Mon Apr 7 19:49:39 UTC 2014
This is an automated email from the git hooks/post-receive script.
gladk pushed a commit to branch master
in repository ovito.
commit cf6ad965f8ee75e39bd8caf5066d3b846da62ea7
Author: Anton Gladky <gladk at debian.org>
Date: Mon Apr 7 20:14:56 2014 +0200
Disable including cpuid.h as it is absent on some archs.
---
debian/patches/20_disable_cpu_botan.patch | 92 +++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 93 insertions(+)
diff --git a/debian/patches/20_disable_cpu_botan.patch b/debian/patches/20_disable_cpu_botan.patch
new file mode 100644
index 0000000..efbd14c
--- /dev/null
+++ b/debian/patches/20_disable_cpu_botan.patch
@@ -0,0 +1,92 @@
+Description: Disable including cpuid.h as it is absent on some archs
+Author: Anton Gladky <gladk at debian.org>
+Last-Update: 2014-04-07
+
+--- a/src/3rdparty/ssh/botan/botan.cpp
++++ b/src/3rdparty/ssh/botan/botan.cpp
+@@ -46180,85 +46180,10 @@
+ }
+
+ }
+-/*
+-* Runtime CPU detection
+-* (C) 2009-2010 Jack Lloyd
+-*
+-* Distributed under the terms of the Botan license
+-*/
+
+-
+-#if defined(BOTAN_TARGET_CPU_IS_PPC_FAMILY)
+-
+-#if defined(BOTAN_TARGET_OS_IS_DARWIN)
+- #include <sys/sysctl.h>
+-#endif
+-
+-#if defined(BOTAN_TARGET_OS_IS_OPENBSD)
+- #include <sys/param.h>
+- #include <sys/sysctl.h>
+- #include <machine/cpu.h>
+-#endif
+-
+-#endif
+-
+-#if defined(BOTAN_TARGET_CPU_IS_X86_FAMILY)
+-
+-#if defined(BOTAN_BUILD_COMPILER_IS_MSVC)
+-
+- #include <intrin.h>
+- #define CALL_CPUID(type, out) do { __cpuid((int*)out, type); } while(0)
+-
+-#elif defined(BOTAN_BUILD_COMPILER_IS_INTEL)
+-
+- #include <ia32intrin.h>
+- #define CALL_CPUID(type, out) do { __cpuid(out, type); } while(0)
+-
+-#elif defined(BOTAN_BUILD_COMPILER_IS_GCC) && (BOTAN_GCC_VERSION >= 430)
+-
+- // Only available starting in GCC 4.3
+- #include <cpuid.h>
+-
+-namespace {
+-
+- /*
+- * Prevent inlining to work around GCC bug 44174
+- */
+- void __attribute__((__noinline__)) call_gcc_cpuid(Botan::u32bit type,
+- Botan::u32bit out[4])
+- {
+- __get_cpuid(type, out, out+1, out+2, out+3);
+- }
+-
+- #define CALL_CPUID call_gcc_cpuid
+-
+-}
+-
+-#elif defined(BOTAN_TARGET_ARCH_IS_X86_64) && \
+- (defined(BOTAN_BUILD_COMPILER_IS_CLANG) || defined(BOTAN_BUILD_COMPILER_IS_GCC) || defined(BOTAN_BUILD_COMPILER_IS_INTEL))
+-
+- /*
+- * We can't safely use this on x86-32 as some 32-bit ABIs use ebx as
+- * a PIC register, and in theory there are some x86-32s still out
+- * there that don't support cpuid at all; it requires strange
+- * contortions to detect them.
+- */
+-
+- #define CALL_CPUID(type, out) \
+- asm("cpuid\n\t" : "=a" (out[0]), "=b" (out[1]), "=c" (out[2]), "=d" (out[3]) \
+- : "0" (type))
+-
+-#else
+- #warning "No method of calling CPUID for this compiler"
+-#endif
+-
+-#endif
+-
+-#ifndef CALL_CPUID
+ // In all other cases, just zeroize the supposed cpuid output
+ #define CALL_CPUID(type, out) \
+ do { out[0] = out[1] = out[2] = out[3] = 0; } while(0);
+-#endif
+
+ namespace Botan {
+
diff --git a/debian/patches/series b/debian/patches/series
index f3e96f1..3a464ab 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
10_add_c+11.patch
+20_disable_cpu_botan.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ovito.git
More information about the debian-science-commits
mailing list