[PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled
Clément Chigot
chigot@adacore.com
Tue Jan 3 16:21:14 GMT 2023
Hi Andrew,
On Tue, Jan 3, 2023 at 4:59 PM Andrew Pinski <pinskia@gmail.com> wrote:
>
> On Tue, Jan 3, 2023 at 5:53 AM Clément Chigot <chigot@adacore.com> wrote:
> >
> > Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks
> > about GMP and MPFR for gdb builds have been moved to the toplevel
> > configure.
> > However, it doesn't take into account the --disable-gdb option. Meaning
> > that a build without gdb will require these libraries even if not
> > needed.
>
> Here is a much simpler patch and disables the whole check for gmp/mpfr
> rather than just disables the error message, it is like the gdbserver
> check earlier:
> diff --git a/configure.ac b/configure.ac
> index 3a1eb0357e5..c184dc27201 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then
> require_mpc=yes
> fi
> if test -d ${srcdir}/gdb ; then
> - require_gmp=yes
> + if test x$enable_gdb = x; then
> + require_gmp=yes
> + fi
> fi
>
> gmplibs="-lmpfr -lgmp"
Indeed, thanks for that.
However, it should be "test x$enable_gdb != xno". Otherwise,
require_gmp is also disabled when gdb is explicitly enable (with
--enable-gdb).
But as all the similar patterns are similar to yours, I'm wondering if
there isn't something wrong here.
Thanks,
Clément
More information about the Binutils
mailing list