Skip to content

Cross-compilation broken 9.4

Summary

Cross-compilation with GHC 9.4 appears to not generate a cross-compiled GHC, whilst trying to cross-compile to Haiku. The issue happens with both make and hadrian, but only the steps for make below. hadrian is essentially the same. Using 9.4.1 source tarball.

Steps to reproduce

Haiku cross-compiler can be built using https://github.com/jessicah/cross-compiler:

./build-rootfs.sh x86_64 --rootfsdir DIRNAME
$DIRNAME/fetch-packages.sh gmp gmp_devel mpfr mpfr_devel libiconv libiconv_devel libffi libffi_devel
export PATH=$PATH:DIRNAME/generated/cross-tools-x86_64/bin
./boot.source
./configure --target=x86_64-unknown-haiku --with-system-libffi
make
make binary-dist

Expected behavior

Generate an installable binary-distribution with Haiku-native binaries.

All binary files I could find were all built for the host, not the target.

Environment

  • GHC version used: 9.0.2 via ghcup

Optional:

  • Operating System: Ubuntu 20.04.4 LTS (Focal Fossa)
  • System Architecture: x86_64
Edited by Jessica Hamilton
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information