The gold linker and KDE
Andreas Hartmetz
ahartmetz at gmail.com
Mon Apr 14 00:09:14 CEST 2008
Hi all,
I am one of the few KDEers who tried to link KDE4 using the upcoming linker in
GNU binutils called "gold". gold fails if it encounters an unimplemented
option (I guess it should ignore some less important ones instead) and it
seems to be less forgiving when given an incomplete list of required
libraries. The upside is that in pure link time gold is reportedly 5 to 6
times faster than the old ld.
We obviously want to use gold at some point, right? :)
I worked around the unknown options problem by hacking the gold options
parser. In kdebase I added libdl to nspluginviewer's libraries. After that
kdesupport, kdelibs, kdepimlibs and kdebase compiled and linked. When running
the resulting binaries, however, knotify4 crashed every time it tried to play
a sound because, apparently, the loading of phonon's xine backend failed.
pusling on #kde-devel suggested that the xine backend itself might not be
linked properly.
Can you guess what might go wrong here? Ideally somebody who knows linking and
the build system very well would try to link KDE with gold and fix everything
necessary to make it work... I think that the gold maintainer will also fix
obvious bugs quickly when asked.
Another strange behavior (for the uninitiated) is that setting the linker to
gold using ccmake will not have any effect. Maybe this is because gcc/g++
will be used as the frontend to ld and you can't really tell it which linker
to use? This matters becaues just copying gold over ld will break compilation
of KDE3 and probably many other applications which seem to have sloppy
dependency lists.
Cheers,
Andreas
--
- Flint Paper's office is piled high with shot-up criminals and the walls are
riddled with bullet holes and he's kissing a beautiful woman right on the
mouth!
- Wonder if the munsters are on yet?
More information about the Kde-buildsystem
mailing list