patch: c/cxxflags for static libraries
Thiago Macieira
thiago at kde.org
Sun Jul 16 20:31:05 CEST 2006
Stephan Kulow wrote:
>> Static libraries don't need -fPIC.
>
>OK, this turning in circles, but let me quote from above:
>static libraries have to be built PIC in order for them to be able
>to be linked into shared objects.
Static libraries can't be linked into shared objects. They can only be
linked into the final executable. And the final executable doesn't
need -fPIC -- though we do use -fPIE.
If you add a .o that happens to be in an ar archive into a shared library,
you've got a convenience library, not a static library. In those cases,
just link the .o once and for all. There's no need to create the archive.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20060716/4be32be2/attachment.pgp
More information about the Kde-buildsystem
mailing list