i368-pc-os2-emx port

Simon Marlow simonmar@microsoft.com
Thu, 21 Feb 2002 10:13:43 -0000


> On Wed, 20 Feb 2002, Simon Marlow wrote:
>=20
> > I don't know enough about ODIN to be able to usefully comment, apart
> > from to say that extra layers of translation generally add extra
> > layers of complication (we've had no end of trouble with=20
> cygwin/mingw
> > on Win32), and in this case you'd be going through 2 layers (mingw +
> > ODIN) which could well be more trouble than it's worth.
>=20
> ODIN will (might) allow me to run the Win32 GHC executable under OS/2
> (ODIN implements the win32 api and comes with a PE loader)=20
> (ODIN is Wine
> for OS/2).  I thought this might be useful to help bootstrap the
> compalation of GHC under OS/2, because I'd wind up with a=20
> Haskell complier
> (although one that produces windows executables).  Maybe I'll=20
> hold off on
> such an approach until (or if) it become clear that such a=20
> venture would
> be useful.

Interesting - you might be able to bootstrap this way.  The idea would =
be to run the Win32 compiler under ODIN but persuade it to compile via C =
using your EMX gcc - hence generating EMX object files.  This is good =
because you can start by just compiling up the RTS and libraries, and =
test that the compiler is producing working binaries before going on to =
bootstrap a native compiler.

I would go straight for a "registerised" port, since you're on x86 and =
have gcc.  Some minor hacking will likely be required to the mangler =
(ghc/driver/mangler/ghc-asm.lprl) and one or two bits of the RTS.

Cheers,
	Simon