public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>,
	Gary Benson <gbenson@redhat.com>
Subject: Re: [PATCH 1/2] Move safe_strerror to common/
Date: Wed, 14 Jan 2015 11:26:00 -0000	[thread overview]
Message-ID: <54B6525B.6080308@redhat.com> (raw)
In-Reply-To: <87oaq2iezj.fsf@redhat.com>

> 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 <http://www.gnu.org/licenses/>.
> +
> +# 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

  reply	other threads:[~2015-01-14 11:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-09 22:19 [PATCH 0/2] Share code to disable ASR between GDB and gdbserver Sergio Durigan Junior
2015-01-09 22:19 ` [PATCH 2/2] Move code to disable ASR to nat/ Sergio Durigan Junior
2015-01-13 17:11   ` Pedro Alves
2015-01-13 20:55     ` Sergio Durigan Junior
2015-01-14 11:32       ` Pedro Alves
2015-01-15  7:06         ` Sergio Durigan Junior
2015-01-16  0:04         ` Sergio Durigan Junior
2015-01-16 15:39   ` Ulrich Weigand
2015-01-16 16:47     ` [PATCH][commit] Fix regression on RHEL-5 systems (was: Re: [PATCH 2/2] Move code to disable ASR to nat/) Sergio Durigan Junior
2015-01-19 19:16       ` Ulrich Weigand
2015-01-09 22:19 ` [PATCH 1/2] Move safe_strerror to common/ Sergio Durigan Junior
2015-01-13 16:54   ` Pedro Alves
2015-01-13 20:48     ` Sergio Durigan Junior
2015-01-14 11:26       ` Pedro Alves [this message]
2015-01-15  7:05         ` Sergio Durigan Junior
2015-01-15  9:02           ` Pedro Alves
2015-01-16  0:04             ` Sergio Durigan Junior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B6525B.6080308@redhat.com \
    --to=palves@redhat.com \
    --cc=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sergiodj@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).