Re: About gmp and mpfr dependencies for gdb building

Andrew Pinski via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CA+=Sn1msugJKdp0FMqXXocud3+_OPzbCJNDbD_G6BKvRJFMGUw@mail.gmail.com>
On Thu, Mar 13, 2025 at 1:31 PM Tom Tromey <[email protected]> wrote:
>
> > For the gmp and mpfr dependency libs, is it possible to provide an
> > option to enable/disable the gmp and mpfr instead of forcely enabling
> > them when building gdb?
>
> Not currently.
>
> You could probably try to implement it.  One way might be to replace the
> use of GMP with a custom wide-int implementation; or with (assuming
> IIRC) the slower single-header GMP implementation.  Not sure about MPFR.
>
> Probably use of wide-int in gdb is just going to grow due to 128-bit
> ints becoming more common.

Well and BitInt increases the wide-int even further past the 128bit
wide length too.
GCC has its own wide-int implementation which might be useful to pull
into GDB if needed. It is used for BitInt and wide integer too.

MPFR might be hard to replace for floating point types are hard to
emulate exactly.
GCC does have some code to do some but most of the folding (except for
simple things) are handled via MPFR also.

Thanks,
Andrew Pinski

>
> thanks,
> Tom
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.