GHC on Arm

John Goerzen jgoerzen at complete.org
Tue Jan 25 09:32:53 EST 2005


On Mon, Jan 24, 2005 at 05:03:47PM -0700, Seth Kurtzberg wrote:
> I recently did a port of linux to ARM, and the floating point issue came up.

Thank you for the detailed reply, Seth.  I've been discussing this with
Ian Lynagh, who maintains ghc for Debian, and has encountered trouble
before.

Presently, we do not have a working ARM ghc package, so my first
priority is basic floating point support, even if it is slow.

[ snip ]

> If your issue is floating point functionality rather than floating point 
> performance, the standard gcc build and linux software emulation of 
> floating point hardware works fine.  You only need to do the more 

Ian told me that the standard build would die with errors relatnig to
decodeFloat.  He's also written up a little illustration that ARM's
internal floating point representation is different than on other
platforms.

On Debian, our standard procedure appears to be, from what I can tell,
using the kernel trap for floating point.  Also, from what I understand
from gcc docs, if the software library is to be used instead, the entire
system must be recompiled starting with libc.  It seems that you have
found a way around that...  correct?  We can't really rebuild the entire
system, but it sounds like the library is the way to go.

My own efforts are complicated a bit because my only piece of ARM
hardware is my Zaurus PDA.  It's powerful enough to run binaries that
GHC builds, or even GHC itself in some instances, but not powerful
enough to build GHC.  So I have to rely on various other ARM machines,
where I have little control over the kernel or libc environment.

In any case, your build instructions and/or code would be most helpful.
Also, if you happen to have ghc binaries ready-made on ARM, that would
speed up my porting work, of course :-)

Thanks again for your help.

-- John



More information about the Glasgow-haskell-users mailing list