Move -DNO_ASM to config.h?
Marc Glisse
marc.glisse at inria.fr
Sun Mar 20 08:14:49 UTC 2016
On Sun, 20 Mar 2016, Niels Möller wrote:
> Marc Glisse <marc.glisse at inria.fr> writes:
>
>> 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?
>
> I'm greping for its uses, and it is used only in C files as far as I
> can see.
I sure hope we don't use NO_ASM inside asm files ;-)
I was wondering if it was useful in the rest of the configure script, but
it seems to be done late enough that it is unlikely.
> Moving it to config.h makes sense to me. If we move it, we have make
> sure that config.h is always included before longlong.h. Most files get
> config.h via gmp-impl.h. So, e.g., #include "longlong.h" followed by
> #include "gmp-impl.h" would break.
longlong.h requires some types like UWtype which we provide in gmp-impl.h,
so I am hoping that the inclusions are already handled properly.
> I think the autoconf manual recommends an explicit include of config.h
> (guarded by HAVE_CONFIG_H) first in every C file. We don't have to do it
> that way of course, just be aware that we depart from that convention.
Thanks. autoconf is still rather unfamiliar to me (though at least it
makes more sense than the cmake I am forced to use at work).
--
Marc Glisse
More information about the gmp-devel
mailing list