Bug#724320: gmp: x32: sizeof(mp_limb_t)!=sizeof(void*) is not supported by GAP and PARI

Vincent Lefevre vincent at vinc17.net
Wed Oct 2 14:38:14 CEST 2013

On 2013-10-02 15:14:29 +0300, Marc Glisse wrote:
> On Wed, 2 Oct 2013, Vincent Lefevre wrote:
> >On 2013-10-02 11:52:54 +0200, Torbjorn Granlund wrote:
> >>Vincent Lefevre <vincent at vinc17.net> writes:
> >>
> >>  It would be cleaner to have an option to force the mp_limb_t size
> >>  e.g. to 8 bytes, but GMP doesn't seem to provide such an option.
> >>
> >>It sure does.  ABI=...
> >
> >With which value??? ABI=x32 fails on x86_64: it passes -mx32 to gcc,
> >which isn't supported.
> Yes it is, on gcc versions 4.7+ (the versions recent enough to
> support the x32 ABI).

It is by gcc itself, but not working on my machine: the generated
executable segfaults. BTW, GMP's configure says "could not find a
working compiler", which is misleading because the problem doesn't
seem to be with the compiler itself.

So, the problem remains: either support the override of the ABI
in CFLAGS (but keeping the same type sizes implied by $ABI), or
provide an alternative ABI value to force the mp_limb_t size to
some value (e.g. by have mp_limb_t = long long, like with the
mode32 ABI on PowerPC).

Vincent Lefèvre <vincent at vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

More information about the gmp-discuss mailing list