Cross compile GHC project using aarch64-linux-gnu-ghc

  1. Build remote-iserv program for aarch64 using your cross-compiler. Sources are in the ghc tree (utils/remote-iserv)
  2. Build iserv-proxy program using a non cross-compiling GHC. Sources have been moved here: Making sure you're not a bot! after Making sure you're not a bot!
  3. Run remote-iserv on some aarch64 host (virtual or not)
  4. Use GHC cross-compiler with the following flags: -fexternal-interpreter -pgmi path/to/iserv-proxy -opti10.0.1.21 -opti500 (adapt the arguments to the ip/port of the remote-iserv host).

I’ve never done it but @angerman has. See his old blog posts: Android and Template Haskell. With the Haskell Cross Compiler for… | by zw3rk | Medium