Mips64el Linux Build
cherry.mui9 at gmail.com
Mon Dec 16 03:32:13 UTC 2013
I am new to the list, though I have been using GHC for a long time. Just
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Glasgow-haskell-users