From patchwork Sun Sep 16 18:45:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 29411 Received: (qmail 128769 invoked by alias); 16 Sep 2018 18:46:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 128263 invoked by uid 89); 16 Sep 2018 18:45:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=mpfr, gmp X-HELO: gateway20.websitewelcome.com Received: from gateway20.websitewelcome.com (HELO gateway20.websitewelcome.com) (192.185.54.2) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 16 Sep 2018 18:45:05 +0000 Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway20.websitewelcome.com (Postfix) with ESMTP id F2AC2400C4F11 for ; Sun, 16 Sep 2018 13:45:03 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 1c2ZgrLPwSjJA1c2ZgSqCS; Sun, 16 Sep 2018 13:45:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=KaMEqge9YZZfleypivkRkQP481qd1WINkcFZxLF5DMw=; b=pn5frRftKlGON/ZFs5eJIJunq7 o+WYl74fG9dFt88H4grQ2X450VFu+XrrXAyOUOX7W/LdFwT4yVcFmPbP6bPpBK2d1VYAvotWUMRNi VI3nt+RATDAmWVLbvD9rmjHKv; Received: from 97-122-190-66.hlrn.qwest.net ([97.122.190.66]:45184 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1g1c2Z-000oVx-P6; Sun, 16 Sep 2018 13:45:03 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 1/2] Check for gmp when checking for mpfr Date: Sun, 16 Sep 2018 12:45:01 -0600 Message-Id: <20180916184502.19617-2-tom@tromey.com> In-Reply-To: <20180916184502.19617-1-tom@tromey.com> References: <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 * 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 ], + AC_LIB_HAVE_LINKFLAGS([mpfr], [gmp], [#include ], [mpfr_exp_t exp; mpfr_t x; mpfr_frexp (&exp, x, x, MPFR_RNDN);]) if test "$HAVE_LIBMPFR" != yes; then