From patchwork Mon Feb 17 17:05:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 38190 Received: (qmail 22749 invoked by alias); 17 Feb 2020 17:05:11 -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 22666 invoked by uid 89); 17 Feb 2020 17:05:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: gateway30.websitewelcome.com Received: from gateway30.websitewelcome.com (HELO gateway30.websitewelcome.com) (192.185.160.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Feb 2020 17:05:08 +0000 Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 006E78D28 for ; Mon, 17 Feb 2020 11:05:07 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 3jpSjRaB4XVkQ3jpSjohdF; Mon, 17 Feb 2020 11:05:06 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=b5GZjUkQo+/PZBw81/mklU3o4GBiX1Oll0cVW8ItmXI=; b=dAvuRezOy5oX4YD+YXF55dtyTV Ry9OK2SsfSQMH7ZGIXHr9uXrTsZjsJ0Ry8s2BMf3WlsQZr3cMtBm+tiWbHYsqmw5kpUS6EtVxakDo 62rLCerX2CVsL4iDYIjcuuyf7; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:48806 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1j3jpS-004MeA-MQ; Mon, 17 Feb 2020 10:05:06 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [pushed] Fix gdbserver-without-gdb build Date: Mon, 17 Feb 2020 10:05:04 -0700 Message-Id: <20200217170504.4402-1-tom@tromey.com> An earlier patch changed gdbserver to use the already-built top-level gnulib and gdbsupport. However, if one did a build that did not include gdb, then gdbserver would fail to build. The problem is that configure.ac only adds gnulib and gdbsupport to the build when gdb is being built. This patch fixes the problem by arranging for this to happen when gdbserver is built. ChangeLog 2020-02-17 Tom Tromey * configure: Rebuild. * configure.ac (configdirs): Add gnulib and gdbsupport when building gdbserver. --- ChangeLog | 6 ++++++ configure | 18 +++++++++++------- configure.ac | 18 +++++++++++------- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/configure b/configure index 8a3e7026f0b..1c5403e9e4d 100755 --- a/configure +++ b/configure @@ -7360,13 +7360,17 @@ esac CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g` INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g` -# gdb depends on gnulib and gdbsupport, but as nothing else does, only -# include them if gdb is built. -if echo " ${configdirs} " | grep " gdb " > /dev/null 2>&1 ; then - # The Makefile provides the ordering, so it's enough here to add to - # the list. - configdirs="${configdirs} gnulib gdbsupport" -fi +# gdb and gdbserver depend on gnulib and gdbsupport, but as nothing +# else does, only include them if one of these is built. The Makefile +# provides the ordering, so it's enough here to add to the list. +case " ${configdirs} " in + *\ gdb\ *) + configdirs="${configdirs} gnulib gdbsupport" + ;; + *\ gdbserver\ *) + configdirs="${configdirs} gnulib gdbsupport" + ;; +esac # Strip out unwanted targets. diff --git a/configure.ac b/configure.ac index 35a9c1867d2..f3065091c26 100644 --- a/configure.ac +++ b/configure.ac @@ -2746,13 +2746,17 @@ esac CONFIGURE_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-configure-/g` INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g` -# gdb depends on gnulib and gdbsupport, but as nothing else does, only -# include them if gdb is built. -if echo " ${configdirs} " | grep " gdb " > /dev/null 2>&1 ; then - # The Makefile provides the ordering, so it's enough here to add to - # the list. - configdirs="${configdirs} gnulib gdbsupport" -fi +# gdb and gdbserver depend on gnulib and gdbsupport, but as nothing +# else does, only include them if one of these is built. The Makefile +# provides the ordering, so it's enough here to add to the list. +case " ${configdirs} " in + *\ gdb\ *) + configdirs="${configdirs} gnulib gdbsupport" + ;; + *\ gdbserver\ *) + configdirs="${configdirs} gnulib gdbsupport" + ;; +esac # Strip out unwanted targets.