Status and future of the LLVM backend

Joachim Breitner mail at
Sun Nov 30 17:56:36 UTC 2014

[Resent, as ghc-dev does not like my other address. Sorry Ben]


Am Sonntag, den 30.11.2014, 10:56 -0500 schrieb Ben Gamari:
> > 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 for arm_unknown_linux)
> Indeed this looks like ld.bfd is being used.

hmm, that’s annoying that --with-ld does not do the right thing. Is
there a bug reported about this?

> > I then followed your advice from somewhere else and passed
> > "" 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 `` to `PATH`. This is what this script[1] does.

hmm, I’ll need to port that somehow to how the Debian package is built.
But it seems to be cleaner to use the -B flag to gcc, available at least
on Debian, according to

What would be a reliable way to make the build system pass
-B/usr/bin/ to gcc? Is
SRC_HC_OPTS     += -optc-B/usr/bin/
in mk/ a good idea?

> 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 ``. The
> above script implements this fairly reliably.

What would be the symptoms of that problem?


Joachim “nomeata” Breitner
  mail at joachim-breitner.de
  Jabber: nomeata at  • GPG-Key: 0xF0FBF51F
  Debian Developer: nomeata at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the ghc-devs mailing list