Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 1/2] Check for gmp when checking for mpfr
Date: Sun, 16 Sep 2018 18:46:00 -0000	[thread overview]
Message-ID: <20180916184502.19617-2-tom@tromey.com> (raw)
In-Reply-To: <20180916184502.19617-1-tom@tromey.com>

There was a report on irc that the gdb check for mpfr failed when only
static libraries are available.  The issue is that mpfr depends on
gmp, but this is not handled explicitly by gdb.

Ideally upstream would switch to pkg-config.  Or even more ideally, we
would incorporate pkg-config into the compiler and not mess with any
of this.

Meanwhile, this changes gdb's configure to add gmp to the link line
when checking for mpfr.

ChangeLog
2018-09-16  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* configure.ac: Use gmp as a library dependency when checking for
	mpfr.
---
 gdb/ChangeLog    | 6 ++++++
 gdb/configure    | 2 +-
 gdb/configure.ac | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gdb/configure b/gdb/configure
index d92a256f1ff..e011b77414b 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -9837,7 +9837,7 @@ fi
   rpathdirs=
   ltrpathdirs=
   names_already_handled=
-  names_next_round='mpfr '
+  names_next_round='mpfr gmp'
   while test -n "$names_next_round"; do
     names_this_round="$names_next_round"
     names_next_round=
diff --git a/gdb/configure.ac b/gdb/configure.ac
index e38604cb656..f658da84e32 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -682,7 +682,7 @@ if test "${with_mpfr}" = no; then
   AC_MSG_WARN([MPFR support disabled; some features may be unavailable.])
   HAVE_LIBMPFR=no
 else
-  AC_LIB_HAVE_LINKFLAGS([mpfr], [], [#include <mpfr.h>],
+  AC_LIB_HAVE_LINKFLAGS([mpfr], [gmp], [#include <mpfr.h>],
 			[mpfr_exp_t exp; mpfr_t x;
 			 mpfr_frexp (&exp, x, x, MPFR_RNDN);])
   if test "$HAVE_LIBMPFR" != yes; then
-- 
2.17.1


  parent reply	other threads:[~2018-09-16 18:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-16 18:45 [PATCH 0/2] two small configure patches Tom Tromey
2018-09-16 18:46 ` [PATCH 2/2] Do not pass -DNDEBUG to Python compilations in development mode Tom Tromey
2018-09-17 18:19   ` Joel Brobecker
2018-09-17 18:22     ` Tom Tromey
2018-09-17 19:53       ` Tom Tromey
2018-09-17 21:21         ` Joel Brobecker
2018-09-17 21:22           ` Tom Tromey
2018-09-16 18:46 ` Tom Tromey [this message]
2018-09-17 18:18   ` [PATCH 1/2] Check for gmp when checking for mpfr Joel Brobecker

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=20180916184502.19617-2-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /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