[SCM] gavl/master: Patch to simplify cpuid() logic (Closes: #759626)

umlaeute at users.alioth.debian.org umlaeute at users.alioth.debian.org
Mon Jul 13 13:53:52 UTC 2015


The following commit has been merged in the master branch:
commit 1e3aef82ff1ee7d43d60b02ed4733878cd68e0a9
Author: IOhannes m zmölnig <zmoelnig at umlautQ.umlaeute.mur.at>
Date:   Mon Jul 13 15:53:33 2015 +0200

    Patch to simplify cpuid() logic (Closes: #759626)
    
    Thanks to Adam Borowski <kilobyte at angband.pl>

diff --git a/debian/patches/0002-cpuid_x32.patch b/debian/patches/0002-cpuid_x32.patch
new file mode 100644
index 0000000..0314834
--- /dev/null
+++ b/debian/patches/0002-cpuid_x32.patch
@@ -0,0 +1,45 @@
+Description: simplify cpuid detection.
+ since all CPUs that can run Debian also have cpuid(),
+ we don't need to explicitely test for it.
+ This fixes an FTBFS on x32
+Author: Adam Borowski <kilobyte at angband.pl>
+Reviewed-by: IOhannes m zmölnig
+Last-Update: 2015-07-13
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- gavl.orig/gavl/cputest.c
++++ gavl/gavl/cputest.c
+@@ -69,32 +69,8 @@
+      int rval = 0;
+     int eax, ebx, ecx, edx;
+     int max_std_level, max_ext_level, std_caps=0, ext_caps=0;
+-    long a, c;
+-
+-    __asm__ __volatile__ (
+-                          /* See if CPUID instruction is supported ... */
+-                          /* ... Get copies of EFLAGS into eax and ecx */
+-                          "pushf\n\t"
+-                          "pop %0\n\t"
+-                          "mov %0, %1\n\t"
+-
+-                          /* ... Toggle the ID bit in one copy and store */
+-                          /*     to the EFLAGS reg */
+-                          "xor $0x200000, %0\n\t"
+-                          "push %0\n\t"
+-                          "popf\n\t"
+-
+-                          /* ... Get the (hopefully modified) EFLAGS */
+-                          "pushf\n\t"
+-                          "pop %0\n\t"
+-                          : "=a" (a), "=c" (c)
+-                          :
+-                          : "cc"
+-                          );
+-
+-    if (a == c)
+-        return 0; /* CPUID not supported */
+ 
++    /* any CPU that can run Debian has CPUID */
+     cpuid(0, max_std_level, ebx, ecx, edx);
+ 
+     if(max_std_level >= 1){
diff --git a/debian/patches/series b/debian/patches/series
index 467ad95..354267c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-ubuntu_armel_ftbfs.patch
+0002-cpuid_x32.patch

-- 
gavl packaging



More information about the pkg-multimedia-commits mailing list