
Hi, Am Montag, den 01.12.2014, 13:17 -0500 schrieb Ben Gamari:
Is there any way you could poke around at the state of the tree after the failure? It would be nice to confirm that this is in fact that bfd/gold issue and perhaps figure out why ld.gold isn't being used.
Otherwise I can try to reproduce this on my ARM box.
ok, I finally reproduced this on a porter box, and (using strace...) I
found out that -B/usr/bin/ld.gold was ignored. What did work was passing
-optl-fuse-ld=gold to ghc. But that, in turn, causes
/usr/bin/ld.gold: --hash-size=31: unknown option
There seems to be some special handling for Gold in SysTools.lhs, via
getLinkerInfo'. But passing -pgml=/usr/bin/ld.gold to ghc causes
/usr/bin/ld.gold: -pthread: unknown option
/usr/bin/ld.gold: use the --help option for usage information
so this is not the right thing to do.
The problem is that in order to find out which linker is used, ghc calls
/usr/bin/gcc -Wl,-version
without passing the options from -optl, so the -fuse-ld=gold is not used
in this step. I’m a bit confused, because the code in getLinkerInfo'
looks like it should be passing them... ah, but only on HEAD, not in
7.8... and git blame tells me that I probably want to apply this patch:
commit e7b414a3cc0e27049f2608f5e0a00c47146cc46d
Author: Sebastian Dröge