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 13:12:48 CEST 2013


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. And mode32 is supported on PowerPC, but not
on x86(_64).

> Passing CFLAGS manually to configure is allowed, but then you need to
> know what you're doing.  ABI=fooabi CFLAGS="-abi=barabi" will break.

The question is whether

  ABI=x32 CFLAGS=-m32

is assumed to be accepted by GMP. From a C point of view, i386 and
and x32 are compatible, so that there should be no problems, and
indeed, everything is fine with GMP when I use C only, i.e. with
--disable-assembly. But at the asm level, the goal of x32 is to
use x86_64 code, hence the failure if GMP doesn't detect the
override with CFLAGS.

I recall the goal: on an x86 processor, simulate the behavior with
the x32 ABI, i.e. have native C types the same as x32 and i386 but
with a 8-byte mp_limb_t (like on x32 and x86_64).

> (Now your Mail-Followup-To line made *me* the primary recipient of
> my reply.)

There's something broken on your side, because even the copy I have
from the mailing-list has a correct Mail-Followup-To, with all the
addresses (except me, of course).

-- 
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