The GHC 7.8.4 debian package now builds on arm

Joachim Breitner mail at joachim-breitner.de
Tue Dec 9 10:06:00 UTC 2014


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


Hi,

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
implementation:
https://phabricator.haskell.org/D564

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 http://ghc.haskell.org/trac/ghc/ticket/9873
I have a patch that seems to work here:
https://ghc.haskell.org/trac/ghc/attachment/ticket/9873/saner-linker-opt-handling.patch
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-7.8.3.20141119/aclocal.m4
===================================================================
--- ghc-7.8.3.20141119.orig/aclocal.m4	2014-12-08 18:49:28.207171714 +0100
+++ ghc-7.8.3.20141119/aclocal.m4	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"
+        ;;
     esac
 
     # If gcc knows about the stack protector, turn it off.


Greetings,
Joachim




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

-------------- 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: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141209/0551f947/attachment-0001.sig>


More information about the ghc-devs mailing list