From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27451 invoked by alias); 3 May 2017 16:45:46 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 27012 invoked by uid 89); 3 May 2017 16:45:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy= X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 May 2017 16:45:33 +0000 Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 3425010A82D; Wed, 3 May 2017 12:45:32 -0400 (EDT) From: John Baldwin To: Sergio Durigan Junior Cc: GDB Patches , Pedro Alves , Simon Marchi Subject: Re: [PATCH v2 2/2] Rearrange gdb/configure.nat to make it simpler and less redundant Date: Wed, 03 May 2017 16:45:00 -0000 Message-ID: <13974428.RlsgoICUZ5@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170503034931.4515-3-sergiodj@redhat.com> References: <20170425202309.15771-1-sergiodj@redhat.com> <20170503034931.4515-1-sergiodj@redhat.com> <20170503034931.4515-3-sergiodj@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00068.txt.bz2 On Tuesday, May 02, 2017 11:49:31 PM Sergio Durigan Junior wrote: > The previous commit introduced gdb/configure.nat, but it was just a > copy-and-past (with the necessary adjustments) from the files under > gdb/config/. We can do better than that. > > Instead of using one big 'case' statement that matches the > ${gdb_host_cpu} and then match each ${gdb_host}, it is possible to > remove a lof of redundancy by matching the most common ${gdb_host}'s > first, setting the common variables for each, and then proceed to > matching specific ${gdb_host}'s and ${gdb_host_cpu}'s. In other > words, reverse the order of the 'case's and take advantage of the fact > that a lot of parameters are the same for each host. > > This commit was tested on x86_64 without regressions. Thanks. Just one minor nit that I see: > + fbsd) > + case ${gdb_host_cpu} in > + i386) > + # Host: FreeBSD/i386 > + NATDEPFILES="${NATDEPFILES} x86-nat.o x86-dregs.o \ > + x86-bsd-nat.o i386-bsd-nat.o i386-fbsd-nat.o bsd-kvm.o" > + NAT_FILE='nm-fbsd.h' > + ;; > + mips) > + # Host: FreeBSD/mips > + NATDEPFILES="${NATDEPFILES} mips-fbsd-nat.o" > + HAVE_NATIVE_GCORE_HOST=1 This seems redundant as it is set in the "global" fbsd section? > + LOADLIBES= > + ;; -- John Baldwin