[Haskell-cafe] Re: Haskell on ARM (was Re: ANN: Topkata)

Braden Shepherdson Braden.Shepherdson at gmail.com
Wed Jul 16 20:32:50 EDT 2008


Simon Peyton-Jones wrote:
> | Linux Nokia-N810-42-19 2.6.21-omap1 #2 Fri Nov 16 16:24:58 EET 2007
> | armv6l unknown
> |
> | I would love a working GHC implementation on it, if for nothing else
> | than how awesome it would be. Whether that means using a C back-end or
> | native compilation doesn't matter to me so much.
> |
> | I might be one to attempt this, as I know C and ARM-ish asm decently
> | well and have a powerful desktop to compile on. I have no familiarity
> | with GHC internals, though. Lastly, I won't have anything like the time
> | to attempt this seriously until mid-September or so.
> 
> That's good.  John Dias is hard at work on GHC's back end, and we should be in reasonable shape by mid Sept.  Better still a month later...   Keep us posted with what you do.
> 
> Simon

Well, I've documented three attempts in detail on the ArmLinuxGhc Trac 
page[1]. In short, it doesn't work.

6.8 and 6.9 fail, expectedly, since bootstrapping is known to be 
broken[2]. 6.6 might be made to work, but it didn't work with moderate 
effort and so it seems foolish to invest that sort of energy into an old 
version when the back end is being overhauled.

As it appears that the task will be much easier after the back end 
changes, this project is effectively on hold until the 6.10 release. In 
particular, bootstrapping needs to work. There is a bug[2] about this 
with milestone set to 6.10.1. Hopefully a quick-and-dirty unregisterised 
  port will be easy after that, with registerised and possibly even 
native code-gen on the horizon.

One question that has come up is, what external tools does GHC need to 
build binaries on a given platform? When going via-c, is a complete C 
toolchain necessary? When doing native code-gen, are ld or ar required, 
or other binutils? If we magically had a 6.9 that would generate ARM 
binaries, what would it take to run binaries built in the dev 
environment on the device? Would it take more to run GHC itself on the 
device?



Braden Shepherdson
shepheb


[1] http://hackage.haskell.org/trac/ghc/wiki/ArmLinuxGhc
[2] http://hackage.haskell.org/trac/ghc/ticket/1346



More information about the Haskell-Cafe mailing list