On Tue, Mar 01, 2011 at 10:17:36AM +0300, Vladimir Prus wrote: > Could you brief me on what's --as-needed, why is it needed, and why > does it break a perfect model of "I link to shared library foo, and > whatever dependecies are used automatically".
The rationale (from http://wiki.debian.org/ToolChain/DSOLinking) is to detect situations where your executable links against a library A which links against library B, but your executable needs symbols in library B. This is problematic in the situation where library A removes its dependency to library B. The next time the executable gets rebuild it will break and cannot be linked. I think that pkg-config style dependency information is also helpful for people using static linking. Cheers, -Steve
signature.asc
Description: Digital signature