Sun, 28 Apr 2002 19:10:35 +0200
>I see there is already working support for Darwin. What will have to be
>adjusted to get from powerpc-apple-darwin to powerpc-unknown-linux?
Well, the first step should be to build an "unregistered" version -
if there has ever been a working LinuxPPC port (I don't know about
any), this is easy. If not, you will need the intermediate .hc files
generated by a working version of GHC on some other platform. I don't
know how to do this, but there are people on this list who know more.
Basic unregistered support should be "relatively easy" to get to
work, as LinuxPPC should not be too different from Linux/i386.
Other things that [might] require porting are:
createAdjustor: the implementation for foreign export dynamic. The
Darwin/MacOS X implementation might work unchanged, that is, if
LinuxPPC uses the same calling conventions.
At this point we would have a fully functional haskell compiler that
generates slow-running binaries.
ghc-mangle: A hideous Perl script that does really bad things to
assembly code in order to make it run faster :-). While I don't think
that we can use the same code for Darwin and LinuxPPC, a lot of what
I found out for the Darwin port can also be applied to Linux, so I'll
be happy to share information.
ghc-split: A smaller, but still evil Perl script that splits one
assembly language file into many. This is not required, but it can
make compiled programs smaller (unless I've misunderstood something).
I haven't yet ported this for Darwin, as Apple's strange dynamic
Linker makes things difficult. A port for LinuxPPC might be easier.
ghci: I think this requires a) a dynamic loader, and b) some haskell
code to generate a few instructions of PPC machine language.
There is already an ELF loader for x86, and b) is easy compared to a), IMHO.
native code generator: not necessary except for improving compilation
speed. A lot of work, but the same code can be used for Linux and
Darwin. However, I don't think it is really worth the time...
These are all parts that I know about. Building an unregistered
version is most important, but I don't know enough to help with that.