This patch enables bootstrapping of GHC 9.4.4 with GHC 9.9.4 using the Hadrian build system. The patches have been cherry-picked from GHC upstream. diff -upr ghc-9.4.4.orig/hadrian/hadrian.cabal ghc-9.4.4/hadrian/hadrian.cabal --- ghc-9.4.4.orig/hadrian/hadrian.cabal 2023-02-02 18:15:20.677698316 +0000 +++ ghc-9.4.4/hadrian/hadrian.cabal 2023-02-02 18:16:12.252489419 +0000 @@ -147,7 +147,7 @@ executable hadrian , BangPatterns other-extensions: MultiParamTypeClasses , TypeFamilies - build-depends: Cabal >= 3.2 && < 3.7 + build-depends: Cabal >= 3.2 && < 3.9 , base >= 4.8 && < 5 , bytestring >= 0.10 && < 0.12 , containers >= 0.5 && < 0.7 diff -upr ghc-9.4.4.orig/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs ghc-9.4.4/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs --- ghc-9.4.4.orig/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs 2023-02-02 18:15:20.681031743 +0000 +++ ghc-9.4.4/hadrian/src/Hadrian/Haskell/Cabal/Parse.hs 2023-02-02 18:16:23.179464932 +0000 @@ -23,7 +23,11 @@ import qualified Distribution.ModuleName import qualified Distribution.Package as C import qualified Distribution.PackageDescription as C import qualified Distribution.PackageDescription.Configuration as C +#if MIN_VERSION_Cabal(3,8,0) +import qualified Distribution.Simple.PackageDescription as C +#else import qualified Distribution.PackageDescription.Parsec as C +#endif import qualified Distribution.Simple.Compiler as C import qualified Distribution.Simple.Program.Db as C import qualified Distribution.Simple as C