Hi!
In squeeze and wheezy, if you had both bfd and gold installed, the latter
was the default. This made sense, as gold is a lot faster and uses far less
memory. Since version 2.23.52.20130722-1, the default reverted to bfd.
I'm afraid this causes a massive regression in some cases: what woken me up
was a test build suddenly taking 40 minutes instead of a couple tens of
seconds (obviously, bfd's profligate use of memory made the machine hit the
swap). And even on smaller builds on big machines, going from 1.5 seconds
to 6 doesn't sound like much, but as linking tends to take 10-20% of build
time (depending on the linker used :p), it really adds up.
Obviously, the two packages + divert hack was awful, and deserved to go.
However, if you want bfd to become the default, please allow a clean
method of making gold the default on a given system. Manually adding
-fuse-ld=gold to LDFLAGS works for a single project but is tedious,
especially considering that you need to autodetect whether that option
is supported or not. For someone who compiles lots of distinct projects,
each with a different build system with its own idiosyncratic quirks,
modifying every single build system is pretty much out of question.
Having gold as a system's default has been proven to work (by squeeze
and wheezy), with only a handful of packages failing to build with one
or the other -- and for the most part they have been already modified
to call the linker they need.
Per gcc's docs:
-fuse-ld=bfd
Use the bfd linker instead of the default linker.
-fuse-ld=gold
Use the gold linker instead of the default linker.
so there is no assumption about what's the default.
I'm not sure what interface would be the best.
* a low-priority debconf question, altering the symlink in postinst?
Probably the nicest.
* just not overwriting the symlink on upgrades, forcing the admin
to handle it by hand?
* [diversions suck]
* ???