summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/httpserver
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2024-09-23 16:18:13 +0200
committersternenseemann <sternenseemann@systemli.org>2024-09-23 18:44:43 +0200
commit0cac1f100d430a58733616e9fbe7010374b05112 (patch)
tree652059e495af26e141d2c85115cd231be68afc42 /pkgs/development/python-modules/httpserver
parent931fd13dd21ddb2940887709664e85908c47f533 (diff)
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.
Diffstat (limited to 'pkgs/development/python-modules/httpserver')
0 files changed, 0 insertions, 0 deletions