cross-compiling issue with hadrian
When someone apply fixes for #21601 (closed) and #21613 then x64-linux to arm-linux cross-compiler build finishes fine when using make
build system. When using hadrian it fails with:
$ ./hadrian/build --flavour=quick-cross
Up to date
| Run Cc (FindCDependencies CDep) Stage1: libraries/ghc-bignum/cbits/gmp_wrappers.c => _build/stage1/libraries/ghc-bignum/build/c/cbits/gmp_wrappers.o.d
Command line: /export/home/karel/sfw/x-tools/arm-unknown-linux-gnueabihf/bin//arm-unknown-linux-gnueabihf-gcc -std=c99 -Wall -marm -E -MM -MG -MF _build/stage1/libraries/ghc-bignum/build/c/cbits/gmp_wrappers.o.d -MT _build/stage1/libraries/ghc-bignum/build/c/cbits/gmp_wrappers.o -Irts/include -I_build/stage1/libraries/ghc-bignum/build -I_build/stage1/libraries/ghc-bignum/build/include/ -I_build/stage1/libraries/ghc-bignum/build/include -Ilibraries/ghc-bignum/include/ -Ilibraries/ghc-bignum/include -I/export/home/karel/vcs/ghc-src/arm-linux/ghc/_build/stage1/lib/arm-linux-ghc-9.5.20220521/rts-1.0.2/include -x c libraries/ghc-bignum/cbits/gmp_wrappers.c
===> Command failed with error code: 1
libraries/ghc-bignum/cbits/gmp_wrappers.c:30:3: error: #error __GNU_MP_VERSION not defined
# error __GNU_MP_VERSION not defined
^~~~~
libraries/ghc-bignum/cbits/gmp_wrappers.c:42:3: error: #error WORD_SIZE_IN_BITS != GMP_LIMB_BITS not supported
# error WORD_SIZE_IN_BITS != GMP_LIMB_BITS not supported
^~~~~
Command failed
Build failed.
This is probably a sign of hadrian trying to use host gmp instead of cross-compiled one.