[openblas] 01/02: qemu-athlon.patch: new patch, should fix FTBFS on babin.debian.org
Sébastien Villemot
sebastien at alioth.debian.org
Tue Aug 27 16:20:23 UTC 2013
This is an automated email from the git hooks/post-receive script.
sebastien pushed a commit to branch master
in repository openblas.
commit e5bfb1a460ebe837809840d5b0a452dc2c908b2e
Author: Sébastien Villemot <sebastien at debian.org>
Date: Tue Aug 27 18:03:45 2013 +0200
qemu-athlon.patch: new patch, should fix FTBFS on babin.debian.org
---
debian/changelog | 8 ++++++++
debian/patches/qemu-athlon.patch | 38 ++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 47 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 2fcdc3d..f18eeee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+openblas (0.2.8-2) UNRELEASED; urgency=low
+
+ * qemu-athlon.patch: new patch, should fix FTBFS on babin.debian.org
+ (which is a weird qemu guest declaring an Athlon CPU but without
+ 3dnow! extensions)
+
+ -- Sébastien Villemot <sebastien at debian.org> Tue, 27 Aug 2013 17:33:48 +0200
+
openblas (0.2.8-1) unstable; urgency=low
* New upstream release
diff --git a/debian/patches/qemu-athlon.patch b/debian/patches/qemu-athlon.patch
new file mode 100644
index 0000000..51174b9
--- /dev/null
+++ b/debian/patches/qemu-athlon.patch
@@ -0,0 +1,38 @@
+Description: Avoid failure on qemu guests declaring an Athlon CPU without 3dnow!
+ babin.debian.org is a qemu guest which declares the CPU model and family of an
+ Athlon CPU. The dynamic engine of OpenBLAS recognizes that machine as an Athlon
+ CPU and uses the corresponding kernel. However, that machine does not have
+ 3dnow! extensions, and OpenBLAS therefore crashes because of illegal
+ instructions.
+ .
+ The present patch verifies that, on machines declaring an Athlon CPU model and
+ family, the 3dnow and 3dnowext feature flags are indeed present. If they are
+ not, it fallbacks on the most generic x86 kernel.
+Author: Sébastien Villemot <sebastien at debian.org>
+Bug: https://github.com/xianyi/OpenBLAS/issues/272
+Last-Update: 2013-08-27
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/driver/others/dynamic.c
++++ b/driver/others/dynamic.c
+@@ -224,7 +224,19 @@
+ }
+
+ if (vendor == VENDOR_AMD){
+- if (family <= 0xe) return &gotoblas_ATHLON;
++ if (family <= 0xe) {
++ // Verify that CPU has 3dnow and 3dnowext before claiming it is Athlon
++ cpuid(0x80000000, &eax, &ebx, &ecx, &edx);
++ if (eax & 0xffff >= 0x01) {
++ cpuid(0x80000001, &eax, &ebx, &ecx, &edx);
++ if ((edx & (1 << 30)) == 0 || (edx & (1 << 31)) == 0)
++ return NULL;
++ }
++ else
++ return NULL;
++
++ return &gotoblas_ATHLON;
++ }
+ if (family == 0xf){
+ if ((exfamily == 0) || (exfamily == 2)) {
+ if (ecx & (1 << 0)) return &gotoblas_OPTERON_SSE3;
diff --git a/debian/patches/series b/debian/patches/series
index d6431ab..31f3fdf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
libblas3-soname.patch
test-custom-package.patch
+qemu-athlon.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/openblas.git
More information about the debian-science-commits
mailing list