RISC-V/GHC: Difference between revisions

Fgaz (talk | contribs)
Reformat
Refine information about which GHC versions can boot which other ones. Remove a line that was mistakenly linked to xmonad, even though I didn't originally wrote it for GHC not xmonad.
Line 22: Line 22:
* nix-output-monitor
* nix-output-monitor
* xmonad
* xmonad
** does cross-compile though when building unregisterised


== Booting GHC via cross-compilation ==
== Booting GHC via cross-compilation ==
Line 156: Line 155:
For newer GHCs, refer to the GHC documentation or the Nixpkgs source to find which version of GHC and LLVM is needed for compilation.
For newer GHCs, refer to the GHC documentation or the Nixpkgs source to find which version of GHC and LLVM is needed for compilation.


GHC >=9.2 is unable to boot any version of GHC when cross-compiled. GHC >=9.6 cannot be cross-compiled at all due to issues with Hadrian. Newer GHCs can be booted using natively compiled versions of GHC instead.
GHC >=9.2 is unable to boot 9.2 and 9.4. GHC >=9.6 cannot be cross-compiled at all due to issues with Hadrian. Newer GHCs can be booted using natively compiled versions of GHC instead.


See https://github.com/AlexandreTunstall/nixos-riscv for an example of a pure flake that uses this trick to compile Haskell programs for RISC-V.
See https://github.com/AlexandreTunstall/nixos-riscv for an example of a pure flake that uses this trick to compile Haskell programs for RISC-V.