Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GHC loadArchive clang++ error on macOS #149942

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkgs/development/compilers/ghc/8.10.7.nix
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ stdenv.mkDerivation (rec {
# cabal passes incorrect --host= when cross-compiling
# https://github.com/haskell/cabal/issues/5887
(fetchpatch {
url = "https://raw.githubusercontent.com/input-output-hk/haskell.nix/122bd81150386867da07fdc9ad5096db6719545a/overlays/patches/ghc/cabal-host.patch";
url = "https://raw.githubusercontent.com/input-output-hk/haskell.nix/122bd81150386867da07fdc9ad5096db6719545a/overlays/patches/ghc/cabal-host.patch";
sha256 = "sha256:0yd0sajgi24sc1w5m55lkg2lp6kfkgpp3lgija2c8y3cmkwfpdc1";
})

Expand All @@ -212,6 +212,11 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/97d0b0a367e4c6a52a17c3299439ac7de129da24.patch";
sha256 = "0r4zjj0bv1x1m2dgxp3adsf2xkr94fjnyj1igsivd9ilbs5ja0b5";
})
# Reverts the linking behavior of GHC to not resolve `-libc++` to `c++`.
(fetchpatch {
url = "https://raw.githubusercontent.com/input-output-hk/haskell.nix/613ec38dbd62ab7929178c9c7ffff71df9bb86be/overlays/patches/ghc/ghc-macOS-loadArchive-fix.patch";
sha256 = "0IUpuzjZb1G+gP3q6RnwQbW4mFzc/OZ/7QqZy+57kx0=";
})
];

postPatch = "patchShebangs .";
Expand Down
8 changes: 7 additions & 1 deletion pkgs/development/compilers/ghc/8.8.4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ stdenv.mkDerivation (rec {
# cabal passes incorrect --host= when cross-compiling
# https://github.com/haskell/cabal/issues/5887
(fetchpatch {
url = "https://raw.githubusercontent.com/input-output-hk/haskell.nix/122bd81150386867da07fdc9ad5096db6719545a/overlays/patches/ghc/cabal-host.patch";
url = "https://raw.githubusercontent.com/input-output-hk/haskell.nix/122bd81150386867da07fdc9ad5096db6719545a/overlays/patches/ghc/cabal-host.patch";
sha256 = "sha256:0yd0sajgi24sc1w5m55lkg2lp6kfkgpp3lgija2c8y3cmkwfpdc1";
})

Expand All @@ -195,6 +195,12 @@ stdenv.mkDerivation (rec {
# Renamed to match ghc8.8:
# https://gitlab.haskell.org/ghc/ghc/-/commit/4b431f334018eaef2cf36de3316025c68c922915#20d64c0bdc272817149d1d5cf20a73a8b5fd637f
./rename-numa-api-call.patch
] ++ lib.optionals stdenv.isDarwin [
# Reverts the linking behavior of GHC to not resolve `-libc++` to `c++`.
(fetchpatch {
url = "https://raw.githubusercontent.com/input-output-hk/haskell.nix/613ec38dbd62ab7929178c9c7ffff71df9bb86be/overlays/patches/ghc/ghc-macOS-loadArchive-fix.patch";
sha256 = "0IUpuzjZb1G+gP3q6RnwQbW4mFzc/OZ/7QqZy+57kx0=";
})
];

postPatch = "patchShebangs .";
Expand Down
11 changes: 10 additions & 1 deletion pkgs/development/compilers/ghc/9.0.1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# build-tools
, bootPkgs
, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx
, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
, autoSignDarwinBinariesHook
, bash

Expand Down Expand Up @@ -177,6 +177,15 @@ stdenv.mkDerivation (rec {

outputs = [ "out" "doc" ];

patches = [
] ++ lib.optionals stdenv.isDarwin [
# Reverts the linking behavior of GHC to not resolve `-libc++` to `c++`.
(fetchpatch {
url = "https://raw.githubusercontent.com/input-output-hk/haskell.nix/613ec38dbd62ab7929178c9c7ffff71df9bb86be/overlays/patches/ghc/ghc-macOS-loadArchive-fix.patch";
sha256 = "0IUpuzjZb1G+gP3q6RnwQbW4mFzc/OZ/7QqZy+57kx0=";
})
];

postPatch = "patchShebangs .";

# GHC needs the locale configured during the Haddock phase.
Expand Down
9 changes: 9 additions & 0 deletions pkgs/development/compilers/ghc/9.2.1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,15 @@ stdenv.mkDerivation (rec {

outputs = [ "out" "doc" ];

patches = [
] ++ lib.optionals stdenv.isDarwin [
# Reverts the linking behavior of GHC to not resolve `-libc++` to `c++`.
(fetchpatch {
url = "https://raw.githubusercontent.com/input-output-hk/haskell.nix/613ec38dbd62ab7929178c9c7ffff71df9bb86be/overlays/patches/ghc/ghc-macOS-loadArchive-fix.patch";
sha256 = "0IUpuzjZb1G+gP3q6RnwQbW4mFzc/OZ/7QqZy+57kx0=";
})
];

postPatch = "patchShebangs .";

# GHC needs the locale configured during the Haddock phase.
Expand Down