You CAN link ARCHIVE libraries when building dynamic libraries.
As long as the archive (.a) was compiled with -fPIC/-fpic.

I do it all the time when building shared libraries for embedded
devices, where you do not want to distribute a massive shared library,
or multiple shared libraries. By building the embedded archive libraries
with -fPIC/-fpic, you can link them and build one new shared library. In
fact many open source project build multiple archive libs, then link at
the final step into the final dynamic library.

The problem is not -shared which is misleading. The issue is was the
archive library built with -fPIC/-fpic or not?

The bug exists, because when building a -fPIC/fpic archive library
(linked with -Bstatic libName -Bdynamc, where libName WAS compiled
dynamic, you get the error.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/640734

Title:
  crtbeginT.o needs to be recompiled with -fPIC

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.4/+bug/640734/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to