From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1523 invoked by alias); 13 Jan 2015 16:54:57 -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 1484 invoked by uid 89); 13 Jan 2015 16:54:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 13 Jan 2015 16:54:54 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0DGsrOI001010 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 13 Jan 2015 11:54:53 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0DGsp0L015629; Tue, 13 Jan 2015 11:54:51 -0500 Message-ID: <54B54DDA.7070909@redhat.com> Date: Tue, 13 Jan 2015 16:54:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Sergio Durigan Junior , GDB Patches CC: Gary Benson Subject: Re: [PATCH 1/2] Move safe_strerror to common/ References: <1420841943-24290-1-git-send-email-sergiodj@redhat.com> <1420841943-24290-2-git-send-email-sergiodj@redhat.com> In-Reply-To: <1420841943-24290-2-git-send-email-sergiodj@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-01/txt/msg00347.txt.bz2 On 01/09/2015 10:19 PM, Sergio Durigan Junior wrote: > This patch moves safe_strerror from the gdb/{posix,mingw}-hdep.c files > to the respective common/{posix,mingw}-strerror.c files. This is a > preparation for the next patch, which shares a common code (to disable > address space randomization when creating a new inferior). > > The patch has been regtested on Fedora 20 x86_64, and no regressions > were found. I am assuming the MingW modifications are also safe, but > I have not checked them too deep. Note, it's "MinGW", capital G. There are instances in the patch of the typo. > > --- /dev/null > +++ b/gdb/common/common.host > @@ -0,0 +1,17 @@ > +# Mapping of configurations into GDB host definitions. This is > +# invoked from the autoconf generated configure script. Copyright header missing. I don't know why configure.host doesn't have one. Seems like an oversight. > + > +# This file sets the following shell variables: > +# gdb_host_obs host-specific .o files to include when building GDB > +# srv_host_obs likewise, but when building gdbserver > + > +case "${host}" in > + > +i[34567]86-*-mingw32*) gdb_host_obs="mingw-hdep.o mingw-strerror.o" > + srv_host_obs="mingw-strerror.o" > + ;; > +x86_64-*-mingw*) gdb_host_obs="mingw-hdep.o mingw-strerror.o" > + srv_host_obs="mingw-strerror.o" > + ;; You can merge those two cases. Let's leave gdb-specific details in gdb proper, etc. That is, make this file set a common-specific variable, like: case "${host}" in *-mingw*) common_host_obs=mingw-strerror.o ;; *) common_host_obs=posix-strerror.o ;; ecas And then in configure.ac, do: . $srcdir/common/common.host gdb_host_obs=$gdb_host_obs $common_host_obs Thanks, Pedro Alves