patch applied (ghc): No longer force -fvia-C for the RTS, it can now be compiled with the NCG

Simon Marlow simonmarhaskell at gmail.com
Thu Jun 29 10:28:58 EDT 2006


Simon Marlow wrote:
> Thu Jun 29 06:58:36 PDT 2006  Simon Marlow <simonmar at microsoft.com>
>   * No longer force -fvia-C for the RTS, it can now be compiled with the NCG

Lest the significance of this be lost, I'll spell out some of the 
ramifications.  This is an important step on the road to ridding GHC of 
its dependence on gcc.

It is now possible to have a port of GHC that runs registerised without 
the mangler.  Instead of porting the mangler, you implement a native 
code backend in GHC.  Up until now this wasn't possible, because the 
native code generator in GHC couldn't compile the RTS.  It's possible 
that we could drop mangler support from certain platforms (x86, x86_64, 
powerpc), and make our lives easier from a maintenance and reliability 
perspective.

In theory, we could remove gcc from the Windows distribution of GHC and 
most users would not be affected.  Of course, as soon as you want to 
compile some C code, or use hsc2hs, you need gcc.  Also we still need 
the GNU linker & assembler, and the gcc front end to those.

In theory it is now much easier to develop a "native" Windows port of 
GHC, i.e. one that uses Microsoft's assembler and linker instead of gcc 
and mingw.  All that is needed is a suitable pretty-printer for MASM 
syntax in the native backend, and presumably various modifications to 
the libraries to drop dependencies on mingw.  No doubt there are other 
changes required, but these are probably the main ones.  If anyone would 
like to take up this challenge, please let us know.

Cheers,
	Simon


More information about the Cvs-ghc mailing list