[Pkg-haskell-maintainers] Bug#673081: binutils-gold breaks ghc linking stage

Jonathan Nieder jrnieder at gmail.com
Wed May 16 15:01:08 UTC 2012


Hi Joachim,

Joachim Breitner wrote:
> Am Dienstag, den 15.05.2012, 22:22 +0100 schrieb Finn Lawler:

>> ghc 7.4.1-3 (unstable) appears to be configured against the ordinary
>> binutils ld.  The ld.gold that binutils-gold 2.22-6 (testing) replaces it
>> with does not accept the `--hash-size' option, resulting in a fatal error
>> at the linking stage.
[...]
> not sure what we should do here. Should GHC at runtime detect what
> linker is used, and pass the appropriate flags? Is there a stable path
> to the GNU ld that can be used no matter whether binutils-gold is
> installed or not? Is /usr/bin/ld.bfd or /usr/lib/compat-ld/ld the right
> path to use? Or is it binutils-gold’s responsibility to accept any
> arguments that GNU ld accepts when it installs itself as /usr/bin/ld?

In the short term, configuring GHC to use ld.bfd (from the PATH, no
hardcoded path needed) makes sense.

In the long term, it might make sense for gold to learn --hash-size.
In that case, filing a report at http://sourceware.org/bugzilla/
product binutils, component gold, describing what GHC uses the option
for, would be the way to go.

Hope that helps,
Jonathan





More information about the Pkg-haskell-maintainers mailing list