[PATCH 09/20] Prepare for creating hidden aliases of all routines

Richard Henderson rth at twiddle.net
Mon Mar 4 21:07:38 CET 2013

On 03/04/2013 11:48 AM, Niels Möller wrote:
> Richard Henderson <rth at twiddle.net> writes:
>> index 1b27998..ff0dc45 100644
>> --- a/gmp-h.in
>> +++ b/gmp-h.in
>> @@ -251,6 +251,10 @@ typedef __mpq_struct *mpq_ptr;
>>       __GMP_PUBLIC_DATA	- for declaring data variables
>>       __GMP_PUBLIC_ALIAS	- for re-declaring symbols with another name
>> +   When using GCC and building an ELF shared library, we'll arrange for
>> +   the rest of GMP to see a hidden alias.  The true public symbol will
>> +   be created in the individual source files.
>> +
> This is supposed to be an implementation detail, right? I.e., it should
> depend only on if gmp *itself* is compiled with gcc, and work the same
> no matter which compiler is used for the application *using* gmp (and
> which will be processing the public gmp.h header)?
> I admit I don't understand the fine details here.

It's an implementation detail, yes.  It depends only on what compiler is being
used at the moment.  One can swap between gcc and non-gcc at will, between
application and whatever builds libgmp.

This is why the <gmp-rename.h> file is always created and installed, back in
one of the prior patches.


More information about the gmp-devel mailing list