It takes quite some time…

Indeed, it takes quite some time to build unregisterised build of GHC on ARM machine. But let’s start from the beginning. I’ve been always quite ignorant to major computer architecture x86. To be honest this is probably caused by my laziness to read more about it since my university studies where I’ve been hit by all those segments, chaotic memory model and such. I must admit that AMD did really good job on AMD64, finally flat address space, 64 bit etc, but yet the platform is so boring, running everywhere… 🙂

So what’s more interesting to me are all those other platforms: PowerPC, MIPS, ARM, IA64, etc, etc. Generally speaking I quite like load-store CPU model and since last year I’ve more focused my attention to IA64 and ARM. IA64 since this is quite interesting from the assembler point of view and to ARM, since this is x86 world conqueror and my bet is that’s also future architectural winner. So ARM. I’m its user for more than five years … running it in my mobile phone, but I’m still more and more curious to learn a little bit more about this architecture and somehow connect this to my still to be performed Haskell learning — as Haskell is another project which makes me wonder what will be its outcome. Quite interesting language indeed. So Haskell and ARM, that’s it. From Haskell I’ve chosen GHC as it seems to be most spread around the community, although to be honest this is not the most easy choice if I consider ARM architecture. Anyway, the project evolves quickly and man is even able to perform unregisterised (read: build which produces not so fast binaries) build of GHC on ARM machine. I did this from time to time on GCC’s compile farm EfikaMX hosts, but still was considering to buy my own machine for better GHC/ARM hacking which I hope this blog will be about.
Anyway, big thanks to Freescale and big thanks to my friend working for Freescale who lend me nice i.MX53 Quick Start Board. I’m now able to start actual “local” tests and even hacks as time permits.

I’ve installed Freescale recommended Ubuntu/Debian based distro, installed provided GHC 6.12.1 and was able to build unregisterised build of GHC 7.0.3. I’ve used following mk/ file to perform the build just to save the time I’ve disabled profiling libs which I don’t need. I need GHC 7.0.3 just to be better prepared to build GHC HEAD.


And finally I got back to the post title, funny thing is, it took 16 hours 30 minutes to perform this build! Interesting is that what I observed from top, it looks as majority of time was spent in C compiler which makes a hope that perhaps future GHC with either LLVM or NCG ARM support might run quite faster… Err, if you wonder, I don’t hold build tree on (micro)SD card nor SATA drive nor USB flash connected to the i.MX53 board. I use NFS to mount some space from my main Solaris workstation to the board. This certainly causes some slowness, but not so big, believe me and I rather trust ZFS on mirrored drives than any consumer flash storage on the board.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s