nixpkgs/pkgs/development/compilers/ghc
sternenseemann 0cac1f100d haskell.compiler.*: don't declare stage0 ghc as dep to stdenv
Some GHC bindists have a normal `$out/lib` directory which contains
symlinks to all core libs. Because it is a normal lib directory, the
bintools setup hook will pick up on it and cause ld to pass the
appropriate -L and -rpath flags. We do not want this to happen,
especially in the case of the stage2 compiler. Not only will the final
ghc have an unnecessary reference (and thus increased closure size) to
the binary ghc, but the extra libraries in the rpath mess with the rts
and cause e.g. segfaults in GHCi.

Unfortunately, there is no way to prevent this. It is a fundamental flaw
in the cc and bintools wrappers that they do not actually distinguish
between the roles of dependencies (build, host, target). Instead
the mangleVar* function will translate the dependencies split up by
roles into platforms. This means that the wrappers can't distinguish
between depsBuildBuild and depsHostTarget (== buildInputs) when natively
compiling. As long as we are natively compiling the wrappers will put
the stage0 ghc (be it in depsBuildBuild, nativeBuildInputs etc.) into
the linker flags of the final ghc.

The solution is to sidestep the issue. We just had ghc in depsBuildBuild
to have it added to PATH. GHC itself will pass the appropriate linker
flags if necessary. To avoid the setup hooks picking up on the GHC
libraries we just don't put it into depsBuildBuild or any other
dependency list. Since the GHC build system accepts the GHC binary via
an absolute path, we don't even need to add the stage0 GHC to PATH.
2024-09-23 18:44:43 +02:00
..
8.6.5-binary.nix haskell.compiler.ghc8102Binary: remove at 8.10.2 2024-01-25 15:20:35 +01:00
8.10.7-binary.nix haskell.compiler.ghc8107Binary: fix invalid code signatures on aarch64-darwin 2024-07-27 22:55:17 -04:00
8.10.7.nix haskell.compiler.*: don't declare stage0 ghc as dep to stdenv 2024-09-23 18:44:43 +02:00
9.0.2.nix haskell.compiler: port all make/native-bignum GHCs to common expr 2024-05-16 15:47:56 +02:00
9.2.4-binary.nix treewide: Remove the definite article from meta.description 2024-06-09 23:08:46 +02:00
9.2.5.nix haskell.compiler: port all make/native-bignum GHCs to common expr 2024-05-16 15:47:56 +02:00
9.2.6.nix haskell.compiler: port all make/native-bignum GHCs to common expr 2024-05-16 15:47:56 +02:00
9.2.7.nix haskell.compiler: port all make/native-bignum GHCs to common expr 2024-05-16 15:47:56 +02:00
9.2.8.nix haskell.compiler: port all make/native-bignum GHCs to common expr 2024-05-16 15:47:56 +02:00
9.4.5.nix haskell.compiler: port all make/native-bignum GHCs to common expr 2024-05-16 15:47:56 +02:00
9.4.6-bytestring-posix-source.patch
9.4.6.nix haskell.compiler: port all make/native-bignum GHCs to common expr 2024-05-16 15:47:56 +02:00
9.4.7.nix haskell.compiler: port all make/native-bignum GHCs to common expr 2024-05-16 15:47:56 +02:00
9.4.8.nix haskell.compiler.ghc948: fix expression file name 2024-06-13 00:00:53 +02:00
9.6.3-binary.nix Revert "haskell.compiler.{ghc98*,ghcHEAD}: bootstrap using source built 9.6" 2024-07-28 09:09:01 -04:00
9.6.3.nix haskell.compiler.ghc96: 9.6.2 -> 9.6.3 2023-09-28 15:28:23 +02:00
9.6.4.nix haskell.compiler.ghc96: 9.6.3 -> 9.6.4 2024-01-23 21:05:01 +01:00
9.6.5.nix haskell.compiler.ghc965: init at 9.6.5 2024-04-16 20:07:28 +02:00
9.6.6.nix haskell.compiler.ghc966: init at 9.6.6 2024-07-08 12:29:42 +02:00
9.8.1.nix haskell.compiler.ghc98: init at 9.8.1 2023-10-15 00:43:20 +02:00
9.8.2.nix ghc: add new compiler version 9.8.2 2024-02-26 10:37:33 +01:00
9.10.1.nix haskell.compiler.ghc910: init at 9.10.1 2024-05-13 12:22:46 +02:00
Cabal-3.2-3.4-paths-fix-cycle-aarch64-darwin.patch
Cabal-3.12-paths-fix-cycle-aarch64-darwin.patch haskell.packages.ghc910: work around aarch64-darwin output cycles 2024-05-31 21:23:09 +02:00
Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch haskell.packages.ghc9{6,8}: work around aarch64-darwin output cycles 2023-12-13 00:16:18 +01:00
common-hadrian.nix haskell.compiler.*: don't declare stage0 ghc as dep to stdenv 2024-09-23 18:44:43 +02:00
common-make-native-bignum.nix haskell.compiler.*: don't declare stage0 ghc as dep to stdenv 2024-09-23 18:44:43 +02:00
docs-sphinx-7-ghc98.patch ghc*: patch build of docs after sphinx update 2023-10-28 12:50:03 +02:00
docs-sphinx-7.patch ghc*: patch build of docs after sphinx update 2023-10-28 12:50:03 +02:00
gcc-clang-wrapper.sh
head.nix haskell.compiler.ghcHEAD: 9.11.20240323 -> 9.11.20240410 2024-04-11 21:15:53 +02:00
respect-ar-path.patch