Skip to content

Draft: WIP: hadrian: actually build a full cross-compiler.

Jessica Hamilton requested to merge jessicah/ghc:hadrian-cross into master

Have used this to create a binary distribution that contains a cross-compiler that runs on the target. I've had to edit the wrapper scripts, as the paths passed to wrapper in hadrian/src/Rules/BinaryDist.hs include the cross prefix, so it currently falls through to commonWrapper.

Changes include always running the build for stage 2 binaries when cross-compiling (in hadrian/src/Rules/Program.hs), instead of (IMO erroneously) copying over the stage0 binaries, and using stage 2 artifacts when building the binary distribution, and using the stage 1 ghc-pkg, as the stage 2 ghc-pkg runs on the target when cross-compiling. This seems consistent with the diagram at https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/README.md

Should fix #22006, may help with #19174, #23975

Merge request reports