Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FINAL at Glasgow Haskell Compiler / GHC
Commits:
-
b788c97c
by Sven Tennie at 2026-01-18T17:52:31+01:00
-
e88a442d
by Sven Tennie at 2026-01-18T17:52:31+01:00
-
408de4a2
by Sven Tennie at 2026-01-18T17:52:31+01:00
-
3b6f72a7
by Sven Tennie at 2026-01-18T18:19:29+01:00
5 changed files:
- hadrian/src/Builder.hs
- hadrian/src/Hadrian/Oracles/TextFile.hs
- hadrian/src/Oracles/Setting.hs
- libraries/base/tests/IO/all.T
- m4/fp_find_nm.m4
Changes:
| ... | ... | @@ -228,10 +228,10 @@ instance H.Builder Builder where |
| 228 | 228 | -- changes (#18001).
|
| 229 | 229 | _bootGhcVersion <- setting GhcVersion
|
| 230 | 230 | pure []
|
| 231 | - Ghc _ _ -> do
|
|
| 231 | + Ghc _ stage -> do
|
|
| 232 | 232 | root <- buildRoot
|
| 233 | 233 | unlitPath <- builderPath Unlit
|
| 234 | - distro_mingw <- lookupSystemConfig "settings-use-distro-mingw"
|
|
| 234 | + distro_mingw <- lookupStageBuildConfig "settings-use-distro-mingw" stage
|
|
| 235 | 235 | |
| 236 | 236 | return $ [ unlitPath ]
|
| 237 | 237 | ++ [ root -/- mingwStamp | windowsHost, distro_mingw == "NO" ]
|
| ... | ... | @@ -125,18 +125,7 @@ getBuildTarget = getTargetConfig buildTargetFile |
| 125 | 125 | |
| 126 | 126 | -- | Get the host target configuration through 'getTargetConfig'
|
| 127 | 127 | getHostTarget :: Action Toolchain.Target
|
| 128 | -getHostTarget = do
|
|
| 129 | - -- MP: If we are not cross compiling then we should use the target file in order to
|
|
| 130 | - -- build things for the host, in particular we want to use the configured values for the
|
|
| 131 | - -- target for building the RTS (ie are we using Libffi for adjustors, and the wordsize)
|
|
| 132 | - -- TODO: Use "flag CrossCompiling"
|
|
| 133 | - ht <- getTargetConfig hostTargetFile
|
|
| 134 | - tt <- getTargetConfig targetTargetFile
|
|
| 135 | - if (Toolchain.targetPlatformTriple ht) == (Toolchain.targetPlatformTriple tt)
|
|
| 136 | - then return tt
|
|
| 137 | - else return ht
|
|
| 138 | - -- where
|
|
| 139 | - -- msg = "The host's target configuration file " ++ quote hostTargetFile ++ " does not exist! ghc-toolchain might have failed to generate it."
|
|
| 128 | +getHostTarget = getTargetConfig hostTargetFile
|
|
| 140 | 129 | |
| 141 | 130 | -- | Get the target target configuration through 'getTargetConfig'
|
| 142 | 131 | getTargetTarget :: Action Toolchain.Target
|
| ... | ... | @@ -236,7 +236,17 @@ libsuf st way |
| 236 | 236 | -- For example, we want to build RTS with stage1 for the host target as we
|
| 237 | 237 | -- produce a host executable with stage1 (which cross-compiles to stage2).
|
| 238 | 238 | targetStage :: Stage -> Action Target
|
| 239 | -targetStage stage | isHostStage stage = getHostTarget
|
|
| 239 | +targetStage Stage0 {} = getHostTarget
|
|
| 240 | +targetStage stage | isHostStage stage = do
|
|
| 241 | + -- MP: If we are not cross compiling then we should use the target file in order to
|
|
| 242 | + -- build things for the host, in particular we want to use the configured values for the
|
|
| 243 | + -- target for building the RTS (ie are we using Libffi for adjustors, and the wordsize)
|
|
| 244 | + -- TODO: Use "flag CrossCompiling"
|
|
| 245 | + ht <- getHostTarget
|
|
| 246 | + tt <- getTargetTarget
|
|
| 247 | + if targetPlatformTriple ht == targetPlatformTriple tt
|
|
| 248 | + then return tt
|
|
| 249 | + else return ht
|
|
| 240 | 250 | targetStage _ = getTargetTarget
|
| 241 | 251 | |
| 242 | 252 | isHostStage :: Stage -> Bool
|
| ... | ... | @@ -182,7 +182,7 @@ test('T17414', |
| 182 | 182 | compile_and_run, [''])
|
| 183 | 183 | test('T17510', expect_broken(17510), compile_and_run, [''])
|
| 184 | 184 | test('bytestringread001', extra_run_opts('test.data'), compile_and_run, [''])
|
| 185 | -test('T17912', [only_ways(['threaded1']), when(opsys('mingw32'),expect_broken(1))], compile_and_run, [''])
|
|
| 185 | +test('T17912', [only_ways(['threaded1']), when(opsys('mingw32'),fragile(1))], compile_and_run, [''])
|
|
| 186 | 186 | test('T18832', only_ways(['threaded1']), compile_and_run, [''])
|
| 187 | 187 | |
| 188 | 188 | test('mkdirExists', [exit_code(1), when(opsys('mingw32'), ignore_stderr)], compile_and_run, ['']) |
| ... | ... | @@ -12,6 +12,7 @@ AC_DEFUN([FP_FIND_NM], |
| 12 | 12 | if test "$HostOS" = "mingw32"
|
| 13 | 13 | then
|
| 14 | 14 | NmCmd=$(cygpath -m "$NM")
|
| 15 | + NM_STAGE0=$NmCmd
|
|
| 15 | 16 | else
|
| 16 | 17 | NmCmd="$NM"
|
| 17 | 18 | fi
|