Your comment belongs on slashdot, not here. Let's see how many falsehoods
I can eliminate before ncm gets here and vapourises you.
Firstly, your 'old diehard UNIX men' are clueless. GCC relied on a lot of
ad-hoc algorithms at one point: that did not make it a 'total shit of
banana republic code' by any standard. G++ was one of the first C++
compilers written, I think the first that did not emit C code: so it
certainly wasn't of 'utter inferior quality' then. GCC as a whole went
through a bad patch in the early-to-mid-90s, when maintenance largely
stalled: but once egcs started (has it been ten years already?) G++ was
one of the first parts to improve.
It's definitely not 'utterly inferior' now, in fact it's one of the better
compilers out there, with an internal architecture that's gone from being
crufty as anything and full of hidden dependencies to being, well, much
less crufty over the last few years (cleaning up code that old is an
Its only remaining hole is optimization: especially on machines with small
register files, vendor compilers could often out-optimize it. This, too,
is steadily being fixed.
Introducing a new linker, no matter how hotshot (and gold *is* a damn good
piece of work) doesn't make the *compiler* better or worse in any way. I
can't fathom the misunderstandings that could lead you to believe that
switching linkers depending on the source language in use has any merit at
all. The most integration that is likely to happen seems to be to have the
linker running in parallel with the compiler, accepting object code and
incrementally linking it as the compiler disgorges it. Anything more than
that seems pointless.
Makefiles are the wrong place to solve linker script problems. The problem
is that GNU ld was fundamentally driven by linker scripts, and gold is not
(as well as that the Linux kernel constructs some seriously contorted ELF
files: OS kernels don't have to stick to the rules: they are generally
loaded by special-purpose code, not by ELF loaders).
The obvious way to see what commands are executed when running make is to
use 'make -n', but if some of the commands are themselves makes you'll
need to do something else. It's probably simplest just to add a couple of
printf()s to make itself, or strace the whole thing with "-ff -e
trace=process". Digging the commands out of the makefile by hand is