Re: ok to add -fPIC to non shared library?

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

 



Tim Pushor wrote:
>
> If you don't mind explaining a bit further, why exactly will it be slower?

> Ian Lance Taylor wrote:
is it ok to include -fPIC compiling C code to
>>> be included in a static library?
>>>     
>>
>> Yes.
>>
>> However, the resulting executable will run slightly slower.
>>
I'd certainly like to see Ian's answer.  Meanwhile, I'll offer:
This depends somewhat on the target platform.  The fPIC code relocatable
and preemptible stuff involves an extra layer of indirection on function
calls.  So, you are giving up some of the potential advantage of static
library.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux