[Dnsmasq-discuss] [PATCH] Add support for libnettle with mini-gmp

Simon Kelley simon at thekelleys.org.uk
Wed Jun 18 20:46:37 UTC 2014


On 17/06/14 21:19, Andre Heider wrote:
> Hi,
> 
> On Tue, Jun 17, 2014 at 8:56 PM, Simon Kelley <simon at thekelleys.org.uk> wrote:
>> 1) I changed the preprocessor symbol to NO_GMP. That fits with others
>> that _remove_ dependencies.
>>
>> 2) I changed  the mechanism so that you can get the correct effect by adding
>>
>> #define NO_GMP
>>
>> to src/config.h, as well as using the make command line, in the same way
>> as the other controls. It's not likely  to be used, but if it behaves
>> differently, it will catch someone out, someday.
> 
> Alright, thanks, I'll adapt my OpenWRT patches to that.
> 
>> I wonder is there's something in the nettle headers that can be used to
>> control this automatically. Ie if linking against libnettle compiled
>> with  --enable-mini-gmp, then do the right thing without needing
>> -DNO_GMP. I couldn't see anything obvious.
> 
> In theory pkg-config should handle all that. I didn't want to break
> anything for dnsmasq, hence didn't touch the gmp linkage, but if
> libnettle.so properly links against a required libgmp.so you shouldn't
> need to add it explicitly.
> But I've seen too many cases where that doesn't work out in reality :\
> 

Me too, which is which the explicit -lgmp is added. I think the problem
that prompted that was with the option to build with those libraries
statically linked.


Cheers,

Simon.





More information about the Dnsmasq-discuss mailing list