Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 93230

Summary: games-emulation/xmame-0.96 doesn't compile with -fPIC
Product: Gentoo Linux Reporter: Francesco <francesco.doffizi>
Component: [OLD] GamesAssignee: Gentoo Games <games>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Francesco 2005-05-19 09:49:25 UTC
"src/x86drc.c:696: error: PIC register `%ebx' clobbered in `asm'" and so on...
As told here http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8546 clobbering %ebx is
now illegal in PIC mode on mainline.
So the ebuild I think should filter the CFLAG.

Reproducible: Always
Steps to Reproduce:
1.set -fPIC in CFLAGS
2.emerge xmame
3.

Actual Results:  
It doesn't compile with "src/x86drc.c:696: error: PIC register `%ebx' clobbered
in `asm'" error.

Expected Results:  
Have xmame compiled

I removed -fPIC from CFLAGS and it's compiling now... it seems to work this way.
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2005-05-19 09:51:01 UTC
Good that's what you should do.  Don't put -fPIC in your global CFLAGS.
Comment 2 Francesco 2005-05-19 11:50:56 UTC
I use prelink my system and doing it without -fPIC CFLAG is a bad idea. A lot of
ebuilds filter CFLAGS so I don't see why this one can't filter -fPIC CFLAG now
we know that with -fPIC it doesn't compile!
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2005-05-19 13:38:16 UTC
Ehh... no

Using -fPIC turns on PIC for everything that is compiled, which is completely
incorrect.  The answer is you you to not use -fPIC in your USE flags.  Don't
worry, xmame and prelink will play along just fine