Open yurivict opened 3 years ago
-fPIC
is also correct for static libraries, and required when you want to build a position-independent executable.
And when you build shared libraries with LTO (link-time-optimization), you typically end up with faster code due to cross-translation-unit optimization.
-fPIC
should only be used for shared libraries.-fPIC
reduces code performance therefore defearing the purpose of static libraries.Version 6.3.0 OS: FreeBSD 13