From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 64496 invoked by alias); 4 May 2017 16:34:47 -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 64485 invoked by uid 89); 4 May 2017 16:34:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=one's, Hx-languages-length:1291 X-HELO: mail-wr0-f180.google.com Received: from mail-wr0-f180.google.com (HELO mail-wr0-f180.google.com) (209.85.128.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 May 2017 16:34:45 +0000 Received: by mail-wr0-f180.google.com with SMTP id l9so10918128wre.1 for ; Thu, 04 May 2017 09:34:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=1gOqYsDBLHn45Dy7z0VOzTr0tdLfzBou6DmvoO17V9g=; b=HImPMOXwnobZKRFJnvsWeeI2iMH5P8z8NHIoDSiUBbRPXpW7ikJl3+OuI8HV/Vm6cL /Ljj65EaFb+pV9bCgqpzEC147vZEm6472U7+Bp1FOkfS+xhm9V4DfJftGtWeJXH1K+U7 fWyESXaDYb7WzexzMRVA2xLyjo9rscioFrUeTjeHAtUaRlZcknUIN8c4lfW9+9EYJRDB TqRuGRjH912LKY1SeB5mMQ1O/dLTZWYF8fG3+aeE9R3lrezNo0LxJq0dySHzC7bSs1cI R2gtdj4fApC4U3SA8QVhZ8SCyBQl4udmHMbcJX6CBCa52rncFDpyvQSUScbqJlUMqzkI rkmA== X-Gm-Message-State: AN3rC/5MlaxYykvwPEn3dEB1PL9OENnRTBnPtMOUDY7XbEn2j5Fs0ZSs 75mBSZNMgc8ZezJ7jq6+hw== X-Received: by 10.223.157.11 with SMTP id k11mr27274816wre.71.1493915686000; Thu, 04 May 2017 09:34:46 -0700 (PDT) Received: from [192.168.0.102] ([37.189.166.198]) by smtp.gmail.com with ESMTPSA id m38sm3354023wrm.4.2017.05.04.09.34.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 May 2017 09:34:44 -0700 (PDT) Subject: Re: [PATCH v2 2/2] Rearrange gdb/configure.nat to make it simpler and less redundant To: Sergio Durigan Junior , GDB Patches References: <20170425202309.15771-1-sergiodj@redhat.com> <20170503034931.4515-1-sergiodj@redhat.com> <20170503034931.4515-3-sergiodj@redhat.com> Cc: Simon Marchi , John Baldwin From: Pedro Alves Message-ID: <4232d2a4-1199-f258-1fb4-80e6c934971d@redhat.com> Date: Thu, 04 May 2017 16:34:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170503034931.4515-3-sergiodj@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-05/txt/msg00115.txt.bz2 On 05/03/2017 04:49 AM, 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. > > yyyy-mm-dd Sergio Durigan Junior > > * configure.nat: Rearrange 'case' statements to make the code > simpler and less redundant. Should probably say instead: * configure.nat: Rearrange 'case' statements to match host before cpu. This one's OK with that and with the nit John pointed out fixed. Please make sure that a build that _doesn't_ include the native target still builds before pushing. Thanks, Pedro Alves