[arrayfire] 01/03: d/p: add patch fixing FTBFS due to usage of assembly code
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Sep 23 19:05:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.
commit 2b81c0480130de276f4ea0fad3a447f465dc4295
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date: Wed Sep 23 18:17:37 2015 +0100
d/p: add patch fixing FTBFS due to usage of assembly code
---
debian/patches/bugfix-cpuid-usage.patch | 50 +++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 51 insertions(+)
diff --git a/debian/patches/bugfix-cpuid-usage.patch b/debian/patches/bugfix-cpuid-usage.patch
new file mode 100644
index 0000000..12dd20c
--- /dev/null
+++ b/debian/patches/bugfix-cpuid-usage.patch
@@ -0,0 +1,50 @@
+From e5b8788f7ff5ace55be0c2057c77868336d75780 Mon Sep 17 00:00:00 2001
+From: pradeep <pradeep at arrayfire.com>
+Date: Wed, 23 Sep 2015 11:39:57 -0400
+Subject: [PATCH] Restricts cpuid usage to only 64 & 32 bit architectures
+
+---
+ include/af/defines.h | 4 ++--
+ src/backend/cpu/platform.cpp | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/include/af/defines.h b/include/af/defines.h
+index 8587ef3..b593cd6 100644
+--- a/include/af/defines.h
++++ b/include/af/defines.h
+@@ -50,8 +50,8 @@
+ typedef long long dim_t;
+ #endif
+
+-#if defined(__arm__) || defined(_M_ARM) || defined(_M_ARMT) || defined(_ARM) || defined(_TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || defined(__thumb__)
+-#define ARM_ARCH
++#if defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86) || defined(_WIN64) || defined(__LP64__)
++#define USE_CPUID
+ #endif
+
+ #include <stdlib.h>
+diff --git a/src/backend/cpu/platform.cpp b/src/backend/cpu/platform.cpp
+index 2325cf5..7d77907 100644
+--- a/src/backend/cpu/platform.cpp
++++ b/src/backend/cpu/platform.cpp
+@@ -26,7 +26,7 @@ typedef unsigned __int32 uint32_t;
+
+ using namespace std;
+
+-#ifndef ARM_ARCH
++#ifdef USE_CPUID
+
+ #define MAX_INTEL_TOP_LVL 4
+
+@@ -76,7 +76,7 @@ class CPUInfo {
+ bool mIsHTT;
+ };
+
+-#ifdef ARM_ARCH
++#ifndef USE_CPUID
+
+ CPUInfo::CPUInfo()
+ : mVendorId(""), mModelName(""), mNumSMT(0), mNumCores(0), mNumLogCpus(0), mIsHTT(false)
+--
+2.5.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 933baad..1505180 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
fix-doxygen-settings.patch
disable-privacy-breach-doc.patch
bugfix-in-assign.patch
+bugfix-cpuid-usage.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list