Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 280953 Details for
Bug 375967
sys-power/cpufrequtils-008{,-r1} compilation failed "can't find a register in class ‘BREG’ while reloading ‘asm’"
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix compilation on x86-32 with -fPIC
0001-aperf-fix-compilation-on-x86-32-with-fPIC.patch (text/plain), 1.15 KB, created by
Matt Turner
on 2011-07-25 19:16:11 UTC
(
hide
)
Description:
patch to fix compilation on x86-32 with -fPIC
Filename:
MIME Type:
Creator:
Matt Turner
Created:
2011-07-25 19:16:11 UTC
Size:
1.15 KB
patch
obsolete
>From 28b7205609252b365b5fbcb140de22858cd631da Mon Sep 17 00:00:00 2001 >From: Matt Turner <mattst88@gmail.com> >Date: Mon, 25 Jul 2011 15:11:46 -0400 >Subject: [PATCH] aperf: fix compilation on x86-32 with -fPIC > >ebx is used to store the GOT pointer when compiled with -fPIC, so it's >not usable by inline assembly. > >https://bugs.gentoo.org/375967 > >Signed-off-by: Matt Turner <mattst88@gmail.com> >--- > utils/cpuid.h | 14 +++++++++++++- > 1 files changed, 13 insertions(+), 1 deletions(-) > >diff --git a/utils/cpuid.h b/utils/cpuid.h >index 2bac69a..53da789 100644 >--- a/utils/cpuid.h >+++ b/utils/cpuid.h >@@ -5,9 +5,21 @@ static inline void __cpuid(unsigned int *eax, unsigned int *ebx, > unsigned int *ecx, unsigned int *edx) > { > /* ecx is often an input as well as an output. */ >- asm volatile("cpuid" >+ asm volatile( >+#if defined(__i386__) && defined(__PIC__) >+ "push %%ebx\n" >+ "cpuid\n" >+ "movl %%ebx, %1\n" >+ "pop %%ebx\n" >+#else >+ "cpuid\n" >+#endif > : "=a" (*eax), >+#if defined(__i386__) && defined(__PIC__) >+ "=r" (*ebx), >+#else > "=b" (*ebx), >+#endif > "=c" (*ecx), > "=d" (*edx) > : "0" (*eax), "2" (*ecx)); >-- >1.7.3.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 375967
:
280579
| 280953