slyfox      14/07/30 11:47:32

  Added:                ghc-7.8.3-prim-lm.patch
  Log:
  Fix underlinking of ghc-prim. Workarounds ghc-stage2 ld.so SIGSEGV on 
hardened (reported by aranea).
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
611FF3AA)

Revision  Changes    Path
1.1                  dev-lang/ghc/files/ghc-7.8.3-prim-lm.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.8.3-prim-lm.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.8.3-prim-lm.patch?rev=1.1&content-type=text/plain

Index: ghc-7.8.3-prim-lm.patch
===================================================================
Fix underlinking on ghc-prim.
Fixes ghc-stage2 crahs on hardened toolchain.
Reported-by: aranea
diff --git a/libraries/ghc-prim/ghc-prim.cabal 
b/libraries/ghc-prim/ghc-prim.cabal
index ffb32af..0431380 100644
--- a/libraries/ghc-prim/ghc-prim.cabal
+++ b/libraries/ghc-prim/ghc-prim.cabal
@@ -65,3 +65,7 @@ Library
     -- We need to set the package name to ghc-prim (without a version number)
     -- as it's magic.
     ghc-options: -package-name ghc-prim
+
+    -- ghc 'sin' (and other) primops generate 'libm' calls,
+    -- but ghc itself does not add '-lm'
+    extra-libraries: m




Reply via email to