Revert "haskell.compiler.ghc981: build stage 2 compiler for “native cross”"

This reverts commit 1dc7345389.

Reason for revert: The change doesn't work as in intended, i.e. hadrian
refuses to build a Stage2 compiler as requested in the “native cross”
case. Thus the canExecute condition only served to confuse
This commit is contained in:
sternenseemann
2025-08-12 19:33:12 +02:00
parent 09d584eab5
commit 906105ed78
@@ -132,10 +132,12 @@
-- no way to set this via the command line
finalStage :: Stage
finalStage = ${
# Always build the stage 2 compiler if possible.
# TODO(@sternensemann): unify condition with make-built GHCs
if stdenv.hostPlatform.canExecute stdenv.targetPlatform then
"Stage2" # native compiler or “native” cross e.g. pkgsStatic
# N. B. hadrian ignores this setting if it doesn't agree it's possible,
# i.e. when its cross-compiling setting is true. So while we could, in theory,
# build Stage2 if hostPlatform.canExecute targetPlatform, hadrian won't play
# ball (with make, Stage2 was built if hostPlatform.system == targetPlatform.system).
if stdenv.hostPlatform == stdenv.targetPlatform then
"Stage2" # native compiler
else
"Stage1" # cross compiler
}