diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-07-04 14:05:23 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-07-04 14:05:23 +0100 |
commit | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (patch) | |
tree | 43b0410e62aba677b4b256bc3ffe3fd333d28dbe /sys-apps/x86info/files/x86info-1.30-pic.patch | |
parent | 90c88731bd036e5698b281fbc0a5f3aa4c9983ac (diff) |
gentoo resync : 04.07.2020
Diffstat (limited to 'sys-apps/x86info/files/x86info-1.30-pic.patch')
-rw-r--r-- | sys-apps/x86info/files/x86info-1.30-pic.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sys-apps/x86info/files/x86info-1.30-pic.patch b/sys-apps/x86info/files/x86info-1.30-pic.patch new file mode 100644 index 000000000000..6288846b48b7 --- /dev/null +++ b/sys-apps/x86info/files/x86info-1.30-pic.patch @@ -0,0 +1,31 @@ +--- a/cpuid.c ++++ b/cpuid.c +@@ -25,12 +25,28 @@ + + bind_cpu(cpunr); + ++#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; |