Linker flags --hash-style=both --no-copy-dt-needed-entries --as-needed

Joachim Breitner nomeata at
Mon Oct 31 22:46:36 CET 2011

Dear GHC team,

Ubuntu applies the following patch to the ghc package¹:

diff -pruN 7.0.4-8/aclocal.m4 7.0.4-8ubuntu1/aclocal.m4
--- 7.0.4-8/aclocal.m4	2011-10-31 16:22:09.000000000 +0000
+++ 7.0.4-8ubuntu1/aclocal.m4	2011-10-31 16:22:20.000000000 +0000
@@ -109,6 +109,10 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
         $4="$$4 -arch x86_64"
         $5="$$5 -m64"
+    *-linux*)
+        $3="$$3 -Wl,--hash-style=both,--no-copy-dt-needed-entries,--as-needed"
+        $4="$$4 --hash-style=both --no-copy-dt-needed-entries --as-needed"
+        ;;
     # If gcc knows about the stack protector, turn it off.

and it was requested² that this should be done in Debian as well. I
generally feel uneasy diverging from upstream, as it could make
debugging harder, so I’m contacting you first whether you might be
interested in applying the change to ghc proper.

I did not dig deep into the reason behind the patch, but seems to give some reasons,
and the author of the patch, Matthias Klose, is CCed.



Joachim "nomeata" Breitner
Debian Developer
  nomeata at | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata at |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the Glasgow-haskell-users mailing list