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

Bug 79984

Summary: CFLAGS=-Wl,-O1 removes -fPIC and leads to compile failures
Product: Gentoo Linux Reporter: Heinrich Wendel (RETIRED) <lanius>
Component: [OLD] UnspecifiedAssignee: AMD64 Project <amd64>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Heinrich Wendel (RETIRED) gentoo-dev 2005-01-29 12:09:52 UTC
If you have -Wl,-O1 in your CFLAGS, a lot of application will fail to compile with a simliar error:

libs/fcatomic.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC

That's because binutils/gcc/whatever removes -fPIC from CFLAGS if -Wl,-O1 is given.
Comment 1 Simon Stelling (RETIRED) gentoo-dev 2005-03-25 14:58:06 UTC
Never stick -fPIC into your CFLAGS