patch GHC 7.8.4 on darwin to fix template haskell + hpc

This commit is contained in:
Joel Taylor 2015-05-17 14:30:57 -07:00
parent f3162d6d4f
commit c714842d9f
2 changed files with 18 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, ghc, perl, gmp, ncurses, libiconv }:
stdenv.mkDerivation rec {
stdenv.mkDerivation (rec {
version = "7.8.4";
name = "ghc-${version}";
@ -45,4 +45,7 @@ stdenv.mkDerivation rec {
inherit (ghc.meta) license platforms;
};
}
} // stdenv.lib.optionalAttrs stdenv.isDarwin {
# https://ghc.haskell.org/trac/ghc/ticket/9762
patches = [ ./hpc-7.8.4.patch ];
})

View File

@ -0,0 +1,13 @@
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
index 991fc57..0aad221 100644
--- a/compiler/cmm/CLabel.hs
+++ b/compiler/cmm/CLabel.hs
@@ -877,7 +877,7 @@ labelDynamic dflags this_pkg this_mod lbl =
PlainModuleInitLabel m -> not (gopt Opt_Static dflags) && this_pkg /= (modulePackageId m)
- HpcTicksLabel m -> not (gopt Opt_Static dflags) && this_pkg /= (modulePackageId m)
+ HpcTicksLabel m -> not (gopt Opt_Static dflags) && this_mod /= m
-- Note that DynamicLinkerLabels do NOT require dynamic linking themselves.
_ -> False