Bug#687169: closed by "Steve M. Robbins" <steve at sumost.ca> (Re: Bug#687169: libgmp-dev: remove the __GMP_CC and __GMP_CFLAGS lines from gmp-*.h files (or explain why they should be kept))

Vincent Lefevre vincent at vinc17.net
Sun Sep 16 05:49:58 UTC 2012


On 2012-09-15 04:36:04 +0000, Debian Bug Tracking System wrote:
> > Not really. This information makes sense on the machine where GMP
> > was built, 
> 
> Yes, and that's what the comment says.  I don't see any bug.

Use your brain instead of just reading the comment. If the user
uses these values (as normally required) and these values don't
reflect the environment of the system, things may go wrong.

> > What the comment doesn't say is that users should use the same CC and
> > CFLAGS to build his program against GMP. That's why this information
> > has been added to gmp.h.
> 
> I think you're over-interpreting it.

I'm not over-interpreting it. I'm just doing what Torbjorn said:

"GMP defaults to the fastest available ABI, and mpfr defaults to the
whatever the compiler chooses. Wouldn't it be wise to change MPFR to
do like GMP?"

and to avoid duplicating all the work done by GMP (with possible
differences in case of lack of synchronization), the __GMP_CC and
__GMP_CFLAGS have been added.

See https://sympa.inria.fr/sympa/arc/mpfr/2008-07/msg00010.html and
the following discussion.

> No-one has to use the same CFLAGS or CC to build programs that use
> gmp.

Wrong. On some systems, if these flags are not used, the build
against GMP fails due to the ABI mismatch. Before these variables
were used by MPFR, we got numerous bug reports of build failure
because GMP was built with a 64-bit ABI and the system used a
32-bit ABI by default.

-- 
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 debian-science-maintainers mailing list