Gecode / gecode

Generic Constraint Development Environment
https://www.gecode.org
Other
283 stars 76 forks source link

Builds with -fPIC when --enable-static is used #117

Open yurivict opened 3 years ago

yurivict commented 3 years ago

-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

StefanBruens commented 2 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.