[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc and -fPIC



On Wed, 20 Mar 2002, Will Newton wrote:

[PIC or not PIC]

> I understand the need for PIC, but I was asking whether or not compiling
> whole binaries with PIC unnecesarily might be a bad thing. e.g. if I cannot
> control the granularity of compiler options easily in a build system and I
> build an executable with -fPIC in order to build an accompanying library
> correctly, am I trading off speed or footprint to any significant degree?

On most architectures, it doesn't really matter except for heavy
mathematics and 3D. The only exception is i386, where the performance
decrease is actually measurable.

> Hmm, it seems like a bad way to do this by adding
> export CC="gcc -fPIC"
> to the top of the Makefile. I'll have to think about this some more...

Well, or just talk upstream into using libtool. :-)

   Simon

-- 
GPG public key available from http://phobos.fs.tum.de/pgp/Simon.Richter.asc
 Fingerprint: 040E B5F7 84F1 4FBC CEAD  ADC6 18A0 CC8D 5706 A4B4
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!



Reply to: