From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112416 invoked by alias); 5 May 2017 04:23:01 -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 106992 invoked by uid 89); 5 May 2017 04:22:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Thursday X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 05 May 2017 04:22:52 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6064C3D954; Fri, 5 May 2017 04:22:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6064C3D954 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=sergiodj@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6064C3D954 Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 368C479583; Fri, 5 May 2017 04:22:53 +0000 (UTC) From: Sergio Durigan Junior To: Pedro Alves Cc: GDB Patches , Simon Marchi , John Baldwin Subject: Re: [PATCH v2 2/2] Rearrange gdb/configure.nat to make it simpler and less redundant References: <20170425202309.15771-1-sergiodj@redhat.com> <20170503034931.4515-1-sergiodj@redhat.com> <20170503034931.4515-3-sergiodj@redhat.com> <4232d2a4-1199-f258-1fb4-80e6c934971d@redhat.com> Date: Fri, 05 May 2017 04:23:00 -0000 In-Reply-To: <4232d2a4-1199-f258-1fb4-80e6c934971d@redhat.com> (Pedro Alves's message of "Thu, 4 May 2017 17:34:44 +0100") Message-ID: <87lgqcylsz.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2017-05/txt/msg00135.txt.bz2 On Thursday, May 04 2017, Pedro Alves wrote: > 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. Thanks, I updated the ChangeLog entry accordingly. > Please make sure that a build that _doesn't_ include the > native target still builds before pushing. Tested compiling with --enable-targets=aarch64-unknown-linux and it worked as expected. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/