From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24500 invoked by alias); 14 Jan 2015 11:26:26 -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 24486 invoked by uid 89); 14 Jan 2015 11:26:25 -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; Wed, 14 Jan 2015 11:26:23 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0EBQLmx016108 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 14 Jan 2015 06:26:22 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0EBQKmr030091; Wed, 14 Jan 2015 06:26:20 -0500 Message-ID: <54B6525B.6080308@redhat.com> Date: Wed, 14 Jan 2015 11:26: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 CC: GDB Patches , 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> <54B54DDA.7070909@redhat.com> <87oaq2iezj.fsf@redhat.com> In-Reply-To: <87oaq2iezj.fsf@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-01/txt/msg00368.txt.bz2 > diff --git a/gdb/common/common.host b/gdb/common/common.host > new file mode 100644 > index 0000000..1c3374a > --- /dev/null > +++ b/gdb/common/common.host > @@ -0,0 +1,35 @@ > +# Common object files to include for each host. > +# > +# Copyright (C) 2015 Free Software Foundation, Inc. > +# > +# This file is part of GDB. > +# > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 3 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see . > + > +# Mapping of configurations into GDB host definitions. This comment isn't right. > This is > +# invoked from the autoconf generated configure script. > + > +# 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 This one is stale. Should describe common_host_obs. > + > +case "${host}" in > + > +*-mingw*) common_host_obs=mingw-strerror.o > + ;; > +*) > + common_host_obs=posix-strerror.o > + ;; > + > +esac > diff --git a/gdb/configure.ac b/gdb/configure.ac > index ec776d7..7812ec6 100644 > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -195,7 +195,7 @@ esac],[want64=false])dnl > > # Provide defaults for some variables set by the per-host and per-target > # configuration. > -gdb_host_obs=posix-hdep.o > +gdb_host_obs="posix-hdep.o" Unnecessary change. > > if test "${target}" = "${host}"; then > gdb_native=yes > @@ -204,6 +204,9 @@ else > fi > > . $srcdir/configure.host > +. $srcdir/common/common.host > + > +gdb_host_obs="$gdb_host_obs $common_host_obs" > I'd rather that it was the latter two lines that were together, like: . $srcdir/configure.host # Add in the common host objects. . $srcdir/common/common.host gdb_host_obs="$gdb_host_obs $common_host_obs" > # Accumulate some settings from configure.tgt over all enabled targets > > diff --git a/gdb/configure.host b/gdb/configure.host > index d07be4b..9f8a917 100644 > --- a/gdb/configure.host > +++ b/gdb/configure.host > @@ -7,7 +7,6 @@ > # gdb_host_float_format host's float floatformat, or 0 > # gdb_host_double_format host's double floatformat, or 0 > # gdb_host_long_double_format host's long double floatformat, or 0 > -# gdb_host_obs host-specific .o files to include > > # Map host cpu into the config cpu subdirectory name. > # The default is $host_cpu. > @@ -105,7 +104,6 @@ i[34567]86-*-netbsdelf* | i[34567]86-*-knetbsd*-gnu) > gdb_host=nbsdelf ;; > i[34567]86-*-go32*) gdb_host=go32 ;; > i[34567]86-*-mingw32*) gdb_host=mingw > - gdb_host_obs=mingw-hdep.o > ;; > i[34567]86-*-msdosdjgpp*) gdb_host=go32 ;; > i[34567]86-*-linux*) gdb_host=linux ;; > @@ -181,7 +179,6 @@ x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu) > gdb_host=nbsd64 ;; > x86_64-*-openbsd*) gdb_host=obsd64 ;; > x86_64-*-mingw*) gdb_host=mingw64 > - gdb_host_obs=mingw-hdep.o > ;; > x86_64-*-cygwin*) gdb_host=cygwin64 ;; > m32r*-*-linux*) gdb_host=linux ;; Given mingw-hdep.o still exists and must be included in the mingw gdb build, this must be breaking the build there. Just drop this hunk from the patch. Could you make sure the mingw build still builds? There are mingw packages in Fedora. (configure with --host=x86_64-w64-mingw32). > --- a/gdb/gdbserver/configure.ac > +++ b/gdb/gdbserver/configure.ac > @@ -240,7 +240,14 @@ got it > ;; > esac > > +# Initialize as POSIX. This will change if the host is MinGW. Drop this comment. > + > +srv_host_obs="" We don't actually need this. > + > . ${srcdir}/configure.srv > +. ${srcdir}/../common/common.host > + > +srv_host_obs="$srv_host_obs $common_host_obs" Like in the GDB version: . ${srcdir}/configure.srv # Add in the common host objects. . ${srcdir}/../common/common.host srv_host_obs=$common_host_obs But you can also drop srv_host_obs and write common_host_obs directly below. > > if test "${srv_mingwce}" = "yes"; then > LIBS="$LIBS -lws2" > @@ -385,7 +392,7 @@ if test "$srv_xmlfiles" != ""; then > done > fi > > -GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles" > +GDBSERVER_DEPFILES="$srv_regobj $srv_tgtobj $srv_hostio_err_objs $srv_thread_depfiles $srv_host_obs" > GDBSERVER_LIBS="$srv_libs" > > dnl Check whether the target supports __sync_*_compare_and_swap. Thanks, Pedro Alves