ABI defaults

Torbjorn Granlund tg at gmplib.org
Wed Nov 17 15:31:41 CET 2010


nisse at lysator.liu.se (Niels Möller) writes:

  Currently handles only {sparc|x86_64}-{linux|bsd|solaris}, and at most two
  ABIs, but I think it could be extended without getting too unwieldy (and
  there's no strong need to have the detection support any platform which
  we don't have some assembler files for).

I don't think this has much to do with the existence of assembly files.
(And the list of machines for which we have no assembly files is quite
short.)

  > Checking the width of types is standard autoconf stuff, and it gives
  > some information. 
  
  Do you think it's too fragile to rely on preprocessor constants?
  
It seems a little fragile, and also much more compiler dependent.  Look
at the mess in gmp-h.in for when we attempt that sort of things.

For most processor types, we should be able to robustly and compiler
independently detect the used compiler's default, from checking just
type sizes.

  > I'd try writing this as a separate script, designed to be invoked from
  > 'configure' and expecting parameters for plain type sizes.  These sizes
  > are most easily figured out by configure:
  
  Might need cpu type and operating system too? No matter if it's a
  separate script or inlined in configure, I guess a
  
     case "$host_cpu:$host_os:$longlong_size:$long_size:$int_size"
  
  should get you quite far.
  
Yep.  Let us now when you're ready.  :-)

(I'd pass the standard tuple, without replacing the dashes by colon.)

-- 
Torbjörn


More information about the gmp-devel mailing list