diff --git a/pkgs/development/compilers/ghc/7.8.4.nix b/pkgs/development/compilers/ghc/7.8.4.nix index 5497b35ec1db..4323341dc4a4 100644 --- a/pkgs/development/compilers/ghc/7.8.4.nix +++ b/pkgs/development/compilers/ghc/7.8.4.nix @@ -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 ]; +}) diff --git a/pkgs/development/compilers/ghc/hpc-7.8.4.patch b/pkgs/development/compilers/ghc/hpc-7.8.4.patch new file mode 100644 index 000000000000..212989200bc5 --- /dev/null +++ b/pkgs/development/compilers/ghc/hpc-7.8.4.patch @@ -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