Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)
authorSergio Durigan Junior <sergiodj@redhat.com>
Tue, 25 Apr 2017 20:03:39 +0000 (16:03 -0400)
committerSergio Durigan Junior <sergiodj@redhat.com>
Sat, 6 May 2017 14:09:35 +0000 (10:09 -0400)
commit21ea5acdd1bcfe89984b16b5bac730050c5cf05e
tree809ad29ca60ce7984813d98d3aa6d4a84b72aee6
parent7b937cba77df45962ced7e0e03802561beab549f
Introduce "gdb/configure.nat" (and delete "gdb/config/*/*.mh" files)

Due to my ongoing work to make it possible for gdbserver to start the
inferior using the shell, I had to share the fork_inferior function
under the "nat/" directory.  In order to do that, I created a new file
and put the function there; however, this meant that I now had to
update some of the *.mh files (under "gdb/config") and add the new
file as a dependency to be built natively.  Bleh...

After talking a bit to Pedro about this, the idea came up to write a
new "gdb/configure.nat" file, a la "gdb/configure.tgt", which would
concentrate all of the native settings for each host/system.  I
decided to tackle this issue.

The patch is simple.  All of the previous Makefile variables that were
being declared inside the *.mh files are now inside "gdb/Makefile.in",
and "gdb/configure" is responsible for AC_SUBST'ing them.  The
definitions of these variables were put inside "gdb/configure.nat", so
now they're shell variables.  For excerpts of Makefile code, one must
create a file under "gdb/config/${gdb_cpu_host}" and reference it on
the "nat_extra_makefile_frag" variable.

It should now be easier to update the native dependencies of hosts in
this single file.

This has been tested on x86_64 without regressions.

gdb/ChangeLog:
2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>

* Makefile.in: Remove "@host_makefile_frag@".  Add variables
NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
"@nat_extra_makefile_frag@".
(Makefile): Remove dependency on "@frags@".
($(GNULIB_BUILDDIR)/Makefile): Likewise.
(data-directory/Makefile): Likewise.
* config/aarch64/linux.mh: Deleted; moved contents to
"gdb/configure.nat".
* config/alpha/alpha-linux.mh: Likewise.
* config/alpha/nbsd.mh: Likewise.
* config/arm/linux.mh: Likewise.
* config/arm/nbsdelf.mh: Likewise.
* config/i386/cygwin.mh: Likewise.
* config/i386/cygwin64.mh: Likewise.
* config/i386/darwin.mh: Likewise.
* config/i386/fbsd.mh: Likewise.
* config/i386/fbsd64.mh: Likewise.
* config/i386/go32.mh: Likewise.
* config/i386/i386gnu.mh: Likewise.
* config/i386/i386sol2.mh: Likewise.
* config/i386/linux.mh: Likewise.
* config/i386/linux64.mh: Likewise.
* config/i386/mingw.mh: Likewise.
* config/i386/mingw64.mh: Likewise.
* config/i386/nbsd64.mh: Likewise.
* config/i386/nbsdelf.mh: Likewise.
* config/i386/nto.mh: Likewise.
* config/i386/obsd.mh: Likewise.
* config/i386/obsd64.mh: Likewise.
* config/i386/sol2-64.mh: Likewise.
* config/ia64/linux.mh: Likewise.
* config/m32r/linux.mh: Likewise.
* config/m68k/linux.mh: Likewise.
* config/m68k/nbsdelf.mh: Likewise.
* config/m68k/obsd.mh: Likewise.
* config/m88k/obsd.mh: Likewise.
* config/mips/fbsd.mh: Likewise.
* config/mips/linux.mh: Likewise.
* config/mips/nbsd.mh: Likewise.
* config/mips/obsd64.mh: Likewise.
* config/pa/linux.mh: Likewise.
* config/pa/nbsd.mh: Likewise.
* config/pa/obsd.mh: Likewise.
* config/powerpc/aix.mh: Likewise.
* config/powerpc/fbsd.mh: Likewise.
* config/powerpc/linux.mh: Likewise.
* config/powerpc/nbsd.mh: Likewise.
* config/powerpc/obsd.mh: Likewise.
* config/powerpc/ppc64-linux.mh: Likewise.
* config/powerpc/spu-linux.mh: Likewise.
* config/s390/linux.mh: Likewise.
* config/sh/nbsd.mh: Likewise.
* config/sparc/fbsd.mh: Likewise.
* config/sparc/linux.mh: Likewise.
* config/sparc/linux64.mh: Likewise.
* config/sparc/nbsd64.mh: Likewise.
* config/sparc/nbsdelf.mh: Likewise.
* config/sparc/obsd64.mh: Likewise.
* config/sparc/sol2.mh: Likewise.
* config/tilegx/linux.mh: Likewise.
* config/vax/nbsdelf.mh: Likewise.
* config/vax/obsd.mh: Likewise.
* config/xtensa/linux.mh: Likewise.
* config/i386/i386gnu.mn: New file, with excerpts from
"config/i386/i386gnu.mh".
* configure: Regenerate.
* configure.ac: Rewrite code to use "gdb/configure.nat" instead of
*.mh files under "gdb/config".
* configure.nat: New file, with contents from the
"gdb/config/*/*.mh" files.

