diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-08-15 23:41:13 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-08-15 23:41:13 +0000 |
commit | c775045f5f0aa9f7a3277bce561a5aa5f33cd49a (patch) | |
tree | c76c9a61ceb90e7b9cb0fc2a65ec48fd8fb552f5 /sys-apps/x86info/files | |
parent | Remove unused python_makesym() function. (diff) | |
download | historical-c775045f5f0aa9f7a3277bce561a5aa5f33cd49a.tar.gz historical-c775045f5f0aa9f7a3277bce561a5aa5f33cd49a.tar.bz2 historical-c775045f5f0aa9f7a3277bce561a5aa5f33cd49a.zip |
Fix by Radoslaw Madej for PIC issues with cpuid #270388 by Richard Scott. Also fix $ROOT checking in pkg_preinst.
Package-Manager: portage-2.2_rc38/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/x86info/files')
-rw-r--r-- | sys-apps/x86info/files/x86info-1.24-pic.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sys-apps/x86info/files/x86info-1.24-pic.patch b/sys-apps/x86info/files/x86info-1.24-pic.patch new file mode 100644 index 000000000000..5cbd3a586f8e --- /dev/null +++ b/sys-apps/x86info/files/x86info-1.24-pic.patch @@ -0,0 +1,33 @@ +http://bugs.gentoo.org/270388 + +--- cpuid.c ++++ cpuid.c +@@ -62,12 +62,28 @@ + sched_setaffinity(getpid(), sizeof(set), &set); + } + ++#ifdef __PIC__ ++ /* GCC on i386 bitches if you clobber ebx. So hide it behind ++ * gcc's back. */ ++ asm( ++ "movl %%ebx,%%edi\n" ++ "cpuid\n" ++ "movl %%ebx,%1\n" ++ "movl %%edi,%%ebx\n" ++ : "=a" (a), ++ "=m" (b), ++ "+c" (c), ++ "=d" (d) ++ : "0" ((unsigned int)idx) ++ : "edi"); ++#else + asm("cpuid" + : "=a" (a), + "=b" (b), + "+c" (c), + "=d" (d) + : "0" ((unsigned int)idx)); ++#endif + + if (eax!=NULL) + *eax = a; |