From 76be6eaf29de81e7cdbad268e8f90106dcf021b5 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 31 Mar 2022 13:48:17 +0200 Subject: haskell.compiler.ghc902: Backport -fcompact-unwind --- pkgs/development/compilers/ghc/9.0.2.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pkgs/development/compilers/ghc/9.0.2.nix') diff --git a/pkgs/development/compilers/ghc/9.0.2.nix b/pkgs/development/compilers/ghc/9.0.2.nix index 04e29ed6686..0968b853992 100644 --- a/pkgs/development/compilers/ghc/9.0.2.nix +++ b/pkgs/development/compilers/ghc/9.0.2.nix @@ -5,6 +5,7 @@ , autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx, xattr , autoSignDarwinBinariesHook , bash +, fetchpatch , libiconv ? null, ncurses , glibcLocales ? null @@ -182,6 +183,17 @@ stdenv.mkDerivation (rec { outputs = [ "out" "doc" ]; + patches = [ + # Add flag that fixes C++ exception handling; opt-in. Merged in 9.4 and 9.2.2. + # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7423 + (fetchpatch { + name = "ghc-9.0.2-fcompact-unwind.patch"; + # Note that the test suite is not packaged. + url = "https://gitlab.haskell.org/ghc/ghc/-/commit/c6132c782d974a7701e7f6447bdcd2bf6db4299a.patch?merge_request_iid=7423"; + sha256 = "sha256-b4feGZIaKDj/UKjWTNY6/jH4s2iate0wAgMxG3rAbZI="; + }) + ]; + postPatch = "patchShebangs ."; # GHC needs the locale configured during the Haddock phase. -- cgit 1.4.1