This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: ok to add -fPIC to non shared library?
- From: Tim Pushor <tim at thepushors dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 25 May 2009 07:59:08 -0600
- Subject: Re: ok to add -fPIC to non shared library?
- References: <4A15A142.6060008@thepushors.com> <m3ljopskt4.fsf@google.com>
Thank you for the reply, Ian.
If you don't mind explaining a bit further, why exactly will it be slower?
Thanks,
Tim
Ian Lance Taylor wrote:
Tim Pushor <tim@thepushors.com> writes:
I'll cut to the chase - 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.
Ian