tags 528856 +patch +pending
thanks

Hi,

Just using the latest version of cpu.c from upstream subversion makes
the package build fine on i386 and amd64; I will shortly NMU with the
attached patch.


cheers,

Michael
diff -u inteltool-0.0+r4091/debian/changelog 
inteltool-0.0+r4091/debian/changelog
--- inteltool-0.0+r4091/debian/changelog
+++ inteltool-0.0+r4091/debian/changelog
@@ -1,3 +1,10 @@
+inteltool (0.0+r4091-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Replaced cpu.c with latest upstream subversion revision (Closes: #528856).
+
+ -- Michael Banck <mba...@debian.org>  Sun, 29 Nov 2009 01:00:59 +0100
+
 inteltool (0.0+r4091-1) unstable; urgency=low
 
   * Initial release (Closes: #523525).
only in patch2:
unchanged:
--- inteltool-0.0+r4091.orig/cpu.c
+++ inteltool-0.0+r4091/cpu.c
@@ -30,21 +30,23 @@
 
 unsigned int cpuid(unsigned int op)
 {
-       unsigned int ret;
-       unsigned int dummy2, dummy3, dummy4;
-       asm volatile ( 
-               "pushl %%ebx    \n"
-               "cpuid          \n"
-               "movl %%ebx, %1 \n"
-               "popl %%ebx     \n"
-               : "=a" (ret), "=r" (dummy2), "=c" (dummy3), "=d" (dummy4)
-               : "a" (op)
-               : "cc"
-       );
+       uint32_t ret;
+
+#if defined(__DARWIN__) && !defined(__LP64__)
+        asm volatile (
+                "pushl %%ebx    \n"
+                "cpuid          \n"
+                "popl %%ebx     \n"
+                : "=a" (ret) : "a" (op) : "%ecx", "%edx"
+        );
+#else
+       asm ("cpuid" : "=a" (ret) : "a" (op) : "%ebx", "%ecx", "%edx");
+#endif
+
        return ret;
 }
 
-#ifndef DARWIN
+#ifndef __DARWIN__
 int msr_readerror = 0;
 
 msr_t rdmsr(int addr)
@@ -279,7 +281,7 @@
                return -1;
        }
 
-#ifndef DARWIN
+#ifndef __DARWIN__
        fd_msr = open("/dev/cpu/0/msr", O_RDWR);
        if (fd_msr < 0) {
                perror("Error while opening /dev/cpu/0/msr");
@@ -300,7 +302,7 @@
        close(fd_msr);
 
        for (core = 0; core < 8; core++) {
-#ifndef DARWIN
+#ifndef __DARWIN__
                char msrfilename[64];
                memset(msrfilename, 0, 64);
                sprintf(msrfilename, "/dev/cpu/%d/msr", core);
@@ -321,12 +323,12 @@
                               cpu->per_core_msrs[i].number, msr.hi, msr.lo,
                               cpu->per_core_msrs[i].name);
                }
-#ifndef DARWIN
+#ifndef __DARWIN__
                close(fd_msr);
 #endif
        }
 
-#ifndef DARWIN
+#ifndef __DARWIN__
        if (msr_readerror)
                printf("\n(*) Some MSRs could not be read. The marked values 
are unreliable.\n");
 #endif

Reply via email to