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
pgpkUcY0Jm47c.pgp
Description: PGP signature
_______________________________________________ Kde-buildsystem mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-buildsystem
