Mips64el Linux Build

cherry cherry.mui9 at gmail.com
Mon Dec 16 03:32:13 UTC 2013


Hello,

I am new to the list, though I have been using GHC for a long time. Just
say Hello.

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.

It bootstrapped by cross compiling on x86_64 linux, with some tweaking on
mk/build.mk and the build process. In particular, I needed to specify

export CPP="mips64el-unknown-linux-gnu-gcc -E"

otherwise the configure script just found to use the native "gcc -E" and it
failed in preprocessing rts C files. Also in mk/build.mk I forced

GhcThreaded = NO
GhcWithInterpreter = YES  # so, it can use TH and build happy

The make process failed when trying to use ghc-stage2, but at that point
the stage 2 compiler is already built, that's enough.

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.

Is there need to write/update a wiki page for this?

Thanks,
cherry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20131215/77642802/attachment.html>


More information about the Glasgow-haskell-users mailing list