This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)


On Monday, May 01 2017, Simon Marchi wrote:

>> +++ b/gdb/configure.nat
>> @@ -0,0 +1,591 @@
>> +# Copyright (C) 2013-2017 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/>.
>> +
>> +# 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
#
# NATDEPFILES - The depfiles to be compiled for this host
#
# NAT_CDEPS - Dynamic symbols to be exported for libthread_db
#
# LOADLIBES - Libraries that will be linked against GDB for this host
#
# MH_CFLAGS - Additional CFLAGS for this host
#
# XM_CLIBS - Host-dependent libs to be linked against GDB.
#
# NAT_GENERATED_FILES - Generated files by this host
#
# HAVE_NATIVE_GCORE_HOST - 
#
# NAT_EXTRA_FRAGS_FILE - File containing extra fragments of Makefile
#                        that will be used by this host.
#
# Notes:
#
# - To avoid shell expansion of variables, declare them with single
#   quotes.
#
# - NAT_EXTRA_FRAGS_FILE should contain the full path of the file.

>> +# - To avoid shell expansion of variables, declare them with single
>> +#   quotes.
>> +#
>> +# - NAT_EXTRA_FRAGS_FILE should contain the full path of the file.
>> +
>> +case ${gdb_host_cpu} in
>> +  aarch64)
>> +    case ${gdb_host} in
>> +      linux)
>> +	#  Host: AArch64 based machine running GNU/Linux
>> +	NAT_FILE='config/nm-linux.h'
>> +	NATDEPFILES='inf-ptrace.o fork-child.o aarch64-linux-nat.o
>> aarch32-linux-nat.o \
>> +		proc-service.o linux-thread-db.o linux-nat.o linux-fork.o \
>> +		linux-procfs.o linux-ptrace.o linux-osdata.o linux-waitpid.o \
>> +		linux-personality.o linux-namespaces.o aarch64-linux-hw-point.o \
>> +		aarch64-linux.o'
>
> 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.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]