[PATCH] Libtool & indirect dependencies
gyurco at freemail.hu
Sun May 30 16:07:07 BST 2004
Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu
I started a thread about how to _not_ link a lib/program to its indirect
dependencies. It turned out that libtool links to all dependency_libs in
the .la file. In a discussion at the libtool mailing list turned out that
this problem may not easily solved by libtool, mainly because removing
dependency_libs will break static library linking.
So I started to look into 'ld', and found out that newer GNU ld's have the
--as-needed flag, which is exactly what I was looking for. The only problem
with this that if I specify a LDFLAGS=-Wl,--as-needed, libtool will insert
this option _after_ the libraries to be linked, effectively disabling the
expected behavior. My patch simply bring $compiler_options before any
dependencies in libtool, so the --as-needed flag actually will have the
I already compiled kdelibs, kdebase and a couple of other modules with
success, and greatly reduced dependencies!
Is my patch acceptable? If it is, then I'll try to push this to libtool
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5818 bytes
Desc: not available
More information about the kde-core-devel