nixpkgs/pkgs/development
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
..
ada-modules
androidndk-pkgs
beam-modules
bower-modules/generic
chez-modules
compilers haskell.compiler.*: don't declare stage0 ghc as dep to stdenv 2024-09-23 18:44:43 +02:00
coq-modules
cuda-modules
dhall-modules
em-modules/generic
embedded
emilua-plugins
gnuradio-modules
guile-modules
hare-third-party
haskell-modules haskellPackages.gi-gtk: Re-enable parallel building 2024-09-23 11:36:24 +02:00
idris-modules
interpreters
java-modules
julia-modules
libraries mongoc: 1.27.6 -> 1.28.0 (#342953) 2024-09-22 20:40:31 +04:00
lisp-modules
lua-modules
misc
mobile
node-packages
ocaml-modules
octave-modules
perl-modules
php-packages
python2-modules
python-modules python312Packages.pydy: drop nose dependency (#336241) 2024-09-22 22:57:18 +01:00
r-modules
rocm-modules
ruby-modules
scheme-modules/scheme-bytestructures
skaware-packages
tools Merge master into haskell-updates 2024-09-23 00:16:29 +00:00
web