Improving GMP configure

Niels Möller nisse at lysator.liu.se
Mon Nov 29 23:36:51 CET 2010


Torbjorn Granlund <tg at gmplib.org> writes:

> Does that really work?  Assume we have compiler A and B, with a
> preference for compiler A.  The default ABI for A is 64-bit and the
> default ABI for compiler B is 32-bit.  Furthermore, compiler A has a
> nasty bug that affects just the 64-bit ABI, while its 32-bit ABI support
> is awesome.  And to make things worse, B's support for the 32-bit ABI is
> also affected by a nasty bug...
>
> Now, how should GMP choose compiler and ABI under the new 'default'
> feature?

The "system default" here seems to be use compiler A in 64-bit mode,
which is broken.

* In any case, I think it's appropriate with a strong recommendation to
  the user to replace compiler A (I imagine it can be a bit tricky to
  even use it for bootstrapping a working 64-bit compiler, you'd have to
  first build a 32-bit compiler generating working 64-bit code, before
  you can build a native 64-bit compiler).

* If the user has not explicitly asked for compiler A, then it would
  make sense to select compiler B instead, and using its 64-bit mode
  (I'm assuming the two compilers generate compatible objects). Probably
  a bit hairy to implement, though.

* Switching to a different ABI than 64-bit is most likely not going to
  be helpful to the user. This rules out trying to use either compiler
  in 32-bit mode.

* I think it would be fully acceptable if configure just fails with a
  message saying that the default compiler and ABI is too broken,
  suggesting alternative configurations which are expected to work
  better.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list