Status and future of the LLVM backend
mail at joachim-breitner.de
Thu Dec 4 22:37:02 UTC 2014
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
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:
Author: Sebastian Dröge <sebastian at centricular.com>
Date: Tue Nov 18 12:40:20 2014 -0600
Fix detection of GNU gold linker if invoked via gcc with parameters
Previously the linker was called without any commandline parameters to
detect whether bfd or gold is used. However the -fuse-ld parameter can
be used to switch between gold and bfd and should be taken into account
Signed-off-by: Austin Seipp <austin at well-typed.com>
(which would have saved me some work had I known about it). I’ll try it
and report back.
Joachim “nomeata” Breitner
mail at joachim-breitner.de • http://www.joachim-breitner.de/
Jabber: nomeata at joachim-breitner.de • GPG-Key: 0xF0FBF51F
Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: This is a digitally signed message part
More information about the ghc-devs