From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52206 invoked by alias); 25 Apr 2017 21:08:27 -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 52194 invoked by uid 89); 25 Apr 2017 21:08:27 -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; Tue, 25 Apr 2017 21:08:26 +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 61FBC10A7B9; Tue, 25 Apr 2017 17:08:26 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Cc: Sergio Durigan Junior , Pedro Alves Subject: Re: [PATCH] Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files) Date: Tue, 25 Apr 2017 21:08:00 -0000 Message-ID: <12775412.SInR7HWiOS@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-STABLE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20170425202309.15771-1-sergiodj@redhat.com> References: <20170425202309.15771-1-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-04/txt/msg00697.txt.bz2 On Tuesday, April 25, 2017 04:23:09 PM Sergio Durigan Junior wrote: > Due to my ongoing work to make it possible for gdbserver to start the > inferior using the shell, I had to share the fork_inferior function > under the "nat/" directory. In order to do that, I created a new file > and put the function there; however, this meant that I now had to > update some of the *.mh files (under "gdb/config") and add the new > file as a dependency to be built natively. Bleh... > > After talking a bit to Pedro about this, the idea came up to write a > new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would > concentrate all of the native settings for each host/system. I > decided to tackle this issue. > > The patch is simple. All of the previous Makefile variables that were > being declared inside the *.mh files are now inside "gdb/Makefile.in", > and "gdb/configure" is responsible for AC_SUBST'ing them. The > definitions of these variables were put inside "gdb/configure.nat", so > now they're shell variables. For excerpts of Makefile code, one must > create a file under "gdb/config/${gdb_cpu_host}" and reference it on > the "NAT_EXTRA_FRAGS_FILE" variable. > > It should now be easier to update the native dependencies of hosts in > this single file. > > This has been tested on x86_64 without regressions. The FreeBSD-related bits all look correct to me. I do think this is easier to work with than the various *.mh files. -- John Baldwin