[Qt-creator] Theory of Operation question concerning configurations
Jonathan S. Shapiro
shap at eros-os.org
Thu May 31 19:11:32 CEST 2012
On Wed, May 30, 2012 at 4:28 PM, Konstantin Tokarev <annulen at yandex.ru>wrote:
> Use -fPIC, Luke :)
>
> --
> Regards,
> Konstantin
>
I think you are kidding, but just in case you are not...
There are target environments where -fPIC/-fpic are not supported. There
are other target environments where the runtime overhead of
position-independent code is very substantial.
In target environments that support shared libraries, object files produced
with -fPIC (or equivalent) can *usually* be used in a static library for
the same environment, but there is a significant loss of efficiency.
For this reason, it is a nearly universal convention to compile library
source files twice: once for position-independent shared use and the other
for position-dependent linkage.
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20120531/8faa09a1/attachment.html>
More information about the Qt-creator
mailing list