Re: Bootstrapping ghc through cross-build?
On Wed, Jul 31, 2024 at 10:14PM, Samuel Thibault wrote:
> It looks like it's confusing the pointer size of the builder and the
> target? (SIZEOF_VOID_P is defined to 8 in config.logand mk/config.h)
I believe you are right. The old, make-based build system has a bug
where it will use the in-tree header files (configured for the target
system) instead of the system ones. There are a lot of reports about
this (see [1] and [2]), but it was never fixed as GHC moved to the
hadrian build system.
[1] https://gitlab.haskell.org/ghc/ghc/-/issues/19965#note_374853
[2] https://gitlab.haskell.org/ghc/ghc/-/issues/15913#note_215554
The bug manifests when the bootstrap compiler is unregisterised. GHC on
i386 is unregisterised because the native backend uses SSE2 instructions
and violates the architecture baseline.
As a next step, I would suggest to:
1. Try using a different builder architecture that has a registerised
GHC. As an example, hurd-i386 has a registerised GHC, or
2. Build a registerised GHC on i386 first, and use that.
--
Ilias
Reply to: