GHC native bootstrap

Brandon Allbery allbery.b at
Mon Jul 22 14:31:05 UTC 2019

IIRC another way to do this, which was and possibly still is used on ARM,
is to compile on the host with -fllvm, saving the LLVM IR output, and then
run opt on the target. This requires the target have an LLVM toolchain at
the same (or at least IR compatible, but note that they make few if any
guarantees about this) version as the host.

On Mon, Jul 22, 2019 at 9:52 AM Ben Gamari <ben at> wrote:

> Igor Chudov <nir at> writes:
> > Thanks, Ben!
> >
> > I read old docs and found that it was mentioned that it's possible to
> > start bootstrap with GHC 4.08.2 and HC files supplied. I performed
> > "./configure && make" stage on x86_64 machine and moved sources to the
> > desired machine (and successfully patched some files to work with
> > exotic C compiler) but encountered
> Oh dear; I missed the fact that you lack a cross-compiling toolchain.
> Things are much easier if you can cross-compile.
> Given your situation your approach is probably the best you can do.
> I have never done a native bootstrap like this and consequently have no
> idea what challenges lay in wait. It sounds like it may be a long road,
> however.
> Cheers,
> - Ben
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at

brandon s allbery kf8nh
allbery.b at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list