public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@gmail.com>
To: "Clément Chigot" <chigot@adacore.com>
Cc: binutils@sourceware.org, nickc@redhat.com
Subject: Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled
Date: Tue, 3 Jan 2023 08:24:28 -0800	[thread overview]
Message-ID: <CA+=Sn1kmRNwe5_y1vG4zk9gTXmtkPexKoA9vGYKH5OS+DritTg@mail.gmail.com> (raw)
In-Reply-To: <CAJ307EgBrJc8mpUaRTSPmm61dWWKGACUaVoTkbQKnr64xpFeEA@mail.gmail.com>

On Tue, Jan 3, 2023 at 8:21 AM Clément Chigot <chigot@adacore.com> wrote:
>
> 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.

Yes it should be "!= xno". Looking at the other uses of "!= x" they
are there to test if overriding the other check if they should be
enabled or disabled so those uses are ok. I just missed that.

Thanks,
Andrew Pinski

>
> Thanks,
> Clément

  reply	other threads:[~2023-01-03 16:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 13:53 Clément Chigot
2023-01-03 15:59 ` Andrew Pinski
2023-01-03 16:21   ` Clément Chigot
2023-01-03 16:24     ` Andrew Pinski [this message]
2023-01-03 16:26       ` Clément Chigot
2023-01-03 17:41 ` Andrew Pinski
2023-01-04  7:51   ` Clément Chigot
2023-01-04 14:50     ` Richard Earnshaw
2023-01-04 17:50       ` Andrew Pinski
2023-01-05  8:04         ` Clément Chigot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+=Sn1kmRNwe5_y1vG4zk9gTXmtkPexKoA9vGYKH5OS+DritTg@mail.gmail.com' \
    --to=pinskia@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=chigot@adacore.com \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).