[Git][ghc/ghc][wip/romes/hadrian-cross-stage2-rebase_SVEN_FIXED] 2 commits: Fixup: Align Settings
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 Fixup: Align Settings - - - - - 21fb6e2a by Sven Tennie at 2025-10-17T06:35:37+02:00 Hack around libffi not creating shared libs with GCC (in lieu of LD) - - - - - 2 changed files: - hadrian/src/Rules/Libffi.hs - hadrian/src/Settings/Packages.hs Changes: ===================================== hadrian/src/Rules/Libffi.hs ===================================== @@ -142,15 +142,18 @@ configureEnvironment stage@Stage1 = do , builderEnvironment "AR" (Ar Unpack stage) , builderEnvironment "NM" (Nm stage) , builderEnvironment "RANLIB" (Ranlib stage) - , remBuilderEnvironment "OBJDUMP" - , remBuilderEnvironment "STRIP" + -- , remBuilderEnvironment "OBJDUMP" + -- , remBuilderEnvironment "STRIP" , return . AddEnv "CFLAGS" $ unwords cFlags ++ " -w" - , return . AddEnv "LDFLAGS" $ unwords ldFlags ++ " -w" ] + , return . AddEnv "LDFLAGS" $ unwords ldFlags ++ " -w" + , return . AddEnv "OBJDUMP" $ "objdump" + , return . AddEnv "STRIP" $ "strip" ] ++ (if winTarget then -- TODO: Use staged LD for winTarget. This is only a hack because the wrong staged LD was provided. [remBuilderEnvironment "LD"] else - [ -- TODO: This should be the staged LD, but that points to GCC and not LD. + [ -- 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. + remBuilderEnvironment "LD" ]) configureEnvironment stage = do @@ -172,6 +175,7 @@ configureEnvironment stage = do [] else [ -- TODO: This should be the staged LD, but that points to GCC and not LD. + -- builderEnvironment "LD" (Ld stage) ]) -- Need the libffi archive and `trackAllow` all files in the build directory. ===================================== hadrian/src/Settings/Packages.hs ===================================== @@ -3,7 +3,7 @@ module Settings.Packages (packageArgs) where import Data.Version.Extra import Expression import Flavour -import Oracles.Setting hiding (ghcWithInterpreter) +import Oracles.Setting import Oracles.Flag import Packages import Settings @@ -12,7 +12,6 @@ import Settings.Builders.Common (wayCcArgs) import qualified GHC.Toolchain.Library as Lib import GHC.Toolchain.Target import GHC.Platform.ArchOS -import Settings.Program (ghcWithInterpreter) -- | Package-specific command-line arguments. packageArgs :: Args @@ -93,7 +92,7 @@ packageArgs = do -- load target code, otherwise enable for stage1 since -- that runs on the target and can use target's own -- ghci object linker - [ andM [expr (ghcWithInterpreter stage), orM [notM (expr cross), stage2]] `cabalFlag` "internal-interpreter" + [ andM [expr (ghcWithInterpreter stage)] `cabalFlag` "internal-interpreter" , orM [ notM cross, haveCurses ] `cabalFlag` "terminfo" , arg "-build-tool-depends" , staged (buildFlag UseLibzstd) `cabalFlag` "with-libzstd" @@ -263,7 +262,7 @@ ghcInternalArgs = package ghcInternal ? do -- backend specific , case backend of - "gmp" -> mconcat + "gmp" -> mconcat [ builder (Cabal Setup) ? mconcat -- enable GMP backend: configure script will produce @@ -415,7 +414,7 @@ rtsPackageArgs = package rts ? do -- any warnings in the module. See: -- https://gitlab.haskell.org/ghc/ghc/wikis/working-conventions#Warnings - , (not <$> (staged (buildFlag CcLlvmBackend))) ? + , (not <$> staged (buildFlag CcLlvmBackend)) ? inputs ["**/Compact.c"] ? arg "-finline-limit=2500" , input "**/RetainerProfile.c" ? staged (buildFlag CcLlvmBackend) ? View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/db447b27430492c6c5db5a5e145aa36... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/db447b27430492c6c5db5a5e145aa36... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Sven Tennie (@supersven)