Disabling floating point code in mini-gmp?

Niels Möller nisse at lysator.liu.se
Wed Sep 24 10:25:30 CEST 2025


Marc Glisse <marc.glisse at inria.fr> writes:

> Do you also want to patch the .h files, or is a link-time error
> sufficient if someone tries to use a disabled function?

I'd prefer to not have conditionals in the header file, if that can be
avoided.

> I am not sure how compilers react if they see a declaration using
> double when they don't support double, if they complain immediately or
> wait until they see actual code using double to complain or never
> complain and generate calls to soft-float.

In my case, I built nettle using mini-gmp, which worked without
complaints. And then I tried to build a library depending on nettle, and
then the configure test for nettle failed with link errors on some
soft-float-related function. (I also got link errors for integer
division library functions, like __udivs3, but I think that's more
reasonable; I think I need provide an implementation of those functions,
first attempt at
https://github.com/tillitis/tkey-libs/issues/52#issuecomment-3324391737).

Regards,
/Niels

-- 
Niels Möller. PGP key CB4962D070D77D7FCB8BA36271D8F1FF368C6677.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list