Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FIXED at Glasgow Haskell Compiler / GHC
Commits:
-
bc7c7b88
by Sven Tennie at 2025-10-17T06:34:38+02:00
-
21fb6e2a
by Sven Tennie at 2025-10-17T06:35:37+02:00
2 changed files:
Changes:
| ... | ... | @@ -142,15 +142,18 @@ configureEnvironment stage@Stage1 = do |
| 142 | 142 | , builderEnvironment "AR" (Ar Unpack stage)
|
| 143 | 143 | , builderEnvironment "NM" (Nm stage)
|
| 144 | 144 | , builderEnvironment "RANLIB" (Ranlib stage)
|
| 145 | - , remBuilderEnvironment "OBJDUMP"
|
|
| 146 | - , remBuilderEnvironment "STRIP"
|
|
| 145 | + -- , remBuilderEnvironment "OBJDUMP"
|
|
| 146 | + -- , remBuilderEnvironment "STRIP"
|
|
| 147 | 147 | , return . AddEnv "CFLAGS" $ unwords cFlags ++ " -w"
|
| 148 | - , return . AddEnv "LDFLAGS" $ unwords ldFlags ++ " -w" ]
|
|
| 148 | + , return . AddEnv "LDFLAGS" $ unwords ldFlags ++ " -w"
|
|
| 149 | + , return . AddEnv "OBJDUMP" $ "objdump"
|
|
| 150 | + , return . AddEnv "STRIP" $ "strip" ]
|
|
| 149 | 151 | ++ (if winTarget then
|
| 150 | 152 | -- TODO: Use staged LD for winTarget. This is only a hack because the wrong staged LD was provided.
|
| 151 | 153 | [remBuilderEnvironment "LD"]
|
| 152 | 154 | else
|
| 153 | - [ -- TODO: This should be the staged LD, but that points to GCC and not LD.
|
|
| 155 | + [ -- TODO: This should be the staged LD, but that points to gcc and not ld. With the current gcc as linker config, libffi doesn't build shared libs.
|
|
| 156 | + remBuilderEnvironment "LD"
|
|
| 154 | 157 | ])
|
| 155 | 158 | |
| 156 | 159 | configureEnvironment stage = do
|
| ... | ... | @@ -172,6 +175,7 @@ configureEnvironment stage = do |
| 172 | 175 | []
|
| 173 | 176 | else
|
| 174 | 177 | [ -- TODO: This should be the staged LD, but that points to GCC and not LD.
|
| 178 | + -- builderEnvironment "LD" (Ld stage)
|
|
| 175 | 179 | ])
|
| 176 | 180 | |
| 177 | 181 | -- Need the libffi archive and `trackAllow` all files in the build directory.
|
| ... | ... | @@ -3,7 +3,7 @@ module Settings.Packages (packageArgs) where |
| 3 | 3 | import Data.Version.Extra
|
| 4 | 4 | import Expression
|
| 5 | 5 | import Flavour
|
| 6 | -import Oracles.Setting hiding (ghcWithInterpreter)
|
|
| 6 | +import Oracles.Setting
|
|
| 7 | 7 | import Oracles.Flag
|
| 8 | 8 | import Packages
|
| 9 | 9 | import Settings
|
| ... | ... | @@ -12,7 +12,6 @@ import Settings.Builders.Common (wayCcArgs) |
| 12 | 12 | import qualified GHC.Toolchain.Library as Lib
|
| 13 | 13 | import GHC.Toolchain.Target
|
| 14 | 14 | import GHC.Platform.ArchOS
|
| 15 | -import Settings.Program (ghcWithInterpreter)
|
|
| 16 | 15 | |
| 17 | 16 | -- | Package-specific command-line arguments.
|
| 18 | 17 | packageArgs :: Args
|
| ... | ... | @@ -93,7 +92,7 @@ packageArgs = do |
| 93 | 92 | -- load target code, otherwise enable for stage1 since
|
| 94 | 93 | -- that runs on the target and can use target's own
|
| 95 | 94 | -- ghci object linker
|
| 96 | - [ andM [expr (ghcWithInterpreter stage), orM [notM (expr cross), stage2]] `cabalFlag` "internal-interpreter"
|
|
| 95 | + [ andM [expr (ghcWithInterpreter stage)] `cabalFlag` "internal-interpreter"
|
|
| 97 | 96 | , orM [ notM cross, haveCurses ] `cabalFlag` "terminfo"
|
| 98 | 97 | , arg "-build-tool-depends"
|
| 99 | 98 | , staged (buildFlag UseLibzstd) `cabalFlag` "with-libzstd"
|
| ... | ... | @@ -263,7 +262,7 @@ ghcInternalArgs = package ghcInternal ? do |
| 263 | 262 | |
| 264 | 263 | -- backend specific
|
| 265 | 264 | , case backend of
|
| 266 | - "gmp" -> mconcat
|
|
| 265 | + "gmp" -> mconcat
|
|
| 267 | 266 | [ builder (Cabal Setup) ? mconcat
|
| 268 | 267 | |
| 269 | 268 | -- enable GMP backend: configure script will produce
|
| ... | ... | @@ -415,7 +414,7 @@ rtsPackageArgs = package rts ? do |
| 415 | 414 | -- any warnings in the module. See:
|
| 416 | 415 | -- https://gitlab.haskell.org/ghc/ghc/wikis/working-conventions#Warnings
|
| 417 | 416 | |
| 418 | - , (not <$> (staged (buildFlag CcLlvmBackend))) ?
|
|
| 417 | + , (not <$> staged (buildFlag CcLlvmBackend)) ?
|
|
| 419 | 418 | inputs ["**/Compact.c"] ? arg "-finline-limit=2500"
|
| 420 | 419 | |
| 421 | 420 | , input "**/RetainerProfile.c" ? staged (buildFlag CcLlvmBackend) ?
|