Don't know if my previous message got through....

Asfand Yar Qazi email@asfandyar.cjb.net
Sat Feb 4 15:46:00 GMT 2006


I didn't receive a copy of my message that I sent even though I am subscribed 
- please excuse me if it is a duplicate, but I think it may have gotten lost 
in transit.  I'm including it below:

Subject: Using '-whole-archive' on ".a" files to produce ".so" files - what's 
the point of '-fPIC' on x86?

Hi,

On several occasions I've used the '-whole-archive' flag of ld via -Wl on gcc 
to convert .a files to .so files.  I can't understand why libtool has to 
compile things twice, once using -fPIC and once not using it - I checked the 
resulting object  files and the -fPIC files are bigger, and yet I've never 
needed to use that flag when doing my .a to .so conversions.

Could someone explain this to me?  Isn't compiling twice with libtool 
redundant and a waste of time?

Thanks



More information about the Gcc-help mailing list