Status and future of the LLVM backend
Ben Gamari
bgamari.foss at gmail.com
Sun Nov 30 15:56:20 UTC 2014
Joachim Breitner <mail at joachim-breitner.de> writes:
> Hi Ben,
>
>
> Am Freitag, den 28.11.2014, 18:27 -0500 schrieb Ben Gamari:
>> I've written down some thoughts on the current status and future
>> direction of the LLVM backend here [1].
>
> thanks. I tried to build ghc-7.8.4-rc1 on Debian, and it failed on arm*.
> First, because it picked llvm-3.5. After I tightened the dependencies to
> use llvm-3.4, it failed with
> dll-split: internal error: evacuate(static): strange closure
> type 0
> (GHC version 7.8.3.20141119 for arm_unknown_linux)
Indeed this looks like ld.bfd is being used.
> I then followed your advice from somewhere else and passed
> "--with-ld=ld.gold" to ./configure, but with the same effect:
Unfortunately I don't think this will be sufficient. I believe this
will only set the `LD` variable in the build system, which as far qas I
know is never used. We always call gcc to do our linking for us;
gcc will in turn just use whatever `ld` it finds in `PATH`. For this
reason I have resorted to simply adding a directory containing a symlink
to `ld.gold` to `PATH`. This is what this script[1] does.
Unfortunately it's also a bit more subtle than this; it's very likely
that the ghc you are bootstrapping from contains relocations that aren't
supported by gold. For this reason you'll likely need to build some of
the utilities with `ld.bfd` the continue the build with `ld.gold`. The
above script implements this fairly reliably.
Cheers,
- Ben
[1] https://gist.github.com/bgamari/9399430
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141130/544ae29d/attachment.sig>
More information about the ghc-devs
mailing list