Move -DNO_ASM to config.h?

Marc Glisse marc.glisse at
Sun Mar 20 09:24:51 UTC 2016

On Sat, 19 Mar 2016, Marc Glisse wrote:

> when configure wants to define a macro, it usually puts it in config.h. We do 
> have one exception: NO_ASM, which ends up defined in CFLAGS. Was there a 
> particular reason for this choice?

One issue with changing it is MPFR: src/mpfr-longlong.h tests for NO_ASM, 
but there is no code to define it. As far as I understand, MPFR uses 
__GMP_CFLAGS by default, in which GMP may have included -DNO_ASM. If we 
move NO_ASM to config.h, that also affects them (not that it should 
necessarily stop us). We could also define NO_ASM both in CFLAGS and 
config.h. It looks like gcc and clang only warn when redefining a macro to 
something different, they don't warn for -DNO_ASM with #define NO_ASM 1, 
so it wouldn't be so bad.

Marc Glisse

More information about the gmp-devel mailing list