ok to add -fPIC to non shared library?

Ian Lance Taylor iant@google.com
Fri May 22 06:56:00 GMT 2009


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



More information about the Gcc-help mailing list