Configure fails on 32-bit platform
nisse at lysator.liu.se
Mon Feb 12 15:55:27 UTC 2018
Vincent Lefevre <vincent at vinc17.net> writes:
> So, in case of 32-bit x86 mode in the compiler, shouldn't $host be
> seen as matching X86_PATTERN instead of X86_64_PATTERN?
Interestingly, it seems config.guess checks $CC (but not $CFLAGS):
$ CC='gcc -m32' ./config.guess
If it had produced
in the latter case, ABI=64 would probably have been excluded.
GMP configure might like to know both that the compiler is only capable
of 32-bit code, and that the chip is a haswell to be used in 32-bit
mode, not any random x86.
But the thing with GMP configure is that it wants 64-bit code if
possible, so given a compiler which defaults to 32-bit code but is
capable of 64-bit, it wants to use ABI=64 and add -m64 or similar to
CFLAGS. Which gives better performance, but sometimes a bit surprising
to the user. I think it would be better to not automatically add -m64 in
this case, but just display a loud message suggesting a reconfigure with
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.
More information about the gmp-bugs