Improving GMP configure (Was: Re: ABI defaults)

Torbjorn Granlund tg at
Sun Nov 28 12:15:23 CET 2010

I think there might be need to make several improvements to GMP's
configure.  I summarise problems and improvements here.

* Add a mechanism for using a default ABI (as already discussed):

   o Choose compiler according to current rules, then figure out that
     compiler's default ABI.

   o Problem 1: Different compilers might have different default ABIs,
     which can lead to surprises and still require user's to pass
     special options.

   o Problem 2: We should to be able to backtrack over multiple
     compilers, since some of the 'compiler works' tests might fail.
     This might change the default ABI (per Problem 1), albeit rarely.

* When configure promotes a compiler from a generic name like 'cc' to
  Sun's 'acc' or IBM's xlc, it drops cc_cflags.  This happens e.g., for
  none-ibm-aix6.1.  (This is probably not hard to fix.)

* When using none-*-*, which we recommend for disabling all assembly
  code, no compiler specific options can be set.  This means that
  configure can't know how to choose ABI.  We could fix this in at least
  two ways:

   o Run the large CPU case statement in based on
     config.guess results, not user passed triple.  (This might be
     against GNU's standard documented behaviour.)

   o Deprecate none-*-* and add an option --disable-assembly.  I think
     this might be the cleanest solution, but it adds a slight burden on

* We don't detect and reject hopelessly broken compiler like gcc 4.3.2
  or the buggy xlc compilers.  Perhaps we should simply detect them,
  unless somebody can come up with a feature test (that does not require
  target machine execution).


More information about the gmp-devel mailing list