From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74604 invoked by alias); 2 May 2017 22:17:12 -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 74595 invoked by uid 89); 2 May 2017 22:17:12 -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=adopted 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; Tue, 02 May 2017 22:17:09 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 263F7C04B31F; Tue, 2 May 2017 22:17:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 263F7C04B31F Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=sergiodj@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 263F7C04B31F Received: from localhost (unused-10-15-17-193.yyz.redhat.com [10.15.17.193]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F049E173B1; Tue, 2 May 2017 22:17:09 +0000 (UTC) From: Sergio Durigan Junior To: Simon Marchi Cc: GDB Patches , Pedro Alves , John Baldwin Subject: Re: [PATCH] Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files) References: <20170425202309.15771-1-sergiodj@redhat.com> <8737cngise.fsf@redhat.com> X-URL: https://sergiodj.net Date: Tue, 02 May 2017 22:17:00 -0000 In-Reply-To: (Simon Marchi's message of "Tue, 02 May 2017 16:16:27 -0400") Message-ID: <87wp9ygaze.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/msg00031.txt.bz2 On Tuesday, May 02 2017, Simon Marchi wrote: > On 2017-05-02 15:28, Sergio Durigan Junior wrote: >>>> +# Variables defined here: >>>> +# >>>> +# NAT_FILE >>>> +# NATDEPFILES >>>> +# NAT_CDEPS >>>> +# LOADLIBES >>>> +# MH_CFLAGS >>>> +# XM_CLIBS >>>> +# NAT_GENERATED_FILES >>>> +# HAVE_NATIVE_GCORE_HOST >>>> +# NAT_EXTRA_FRAGS_FILE >>> >>> Could you document (if you know it) what each variable does? >> >> Sure. Here's what I know what them. What do you think? >> >> # Variables defined here: >> # >> # NAT_FILE - The header file with definitions for this host > > Looks good. > >> # >> # NATDEPFILES - The depfiles to be compiled for this host > > "depfiles" is not so clear I think. Perhaps > > NATDEPFILES - Source files required for native debugging on this host. Adopted. >> # >> # NAT_CDEPS - Dynamic symbols to be exported for libthread_db > > Looks good. > >> # >> # LOADLIBES - Libraries that will be linked against GDB for this host > > Don't we usually say the reverse, the program is linked against the > libraries? > > LOADLIBES - Libraries against which GDB will be linked for this host. You're right. Fixed. >> # >> # MH_CFLAGS - Additional CFLAGS for this host > > Looks good. > >> # >> # XM_CLIBS - Host-dependent libs to be linked against GDB. > > Same comment about "linked against". Fixed. >> # NAT_GENERATED_FILES - Generated files by this host > > by -> for? > > NAT_GENERATED_FILES - Generated files for this host. Right, fixed. >> # HAVE_NATIVE_GCORE_HOST - > > I just noticed that this variable is not defined in Makefile.in. > configure.ac AC_SUBST's _TARGET twice, but not _HOST, so I think you > confused them. Yeah, I did confuse. Fixed on gdb/Makefile.in. > But to be honest, I am also completely confused by what those two > variables do. So, doing a bit of archaeology I found that these flags were added by b292c7831823605b02a564b0a9274f95141c92ee. According to the discussions relevant to this commit (), I see that these flags serve to signalize whether the gcore script will be installed or not. >> # NAT_EXTRA_FRAGS_FILE - Extra Makefile fragmentsFile containing >> extra fragments of Makefile >> # that will be used by this host. > > That could be shortened to > > NAT_EXTRA_FRAGS_FILE - Extra Makefile fragments that will be used > for this host. Hm, not sure. My intention was to make it clear that this variable needs to contain a filename. Your proposed description could be interpreted differently, I'm afraid. > Make sure they all end (or don't end) with a period, for consistency. Sure; this was just a quick draft, I fixed the inconsistencies now :-). > Perhaps someone could shed some light on the obscure variables names? > What do the XM_ and MH_ prefixes stand for? What's the difference > between XM_CLIBS and LOADLIBES (and why is it called "LIBES"?) ? Good question, I was also wondering that myself :-). >>> IMO, the interest of having all of this in a single file is to be able >>> to factor out common things. A lot of NATDEPFILES are repeated Would >>> it be possible to have a switch on ${gdb_host} at the top level, and >>> specify all the files specific to OSes but machine-agnostic? For >>> example, fork-child.o and inf-ptrace.o probably appear in all the >>> linux ports. >> >> Fair point. I will address what you and Jon mentioned, and resubmit >> the >> patch with the modifications. > > Ok. But as John mentioned, it's probably better if this patch is a > simple translation of what's already there, and any "optimization" > coming in a subsequent patch. It will be easier to track the changes. Sure. I'll send a series of 2 patches, the first one containing the original patch (+ the proposed modifications by you and Pedro), and the second one containing the rearrangement to make things clearer. Cheers, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/