<div dir="ltr">hey Cherry, thanks for noting this.<div><br></div><div>could you file a ticket on trac? (though adding it to the cross compiling notes on the wiki is great too)</div><div><br></div><div>cheers</div><div>-Carter</div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Dec 15, 2013 at 10:32 PM, cherry <span dir="ltr"><<a href="mailto:cherry.mui9@gmail.com" target="_blank">cherry.mui9@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<br><br>I am new to the list, though I have been using GHC for a long time. Just say Hello.<br><br>

I would like to share my experience about building GHC (7.7.20131112) on/for mips64el linux, just in case anybody is interested, as it seems not documented (on Wiki pages of Platforms, CrossCompiling, or Porting). Ignore this email if it is not interesting or too trivial.<br>


<br>It bootstrapped by cross compiling on x86_64 linux, with some tweaking on mk/<a href="http://build.mk" target="_blank">build.mk</a> and the build process. In particular, I needed to specify<br><br>export CPP="mips64el-unknown-linux-gnu-gcc -E"<br>


<br>otherwise the configure script just found to use the native "gcc -E" and it failed in preprocessing rts C files. Also in mk/<a href="http://build.mk" target="_blank">build.mk</a> I forced<br><br>GhcThreaded = NO<br>

GhcWithInterpreter = YES  # so, it can use TH and build happy<br>
<br>The make process failed when trying to use ghc-stage2, but at that point the stage 2 compiler is already built, that's enough.<br><br>With this cross-compiled ghc-stage2, the native build on mips64el machine was done without much interleaving. inplace/lib/unlit was x86_64 binary, and needed to be rebuild. Also manually built alex and happy (and their dependencies). Then it just went through. So, the new way of porting seems just cross compiling followed by native compiling? Somewhat surprisingly, GHCi is also working (forced it to be built), with system's dynamic linker.<br>


<br>Is there need to write/update a wiki page for this?<br><br>Thanks,<br>cherry<br><br></div>
<br>_______________________________________________<br>
Glasgow-haskell-users mailing list<br>
<a href="mailto:Glasgow-haskell-users@haskell.org">Glasgow-haskell-users@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/glasgow-haskell-users" target="_blank">http://www.haskell.org/mailman/listinfo/glasgow-haskell-users</a><br>
<br></blockquote></div><br></div>