public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Clément Chigot" <chigot@adacore.com>
To: binutils@sourceware.org
Cc: pinskia@gmail.com, nickc@redhat.com,
	"Clément Chigot" <chigot@adacore.com>
Subject: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled
Date: Tue,  3 Jan 2023 14:53:30 +0100	[thread overview]
Message-ID: <20230103135330.1225218-1-chigot@adacore.com> (raw)

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.

ChangeLog:

	* configure.ac: Skip GMP and MPFR errors when --disable-gdb is
	provided.
	* configure: Regenerate.
---
 configure    | 4 +++-
 configure.ac | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 417fc5a970c..0fb8279cb8f 100755
--- a/configure
+++ b/configure
@@ -8426,11 +8426,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package,
 make sure that you have installed both the libraries and the header
 files.  They may be located in separate packages." "$LINENO" 5
     else
-      as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+.
+      if test "x$enable_gdb" != xno; then
+        as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+.
 Try the --with-gmp and/or --with-mpfr options to specify
 their locations.  If you obtained GMP and/or MPFR from a vendor
 distribution package, make sure that you have installed both the libraries
 and the header files.  They may be located in separate packages." "$LINENO" 5
+      fi
     fi
   fi
 fi
diff --git a/configure.ac b/configure.ac
index 3a1eb0357e5..0ec2fffcb56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1814,11 +1814,13 @@ you obtained GMP, MPFR and/or MPC from a vendor distribution package,
 make sure that you have installed both the libraries and the header
 files.  They may be located in separate packages.])
     else
-      AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+.
+      if test "x$enable_gdb" != xno; then
+        AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+.
 Try the --with-gmp and/or --with-mpfr options to specify
 their locations.  If you obtained GMP and/or MPFR from a vendor
 distribution package, make sure that you have installed both the libraries
 and the header files.  They may be located in separate packages.])
+      fi
     fi
   fi
 fi
-- 
2.25.1


             reply	other threads:[~2023-01-03 13:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 13:53 Clément Chigot [this message]
2023-01-03 15:59 ` Andrew Pinski
2023-01-03 16:21   ` Clément Chigot
2023-01-03 16:24     ` Andrew Pinski
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=20230103135330.1225218-1-chigot@adacore.com \
    --to=chigot@adacore.com \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    --cc=pinskia@gmail.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).