Making GHC work on BSD

Quoth Simon Peyton-Jones <simonpj at microsoft.com>:
| Dear BDS hackers
...
| So this message is to say: if you'd like GHC on BSD, please help! No help
| probably means no GHC. Time is short before GHC 6.10.
...
| There's also one NetBSD-specific ticket:
|| 2351 NetBSD defines ELF_ST_TYPE
In case I didn't express myself very well when I posted that ticket -
the ideal fix should be to replace the FreeBSD-specific support in the
amd64 case, with the non-platorm-specific logic that 6.8.3 has for the
i386 case. There is no need for attention from a NetBSD expert.
| ... and one that I think applies to all the *BSDs:
|| 2063 Breackage on OpenBSD due to mmap remap
|| (actually the latter one is a top priority, because without it GHCi can't
| work, so we need it fixed for 6.10.1).
Is this a change from 6.8.3? NetBSD currently provides 6.8.3 as an
optional package for NetBSD/i386 4.0, with ghci included and without
any mmap patches as far as I know. It was also working for me on
NetBSD/amd64 (which is the platform that would actually need MAP_32BIT?)
NetBSD does require a number of other patches to build correctly -
I count 18, the bulk of which relate to 1) finding readline when
it isn't in a path automatically searched by the compiler, and
2) NetBSD renamed system functions. (They also include the above
mentioned ELF_ST_TYPE patch.) These patches are applied by the
NetBSD package maintainer, but are also available separately
through the package system.
Donn Cave, donn at avvanta.com