Use of the __GMP_CC and __GMP_CFLAGS macros

Vincent Lefevre vincent at
Tue Sep 25 10:19:34 CEST 2012

On 2012-09-24 21:33:28 -0500, Gabriel Dos Reis wrote:
> On Mon, Sep 24, 2012 at 9:57 AM, Vincent Lefevre <vincent at> wrote:
> > Unfortunately, the Debian maintainer doesn't want to change that
> > (like removing these macros, since Debian always uses the default
> > ABI) because he assumes that the user shouldn't use __GMP_CC and
> >
> >
> >
> > Of course, this is not the right solution (unless GMP decides to use
> > the default ABI everywhere), otherwise one would get the same problems
> > as in the past!
> So, we have a distro maintainer who refuses to provide
> a sensible GMP build/distribution. Is that correct?

Yes, thus programs that use these macros need to do something
about that.

However, "better" documentation from GMP may help to change the
maintainer's decision. For instance, a comment saying that the goal
of these macros is to provide information to configure scripts that
build programs against GMP (useful because GMP may choose an ABI
that is different from the default one), and/or saying that such
macros should be removed by distributions of binary packages.

The maintainer made his decision based on the comment preceding
the macros:

/* Define CC and CFLAGS which were used to build this version of GMP */

rather on my explanation of the history of these macros. He says
that the macros provide what the comment says, so doesn't see any
bug, even though this would mean that these macros shouldn't be
used (he agrees on this point!). So, changing the comment could

There could also be a GMP configure option to disable the generation
of these macros, and say that this is for distributions...

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

More information about the gmp-discuss mailing list