Skip to content

Hadrian bindist installed ghc --info always reports bignum backend as `gmp`

Summary

I tried building a ghc-9.2 bindist with hadrian that used the native bignum backend. But when I ran ghc --info on the installed ghc, it told me it was using the gmp backend. Meanwhile the _build/stage1/bin/ghc correctly tells me that it's using the native backend.

I think this is happening because the lib/settings file generated as part of make install doesn't know that ghc was built with the native backend. Its only source of information is the default value from mk/config.mk.in, which is gmp.

I think this could be worked around by passing an appropriate flag to ./configure, but that shouldn't be necessary.

Steps to reproduce

  1. Create a hadrian bindist specifying the native backend: hadrian/build --bignum=native binary-dist
  2. Run ./configure && make install in that bindist
  3. Run ghc --info | grep gmp with the ghc installed from that bindist

Expected behaviour

ghc --info should tell me that the bignum backend is native

Environment

  • GHC version used: tip of ghc-9.2 branch (461e919a)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information