3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #166571 from hercules-ci/ghc902-backport-compact-unwind

[haskell-updates] ghc: Backport compact unwind support
This commit is contained in:
sternenseemann 2022-04-03 14:21:15 +02:00 committed by GitHub
commit 038d0d86e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 62 additions and 2 deletions

View file

@ -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.

View file

@ -287,8 +287,6 @@ self: super: ({
# https://github.com/fpco/unliftio/issues/87
unliftio = dontCheck super.unliftio;
# https://github.com/fpco/inline-c/issues/127
inline-c-cpp = dontCheck super.inline-c-cpp;
# https://github.com/haskell-crypto/cryptonite/issues/360
cryptonite = appendPatch ./patches/cryptonite-remove-argon2.patch super.cryptonite;

View file

@ -2,6 +2,10 @@
with haskellLib;
let
inherit (pkgs.stdenv.hostPlatform) isDarwin;
in
self: super: {
llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
@ -121,4 +125,7 @@ self: super: {
] super.mysql-simple;
taffybar = markUnbroken (doDistribute super.taffybar);
# https://github.com/fpco/inline-c/issues/127 (recommend to upgrade to Nixpkgs GHC >=9.0)
inline-c-cpp = (if isDarwin then dontCheck else x: x) super.inline-c-cpp;
}

View file

@ -2,6 +2,10 @@
with haskellLib;
let
inherit (pkgs.stdenv.hostPlatform) isDarwin;
in
self: super: {
llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
@ -104,4 +108,6 @@ self: super: {
mime-string = disableOptimization super.mime-string;
# https://github.com/fpco/inline-c/issues/127 (recommend to upgrade to Nixpkgs GHC >=9.0)
inline-c-cpp = (if isDarwin then dontCheck else x: x) super.inline-c-cpp;
}

View file

@ -2,6 +2,10 @@
with haskellLib;
let
inherit (pkgs.stdenv.hostPlatform) isDarwin;
in
self: super: {
llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
@ -150,4 +154,7 @@ self: super: {
mysql-simple = addBuildDepends [
self.blaze-textual
] super.mysql-simple;
# https://github.com/fpco/inline-c/issues/127 (recommend to upgrade to Nixpkgs GHC >=9.0)
inline-c-cpp = (if isDarwin then dontCheck else x: x) super.inline-c-cpp;
}

View file

@ -2,6 +2,10 @@
with haskellLib;
let
inherit (pkgs.stdenv.hostPlatform) isDarwin;
in
self: super: {
llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
@ -118,4 +122,10 @@ self: super: {
multistate = doJailbreak super.multistate;
# https://github.com/lspitzner/butcher/issues/7
butcher = doJailbreak super.butcher;
# We use a GHC patch to support the fix for https://github.com/fpco/inline-c/issues/127
# which means that the upstream cabal file isn't allowed to add the flag.
inline-c-cpp =
(if isDarwin then appendConfigureFlags ["--ghc-option=-fcompact-unwind"] else x: x)
super.inline-c-cpp;
}

View file

@ -2,6 +2,10 @@
with haskellLib;
let
inherit (pkgs.stdenv.hostPlatform) isDarwin;
in
self: super: {
llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
@ -236,4 +240,9 @@ self: super: {
hls-retrie-plugin = null;
hls-splice-plugin = null;
}));
# https://github.com/fpco/inline-c/pull/131
inline-c-cpp =
(if isDarwin then appendConfigureFlags ["--ghc-option=-fcompact-unwind"] else x: x)
super.inline-c-cpp;
}

View file

@ -9,6 +9,10 @@
with haskellLib;
let
inherit (pkgs.stdenv.hostPlatform) isDarwin;
in
self: super: {
llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
@ -74,4 +78,9 @@ self: super: {
# Break out of "yaml >=0.10.4.0 && <0.11": https://github.com/commercialhaskell/stack/issues/4485
stack = doJailbreak super.stack;
# https://github.com/fpco/inline-c/pull/131
# and/or https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7739
inline-c-cpp =
(if isDarwin then appendConfigureFlags ["--ghc-option=-fcompact-unwind"] else x: x)
super.inline-c-cpp;
}

View file

@ -327,6 +327,8 @@ package-maintainers:
- hercules-ci-cli
- hercules-ci-cnix-expr
- hercules-ci-cnix-store
- inline-c
- inline-c-cpp
rvl:
- taffybar
- arbtt