<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 22, 2019 at 9:52 AM Ben Gamari <<a href="mailto:ben@smart-cactus.org">ben@smart-cactus.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Igor Chudov <<a href="mailto:nir@altlinux.org" target="_blank">nir@altlinux.org</a>> writes:<br>
<br>
> Thanks, Ben!<br>
>  <br>
> I read old docs and found that it was mentioned that it's possible to<br>
> start bootstrap with GHC 4.08.2 and HC files supplied. I performed<br>
> "./configure && make" stage on x86_64 machine and moved sources to the<br>
> desired machine (and successfully patched some files to work with<br>
> exotic C compiler) but encountered<br>
<br>
Oh dear; I missed the fact that you lack a cross-compiling toolchain.<br>
Things are much easier if you can cross-compile.<br>
<br>
Given your situation your approach is probably the best you can do.<br>
I have never done a native bootstrap like this and consequently have no<br>
idea what challenges lay in wait. It sounds like it may be a long road,<br>
however.<br>
<br>
Cheers,<br>
<br>
- Ben<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>brandon s allbery kf8nh</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a></div></div></div></div></div>