Okay after my –as-needed experiment proved not so bad (well a part many GNOME packages and MySQL and so on), I looked forward for something new to test that was conservative enough but still a good deal, and I ended up trying -Bdirect support by Michael Meeks.
This is a bit less conservative than –as-needed at it requires to patch both glibc and binutils, but I heard Michael praising those patches so much, that I hoped they were working fine 🙂
The bug for who wants to follow the -Bdirect function is #114008. I put the patched glibc and binutils ebuilds in my overlay for who dares to test them.
Now, the main problem is that xorg-server does not start when built with -Bdirect and if the variable LD_BIND_DIRECT is set (either to 1 or 0!). The problem can be worked around by starting X with LD_BIND_DIRECT unset (thus disabling direct binding) and then re-setting it to 1 in the session script, as I done here with kdm. On kdm the line to change in /usr/kde/*/share/config/kdm/kdmrc is
ServerCmd=/usr/bin/env LD_BIND_DIRECT= /usr/bin/X -br
the default Xsession of KDM will already reload the profile in /etc/profile so if you set LD_BIND_DIRECT in /etc/env.d you’re already safe.
The speed increase seems interesting, with KMail at least that was built by itself with no other deps being using it. I’m really looking forward to it to see how it will behave on a complete system.
And for another note, thanks to KingTaco today I moved my SATA disks from the on-board VIA controller to the on-board Promise controller… it feels faster..
I reinstalled following the Conrad Install Guide (except with safer CFLAGS) and the problem disappeared (xorg 7.0 starts fine with LD_BIND_DIRECT set).So it could be caused by binutils-2.16.1-r1, or by gcc 3.4.4, or by having only some of your system compiled with -Bdirect.
I don’t have binutils 2.16.1-r1 nor gcc 3.4.4, and the whole system is built with -Bdirect.The problem might be a binutils bug or somewhere else, I’d rather stick in the safe side anyway.
I also had a problem where X wouldn’t start when compiled with -Wl,-Bdirect and LD_BIND_DIRECT=1 was set. I discovered that if I recompile x11-libs/libXfont without -Wl,-Bdirect, X starts fine with LD_BIND_DIRECT=1. My whole system has now been compiled with -Wl,-Bdirect (except for libXfont).I reported my findings in Bug #114008.Neil