[Dnsmasq-discuss] [PATCH] Add support for libnettle with mini-gmp
Simon Kelley
simon at thekelleys.org.uk
Tue Jun 17 18:56:25 UTC 2014
On 14/06/14 21:53, Andre Heider wrote:
> libnettle can be compiled with --enable-mini-gmp which does not
> require an external libgmp.
>
> To support both variants, fix one header which works everywhere and
> stop linking against libgmp if HAVE_NETTLE_MINI is in COPTS. ---
>
> Hi,
>
> OpenWRT supports mini-gmp via CONFIG_LIBNETTLE_MINI, and I ran into a
> compile error on this setup.
>
> This patch fixes the issue, please consider applying.
>
> Thanks, Andre
>
That's great. I've applied it, but with significant changes.
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.
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.
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list