SGI-Port // Mnagler-Gcc Interface...

Simon Marlow simonmar@microsoft.com
Wed, 27 Feb 2002 12:21:07 -0000


Hi there,

> I'm trying to run GHC in a mips-SGI-irix platform, more=20
> accurately Irix
> 6.
>=20
> The last binary version avalaible
> (ftp://ftp.dcs.glasgow.ac.uk/pub/haskell/glasgow/) is for ghc-2.10
> (ghc-2.10-mips-sgi-irix6.tar.gz) .
>=20
>=20
> In order to reach the actual ghc-5-XX step by step, I will start by
> porting ghc-3.02, ghc-4.08....

This is one way, but as you noticed you need to be careful about gcc =
versions.  There are 4 porting steps involved: 2.10 (should just work =
given the right gcc version), 3.02, 4.08, and finally 5.02.  Each step =
will require a particular gcc and perhaps changes to the mangler.

This is a long and tortuous route to getting GHC working.  There is a =
better way, as suggested by Keith, namely to bootstrap from .hc files.  =
The best version to start from is 4.08(.2) (later versions have problems =
with .hc bootstrapping).

One can bootstrap the compiler using "unregisterised" .hc files, which =
avoids the mangler.  The process has been discussed on one of the lists =
before, but I just did a search and couldn't find it - maybe you'll have =
better luck.  Anyhow there are three stages: first you generate the =
unregisterised .hc files using a two-stage bootstrap on a machine with a =
working 4.08 GHC (eg. a Linux box).  Then you compile these on the =
target machine to generate a working unregisterised compiler.

Finally you can use this compiler to experiment with getting =
registerised builds working - i.e. modifying the mangler.

Cheers,
	Simon