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

Joachim Breitner nomeata at debian.org
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"
+        ;;
     esac
 
     # 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
http://wiki.debian.org/ToolChain/DSOLinking seems to give some reasons,
and the author of the patch, Matthias Klose, is CCed.

Greetings,
Joachim

¹ http://patches.ubuntu.com/g/ghc/ghc_7.0.4-8ubuntu1.patch
² http://lists.debian.org/debian-haskell/2011/10/msg00066.html

-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata at debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata at joachim-breitner.de | http://people.debian.org/~nomeata
-------------- 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: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20111031/e2a613f9/attachment.pgp>


More information about the Glasgow-haskell-users mailing list