gdb/doc/ChangeLog:
2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>

* Makefile: Remove "@host_makefile_frag@".
64 files changed:
gdb/ChangeLog
gdb/Makefile.in
gdb/config/aarch64/linux.mh [deleted file]
gdb/config/alpha/alpha-linux.mh [deleted file]
gdb/config/alpha/nbsd.mh [deleted file]
gdb/config/arm/linux.mh [deleted file]
gdb/config/arm/nbsdelf.mh [deleted file]
gdb/config/i386/cygwin.mh [deleted file]
gdb/config/i386/cygwin64.mh [deleted file]
gdb/config/i386/darwin.mh [deleted file]
gdb/config/i386/fbsd.mh [deleted file]
gdb/config/i386/fbsd64.mh [deleted file]
gdb/config/i386/go32.mh [deleted file]
gdb/config/i386/i386gnu.mh [deleted file]
gdb/config/i386/i386gnu.mn [new file with mode: 0644]
gdb/config/i386/i386sol2.mh [deleted file]
gdb/config/i386/linux.mh [deleted file]
gdb/config/i386/linux64.mh [deleted file]
gdb/config/i386/mingw.mh [deleted file]
gdb/config/i386/mingw64.mh [deleted file]
gdb/config/i386/nbsd64.mh [deleted file]
gdb/config/i386/nbsdelf.mh [deleted file]
gdb/config/i386/nto.mh [deleted file]
gdb/config/i386/obsd.mh [deleted file]
gdb/config/i386/obsd64.mh [deleted file]
gdb/config/i386/sol2-64.mh [deleted file]
gdb/config/ia64/linux.mh [deleted file]
gdb/config/m32r/linux.mh [deleted file]
gdb/config/m68k/linux.mh [deleted file]
gdb/config/m68k/nbsdelf.mh [deleted file]
gdb/config/m68k/obsd.mh [deleted file]
gdb/config/m88k/obsd.mh [deleted file]
gdb/config/mips/fbsd.mh [deleted file]
gdb/config/mips/linux.mh [deleted file]
gdb/config/mips/nbsd.mh [deleted file]
gdb/config/mips/obsd64.mh [deleted file]
gdb/config/pa/linux.mh [deleted file]
gdb/config/pa/nbsd.mh [deleted file]
gdb/config/pa/obsd.mh [deleted file]
gdb/config/powerpc/aix.mh [deleted file]
gdb/config/powerpc/fbsd.mh [deleted file]
gdb/config/powerpc/linux.mh [deleted file]
gdb/config/powerpc/nbsd.mh [deleted file]
gdb/config/powerpc/obsd.mh [deleted file]
gdb/config/powerpc/ppc64-linux.mh [deleted file]
gdb/config/powerpc/spu-linux.mh [deleted file]
gdb/config/s390/linux.mh [deleted file]
gdb/config/sh/nbsd.mh [deleted file]
gdb/config/sparc/fbsd.mh [deleted file]
gdb/config/sparc/linux.mh [deleted file]
gdb/config/sparc/linux64.mh [deleted file]
gdb/config/sparc/nbsd64.mh [deleted file]
gdb/config/sparc/nbsdelf.mh [deleted file]
gdb/config/sparc/obsd64.mh [deleted file]
gdb/config/sparc/sol2.mh [deleted file]
gdb/config/tilegx/linux.mh [deleted file]
gdb/config/vax/nbsdelf.mh [deleted file]
gdb/config/vax/obsd.mh [deleted file]
gdb/config/xtensa/linux.mh [deleted file]
gdb/configure
gdb/configure.ac
gdb/configure.nat [new file with mode: 0644]
gdb/doc/Makefile.in
gdb/gdbserver/ChangeLog