ABI defaults
Torbjorn Granlund
tg at gmplib.org
Sat Nov 20 15:44:23 CET 2010
nisse at lysator.liu.se (Niels Möller) writes:
I'm appending a close to trivial config.abi which handles the most basic
choice between 32-bit and 64-bit. I'm not familiar at all with the more
obscure cases, so I haven't tried adding them to the case construction
(they should clearly be added early in the sequence of patterns).
If you think this is going in the right direction, I can check it in
(and I'd suggest the name config.abi, to be somewhat consistent with the
naming of other autoconf helper scripts).
This is a start. The tricky part is figuring out how to put this into
configure.in (i.e., where to insert or invoke this code).
The current autoconf type size determination code cannot be run before
we have chosen a compiler. Your code must be run after the type size
determination code. But when we choose ABI with the current methods
(i.e., use "best" ABI) or from a user selected ABI=foo argument, we
don't want to determine the type sizes for the default compiler without
any abi-changing arguments. But the type size determination code caches
its results, and I don't think that can be switched off (selectively).
It is not clear how to address this.
(It has been suggested that we should change GMP's greedy ABI selection,
and instead use whatever ABI to which any found compiler defaults. I
don't think that's a great idea, since it would hurt performance on
many, many systems.)
--
Torbjörn
More information about the gmp-devel
mailing list