haskell.compiler.ghc*: don't configure --host

This commit is contained in:
Alex Tunstall 2023-07-23 09:56:56 +01:00 committed by sternenseemann
parent 1261fe024f
commit d5f666f593
2 changed files with 10 additions and 4 deletions

View File

@ -368,9 +368,12 @@ stdenv.mkDerivation (rec {
done
'';
# Although it is usually correct to pass --host, we don't do that here because
# GHC's usage of build, host, and target is non-standard.
# See https://gitlab.haskell.org/ghc/ghc/-/wikis/building/cross-compiling
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ]
++ lib.optional (targetPlatform != hostPlatform) "target";
configurePlatforms = [ "build" ]
++ lib.optional (buildPlatform != hostPlatform || targetPlatform != hostPlatform) "target";
# `--with` flags for libraries needed for RTS linker
configureFlags = [

View File

@ -379,9 +379,12 @@ stdenv.mkDerivation (rec {
'MinBootGhcVersion="8.10"'
'';
# Although it is usually correct to pass --host, we don't do that here because
# GHC's usage of build, host, and target is non-standard.
# See https://gitlab.haskell.org/ghc/ghc/-/wikis/building/cross-compiling
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ]
++ lib.optional (targetPlatform != hostPlatform) "target";
configurePlatforms = [ "build" ]
++ lib.optional (buildPlatform != hostPlatform || targetPlatform != hostPlatform) "target";
# `--with` flags for libraries needed for RTS linker
configureFlags = [