The GHC 7.8.4 debian package now builds on arm

Joachim Breitner mail at
Tue Dec 9 10:06:00 UTC 2014

[Fixing the subject, it hasn’t been about LLVM for a while]


with the help of Ben I managed to create a GHC 7.8.4-rc1 Debian package
that builds on arm and armhf.

I had to apply a few patches from GHC HEAD, which I hope can enter
7.8.4. (I’ve marked their tickets as "merge" in trac.)

Additionally, I had to fix something related to the pre-ARMv6 spinlock

Finally, I had to find a reliable way to make ghc (and only ghc!) pass
the flags to gcc to make it use the gold linker, but I don’t know if my
approach is sensible. See
I have a patch that seems to work here:
but I’d rather avoid using non-blessed patches in the Debian package.

If using the gold linker is a requirement on armel, maybe that should
also be handled in upstream? The patch is rather simple:

Index: ghc-
--- ghc-	2014-12-08 18:49:28.207171714 +0100
+++ ghc-	2014-12-08 19:03:06.815522917 +0100
@@ -553,6 +553,10 @@
         $3="$$3 -D_HPUX_SOURCE"
         $5="$$5 -D_HPUX_SOURCE"
+    arm*)
+        # On arm, link using gold
+        $3="$$3 -fuse-ld=gold"
+        ;;
     # If gcc knows about the stack protector, turn it off.


Joachim “nomeata” Breitner
  mail at joachim-breitner.de
  Jabber: nomeata at  • GPG-Key: 0xF0FBF51F
  Debian Developer: nomeata at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the ghc-devs mailing list