Commit Graph

1277 Commits

Author SHA1 Message Date
Jose E. Marchesi
6aa03e9c17 gprofng: avoid using `fallthrough' attributes
gprofng didn't build with gcc 6.3 due to the usage of __attribute__
((fallthrough)).  This patch uses /* FALLTHROUGH */ instead.

2022-03-15  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* gprofng/src/gp-collect-app.cc (collect::check_args): Use
	fallthrough comment instead of attribute.
2022-03-15 21:04:57 +01:00
Vladimir Mezentsev
bb368aad29 gprofng: a new GNU profiler
top-level
	* Makefile.def: Add gprofng module.
	* configure.ac: Add --enable-gprofng option.
	* src-release.sh: Add gprofng.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* gprofng: New directory.

binutils
	* MAINTAINERS: Add gprofng maintainer.
	* README-how-to-make-a-release: Add gprofng.

include.
	* collectorAPI.h: New file.
	* libcollector.h: New file.
	* libfcollector.h: New file.
2022-03-11 08:58:31 +00:00
Nick Clifton
a74e1cb344 Add markers for 2.38 branch 2022-01-22 12:08:55 +00:00
Nick Clifton
6c037fdbf0 Update the config.guess and config.sub files from the master repository and regenerate files. 2022-01-17 16:21:22 +00:00
Enze Li
91b7c7e522 Document "memory-tag-violations".
* gdb/doc/gdb.texinfo: (Data): Document	'-memory-tag-violations'.
 (Command Options): Update the example.
2021-10-29 13:31:37 +03:00
Andrew Burgess
890026e317 src-release.sh: add libbacktrace to GDB_SUPPORT_DIRS
After the previous commit that imported libbacktrace from gcc, this
commit updates src-release.sh so that the libbacktrace directory is
included in the gdb release tar file.

ChangeLog:

	* src-release.sh (GDB_SUPPPORT_DIRS): Add libbacktrace.
2021-09-28 12:21:21 +01:00
Nick Alcock
bef9ef8ca0 libtool.m4: fix nm BSD flag detection
Libtool needs to get BSD-format (or MS-format) output out of the system
nm, so that it can scan generated object files for symbol names for
-export-symbols-regex support.  Some nms need specific flags to turn on
BSD-formatted output, so libtool checks for this in its AC_PATH_NM.
Unfortunately the code to do this has a pair of interlocking flaws:

 - it runs the test by doing an nm of /dev/null.  Some platforms
   reasonably refuse to do an nm on a device file, but before now this
   has only been worked around by assuming that the error message has a
   specific textual form emitted by Tru64 nm, and that getting this
   error means this is Tru64 nm and that nm -B would work to produce
   BSD-format output, even though the test never actually got anything
   but an error message out of nm -B.  This is fixable by nm'ing *nm
   itself* (since we necessarily have a path to it).

 - the test is entirely skipped if NM is set in the environment, on the
   grounds that the user has overridden the test: but the user cannot
   reasonably be expected to know that libtool wants not only nm but
   also flags forcing BSD-format output.  Worse yet, one such "user" is
   the top-level Cygnus configure script, which neither tests for
   nor specifies any BSD-format flags.  So platforms needing BSD-format
   flags always fail to set them when run in a Cygnus tree, breaking
   -export-symbols-regex on such platforms.  Libtool also needs to
   augment $LD on some platforms, but this is done unconditionally,
   augmenting whatever the user specified: the nm check should do the
   same.

   One wrinkle: if the user has overridden $NM, a path might have been
   provided: so we use the user-specified path if there was one, and
   otherwise do the path search as usual.  (If the nm specified doesn't
   work, this might lead to a few extra pointless path searches -- but
   the test is going to fail anyway, so that's not a problem.)

(Tested with NM unset, and set to nm, /usr/bin/nm, my-nm where my-nm is a
symlink to /usr/bin/nm on the PATH, and /not-on-the-path/my-nm where
*that* is a symlink to /usr/bin/nm.)

ChangeLog
2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	PR libctf/27967
	* libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided
	NM, if there is one.  Run nm on itself, not on /dev/null, to avoid
	errors from nms that refuse to work on non-regular files.  Remove
	other workarounds for this problem.  Strip out blank lines from the
	nm output.
2021-09-27 20:31:23 +01:00
Nick Alcock
bc4b140112 libtool.m4: augment symcode for Solaris 11
This reports common symbols like GNU nm, via a type code of 'C'.

ChangeLog
2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	PR libctf/27967
	* libtool.m4 (lt_cv_sys_global_symbol_pipe): Augment symcode for
	Solaris 11.
2021-09-27 20:31:23 +01:00
Nick Clifton
514192487e Add markers for 2.37 branch 2021-07-03 14:50:57 +01:00
Nick Clifton
20c4b12e93 Synchronize libiberty sources (and include/demangle.h) with GCC master version 2021-07-03 14:00:33 +01:00
Mike Frysinger
5c9e84c2d8 sim: leverage gnulib
We use getline, so leverage gnulib to provide fallback implementation.
2021-05-29 11:56:43 -04:00
Maciej W. Rozycki
78a7f5766a MAINTAINERS: Update path to readline config.{sub,guess} files
Complement commit 6999161a2a ("Move readline to the readline/readline
subdirectory") and update the path to readline config.{sub,guess} files
documented in MAINTAINERS.

	* MAINTAINERS: Update path to readline config.{sub,guess} files.
2021-05-24 18:11:49 +02:00
Maciej W. Rozycki
2e8adb6448 Update config.sub and config.guess for MIPS R3 and R5 ISA support
Complement commit ae52f48306 ("Add MIPS r3 and r5 support.") and get
changes for config.sub to recognize MIPS CPU patterns for the R3 and R5
ISA levels, used by GAS to set defaults in gas/configure.ac.  Oddly, R6
ISA support has been correctly added already.

	/
	* config.guess: Import from upstream.
	* config.sub: Likewise.

	readline/
	* readline/support/config.guess: Import from upstream.
	* readline/support/config.sub: Likewise.
2021-05-24 18:11:49 +02:00
Mike Frysinger
9cc11ab5bf sim: depend on gnulib
We're going to start using gnulib in the sim, so make sure it exists.

ChangeLog:

	* Makefile.def: Add configure-sim dependency on all-gnulib.
	* Makefile.in: Regenerated.
2021-05-18 17:47:27 -04:00
Nick Clifton
a8d6316b67 Replace AC_PROG_CC with AC_PROG_CC_C99 in top level configure file.
2021-05-04  Nick Clifton  <nickc@redhat.com>

	* configure.ac (AC_PROG_CC): Replace with AC_PROG_CC_C99.
	* configure: Regenerate.
2021-05-04 13:40:34 +01:00
Nick Alcock
755ba58ebe Add install dependencies for ld -> bfd and libctf -> bfd
This stops problems parallel-installing if a relink of libctf is needed.

Also adds corresponding install-strip dependencies.

ChangeLog
2021-03-18  Nick Alcock  <nick.alcock@oracle.com>

	PR libctf/27482
	* Makefile.def: Add install-bfd dependencies for install-libctf and
	install-ld, and install-strip-bfd dependencies for
	install-strip-libctf and install-strip-ld; move the install-ld
	dependency on install-libctf to join it.
	* Makefile.in: Regenerated.
2021-03-18 12:40:40 +00:00
Mike Frysinger
367c5eb750 sim: drop dep on configure-gdb
I'm not entirely sure why this is here since the sim doesn't use
anything from the gdb/ dir directly, and the commit that added it
included a bunch more changes and doesn't seem to call out this
dep specifically.
2021-03-12 19:50:26 -05:00
H.J. Lu
1dbde357be Add missing changes to Makefile.tpl
Update Makefile.tpl to add missing changes in

commit af019bfde9
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Jan 9 06:51:15 2021 -0800

    Support the PGO build for binutils+gdb

"autogen Makefile.def" showed no changes in Makefile.in.

	PR binutils/26766
	* Makefile.tpl (PGO_BUILD_TRAINING_FLAGS_TO_PASS): Add
	PGO_BUILD_TRAINING=yes.
	(PGO_BUILD_TRAINING_MFLAGS): New.
	(all): Pass $(PGO_BUILD_TRAINING_MFLAGS) to the PGO build.
2021-02-28 04:39:38 -08:00
Alan Modra
a57d17732e Remove arm-symbianelf
* configure.ac: Delete arm*-*-symbianelf* entry.
	* configure: Regenerate.
bfd/
	* config.bfd (arm*-*-symbianelf*): Move from obsolete to removed.
	* configure.ac: Delete symbian entries.
	* elf-bfd.h (enum elf_target_os): Delete is_symbian.
	* elf32-arm.c: Remove symbian support.  Formatting.
	* targets.c: Delete symbian entries.
	* configure: Regenerate.
binutils/
	* testsuite/lib/binutils-common.exp (supports_gnu_osabi): Remove
	symbianelf.
gas/
	* Makefile.am (TARG_ENV_HFILES): Remove config/te-symbian.h.
	* config/tc-arm.c (elf32_arm_target_format): Remove TE_SYMBIAN
	support.
	* config/te-symbian.h: Delete.
	* configure.tgt: Remove arm-*-symbianelf*.
	* testsuite/gas/arm/arch4t-eabi.d: Don't mention symbianelf in
	target selection.
	* testsuite/gas/arm/arch4t.d: Likewise.
	* testsuite/gas/arm/got_prel.d: Likewise.
	* testsuite/gas/arm/mapdir.d: Likewise.
	* testsuite/gas/arm/mapmisc.d: Likewise.
	* testsuite/gas/arm/mapsecs.d: Likewise.
	* testsuite/gas/arm/mapshort-eabi.d: Likewise.
	* testsuite/gas/arm/thumb-eabi.d: Likewise.
	* testsuite/gas/arm/thumb.d: Likewise.
	* testsuite/gas/arm/thumbrel.d: Likewise.
	* Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
ld/
	* Makefile.am (ALL_EMULATION_SOURCES): Remove earmsymbian.c.
	Don't include symbian dep file.
	* configure.tgt: Remove arm*-*-symbianelf* entry.
	* emulparams/armsymbian.sh: Delete.
	* ld.texi: Don't mention symbian.
	* scripttempl/armbpabi.sc: Delete.
	* testsuite/ld-arm/symbian-seg1.d: Delete.
	* testsuite/ld-arm/symbian-seg1.s: Delete.
	* testsuite/ld-arm/arm-elf.exp: Don't run symbian-seg1.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2021-02-09 23:36:16 +10:30
Nick Alcock
f04ce15e83 ld: depend on libctf
Since ld may depend on libctf (if present), and libctf may be relinked
by the installation process, libctf must be installed before ld is,
or the relink may fail if it calls on symbols or symbol versions that do
not exist in any libctf already present on the system.  (If none is
present, the copy in the build tree will be automatically used, but
if one *is* present, it may take precedence and break things.)

(This is a maybe- dependency, so it will work even if libctf is
disabled.)

ChangeLog
2021-01-26  Nick Alcock  <nick.alcock@oracle.com>

	PR 27250
	* Makefile.def: Add install-libctf dependency to install-ld.
	* Makefile.in: Regenerated.
2021-01-27 11:04:12 +00:00
Mike Frysinger
3034143dc6 src-release: fix indentation
The indentation of the body of the nested statements got out of sync
leading to the entire function being indented incorrectly and looking
like it's part of the for loop.
2021-01-12 18:19:20 -05:00
H.J. Lu
44124a4683 binuitils: Check if AR is usable for LTO build
Check if AR is usable for LTO build with --enable-pgo-build=lto:

checking for -plugin option... ar: no operation specified
Failed: ar --plugin /usr/gcc-11.0.0-x32/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/liblto_plugin.so rc
no
configure: error: AR with --plugin and rc is required for LTO build

instead of build failure later.

	PR binutils/26766
	* configure.ac:
	* configure: Regenerated.
2021-01-11 16:37:13 -08:00
H.J. Lu
03c02f3116 GCC: Check if AR works with --plugin and rc
AR from older binutils doesn't work with --plugin and rc:

[hjl@gnu-cfl-2 bin]$ touch foo.c
[hjl@gnu-cfl-2 bin]$ ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c
[hjl@gnu-cfl-2 bin]$ ./ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c
./ar: no operation specified
[hjl@gnu-cfl-2 bin]$ ./ar --version
GNU ar (Linux/GNU Binutils) 2.29.51.0.1.20180112
Copyright (C) 2018 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
[hjl@gnu-cfl-2 bin]$

Check if AR works with --plugin and rc before passing --plugin to AR and
RANLIB.

	PR ld/27173
	* configure: Regenerated.
	* libtool.m4 (_LT_CMD_OLD_ARCHIVE): Check if AR works with
	--plugin and rc before enabling --plugin.

config/

	PR ld/27173
	* gcc-plugin.m4 (GCC_PLUGIN_OPTION): Check if AR works with
	--plugin and rc before enabling --plugin.

libiberty/

	PR ld/27173
	* configure: Regenerated.

zlib/

	PR ld/27173
	* configure: Regenerated.
2021-01-11 16:26:51 -08:00
H.J. Lu
af019bfde9 Support the PGO build for binutils+gdb
Add the --enable-pgo-build[=lto] configure option.  When binutils+gdb
is not built together with GCC, --enable-pgo-build enables the PGO build:

1. First build with -fprofile-generate.
2. Use "make maybe-check-*" to generate profiling data and pass -i to make
to ignore errors when generating profiling data.
3. Use "make clean" to remove the previous build.
4. Rebuild with -fprofile-use.

With --enable-pgo-build=lto, -flto=jobserver -ffat-lto-objects are used
together with -fprofile-generate and -fprofile-use.  Add '+' to the command
line for recursive make to support -flto=jobserver -ffat-lto-objects.

NB: --enable-pgo-build=lto enables the PGO build with LTO while
--enable-lto enables LTO support in toolchain.

	PR binutils/26766
	* Makefile.tpl (BUILD_CFLAGS): New.
	(CFLAGS): Append $(BUILD_CFLAGS).
	(CXXFLAGS): Likewise.
	(PGO_BUILD_GEN_FLAGS_TO_PASS): New.
	(PGO_BUILD_TRAINING_CFLAGS): Likewise.
	(PGO_BUILD_TRAINING_CXXFLAGS): Likewise.
	(PGO_BUILD_TRAINING_FLAGS_TO_PASS): Likewise.
	(PGO_BUILD_TRAINING_MFLAGS): Likewise.
	(PGO_BUILD_USE_FLAGS_TO_PASS): Likewise.
	(PGO-TRAINING-TARGETS): Likewise.
	(PGO_BUILD_TRAINING): Likewise.
	(all): Add '+' to the command line for recursive make.  Support
	the PGO build.
	* configure.ac: Add --enable-pgo-build[=lto].
	AC_SUBST PGO_BUILD_GEN_CFLAGS, PGO_BUILD_USE_CFLAGS and
	PGO_BUILD_LTO_CFLAGS.  Enable the PGO build in Makefile.
	* Makefile.in: Regenerated.
	* configure: Likewise.
2021-01-09 06:51:51 -08:00
H.J. Lu
50ad1254d5 GCC: Pass --plugin to AR and RANLIB
Detect GCC LTO plugin.  Pass --plugin to AR and RANLIB to support LTO
build.

	* Makefile.tpl (AR): Add @AR_PLUGIN_OPTION@
	(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
	* configure.ac: Include config/gcc-plugin.m4.
	AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION.
	* libtool.m4 (_LT_CMD_OLD_ARCHIVE): Pass --plugin to AR and
	RANLIB if possible.
	* Makefile.in: Regenerated.
	* configure: Likewise.

config/

	* gcc-plugin.m4 (GCC_PLUGIN_OPTION): New.

libiberty/

	* Makefile.in (AR): Add @AR_PLUGIN_OPTION@
	(RANLIB): Add @RANLIB_PLUGIN_OPTION@.
	(configure_deps): Depend on ../config/gcc-plugin.m4.
	* aclocal.m4: Include ../config/gcc-plugin.m4.
	* configure.ac: AC_SUBST AR_PLUGIN_OPTION and
	RANLIB_PLUGIN_OPTION.
	* configure: Regenerated.

zlib/

	* configure: Regenerated.
2021-01-09 06:51:51 -08:00
Nick Clifton
055bc77a80 Add Changelog entries and NEWS entries for 2.36 branch 2021-01-09 10:40:28 +00:00
Samuel Thibault
f478212851 libtool.m4: update GNU/Hurd test from upstream. In upstream libtool, 47a889a4ca20 ("Improve GNU/Hurd support.") fixed detection of shlibpath_overrides_runpath, thus avoiding unnecessary relink. This backports it.
.	* libtool.m4: Match gnu* along other GNU systems.

*/ChangeLog:

	* configure: Re-generate.
2021-01-07 16:47:36 +00:00
Alan Modra
1606216201 config.sub update broke powerpc-eabivle
$ ./config.sub powerpc-eabivle
Invalid configuration `powerpc-eabivle': OS `eabivle' not recognized
$ ./config.sub powerpc-unknown-eabivle
Invalid configuration `powerpc-unknown-eabivle': OS `eabivle' not recognized

Also powerpc-eabisim and probably some arm configurations.

	* config.sub: Accept OS of eabi* and gnueabi*.
2021-01-07 08:56:28 +10:30
Nick Alcock
c59e30ed17 libctf: new testsuite
This introduces a new lookup testsuite under libctf, which operates by
compiling (with libtool) a "lookup" .c file that uses libctf to analyze
some other program, then compiling some number of test object files with
CTF and optionally linking them together and running the lookup program
on the test object files (or linked test binary), before diffing the
result much as run_dump_test does.

This lets us test the portions of libctf that are not previously
testable, notably the portions that do lookup on linked output and
that create dynamic dictionaries and then do lookup on them before
writing them out, something that is not tested by the ld-ctf testsuite
because the linker never does this.

A couple of simple tests are added: one testing the functionality of
enum lookups, and one testing that the recently-added commit adding
extra paranoia to incomplete type handling doesn't break linking and
that the result of the link is an (otherwise-impossible) array of
forward type in the shared CTF dict.

ChangeLog
2021-01-05  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (libctf): No longer no_check.  Checking depends on
	all-ld.
	* Makefile.in: Regenerated.

libctf/ChangeLog
2021-01-05  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.am (EXPECT): New.
	(RUNTEST): Likewise.
	(RUNTESTFLAGS): Likewise.
	(CC_FOR_TARGET): Likewise.
	(check-DEJAGNU): Likewise.
	(AUTOMAKE_OPTIONS): Add dejagnu.
	* Makefile.in: Regenerated.
	* testsuite/config/default.exp: New.
	* testsuite/lib/ctf-lib.exp: Likewise.
	* testsuite/libctf-lookup/enum.lk: New test.
	* testsuite/libctf-lookup/enum-ctf.c: New CTF input.
	* testsuite/libctf-lookup/enum.c: New lookup test.
	* testsuite/libctf-lookup/ambiguous-struct*.c: New test.
	* testsuite/libctf-lookup/lookup.exp: New.
2021-01-05 14:53:40 +00:00
Nick Clifton
d750c713c9 Update libiberty with latest sources from gcc mainline 2021-01-05 12:36:09 +00:00
Alan Modra
5f8c2a1507 Update config.sub and config.guess
* config.guess: Import from upstream.
	* config.sub: Likewise.
2021-01-05 15:55:59 +10:30
Martin Liska
d6f26c9d28 [gdb] Print progress for debuginfod
Prints progress like:

Downloading 4.89 MB separate debug info for /usr/lib64/libgcrypt.so.20.
Downloading 1.10 MB separate debug info for /usr/lib64/liblzma.so.5.
Downloading 1.31 MB separate debug info for /usr/lib64/liblz4.so.1.
Downloading 0.96 MB separate debug info for /usr/lib64/libsmime3.so.
[###                                                                    ]

Tested on x86_64-linux.

ChangeLog:

2020-12-16  Martin Liska  <mliska@suse.cz>
	    Tom de Vries  <tdevries@suse.de>

	* gdb/debuginfod-support.c (struct user_data): Remove has_printed
	field.  Add meter field.
	(progressfn): Print progress using meter.
2020-12-16 18:18:40 +01:00
Enze Li
7ddfb1a891 Add gnu global outputs to .gitignore
GNU Global outputs can be safely ignored.

ChangeLog:

2020-12-02  Enze Li  <lienze2010@hotmail.com>

	* .gitignore: Add gnu global outputs.

Change-Id: I04ce68ab3279426195793adb56f834a34ee72ea2
2020-12-02 10:00:27 -05:00
Simon Marchi
12bf652539 Sync .gitignore with gcc
Bring in a few lines that are in gcc's .gitignore but not binutils-gdb's
.gitignore.

ChangeLog:

	* .gitignore: Sync with gcc.

Change-Id: I8900ddfbb5ab8cce6236e1905fdbb52fb4c291e2
2020-12-02 09:41:56 -05:00
Andreas Rammhold
ce04ca3123 Use sha256 for hashes in the release process
I just came across the GDB 10.1 release notes and saw that md5 is still
being used in those. I thought it would be a good idea to instead have a
more modern, secure and wildly available hash function such as SHA256 as
part of the release process.

The changes have been done rather mechnically via sed but executing the
`src-release.sh -b gdb` did work so I am confident about the result.

While this does not directly address the release mails, I was wasn't
able to find the template/script used for those, this is probably still
an improvement.

ChangeLog:
	* src-release.sh: Use sha256sum instead of md5sum.

binutils/ChangeLog:
	* README-how-to-make-a-release: Use sha256sum instead of md5sum.

Change-Id: I9cf19ea40699137c45463b8514f6e29271af2347
2020-10-28 10:35:28 -04:00
Andrew Burgess
ba4d88ad89 gdb/gdbserver: add dependencies for distclean-gnulib
After commit:

  commit 361cb21935
  Date:   Tue Oct 6 10:09:06 2020 +0100

      gnulib: Ensure all libraries are used when building gdb/gdbserver

We now get an error when, at the top level of the build tree, we do
'make distclean'.

The reason for this is that the gnulib directory is cleaned before the
gdb directory, cleaning gnulib deletes Makefile.gnulib.inc from the
gnulib build directory, which is currently pulled in by the gdb
Makefile.in using 'include'.

This commit adds a dependency between distclean-gnulib and both
distclean-gdb and distclean-gdbserver.  This means that gdb and
gdbserver will be cleaned before gnulib, as a result the
Makefile.gnulib.inc file should exist when needed.

ChangeLog:

	* Makefile.in: Rebuild.
	* Makefile.def: Make distclean-gnulib depend on distclean-gdb and
	distclean-gdbserver.
2020-10-14 15:05:14 +01:00
H.J. Lu
d70f978b44 PKG_CHECK_MODULES: Check if $pkg_cv_[]$1[]_LIBS works
It is quite normal to have headers without library on multilib OSes.
Add AC_TRY_LINK to PKG_CHECK_MODULES to check if $pkg_cv_[]$1[]_LIBS
works.

config/

	PR binutils/26301
	* pkg.m4 (PKG_CHECK_MODULES): Add AC_TRY_LINK to check if
	$pkg_cv_[]$1[]_LIBS works.

binutils/

	PR binutils/26301
	* configure: Regenerated.

gdb/

	PR binutils/26301
	* configure: Regenerated.
2020-07-28 03:56:34 -07:00
Aaron Merey
f6720b1cfe config/debuginfod.m4: Use PKG_CHECK_MODULES
Use PKG_CHECK_MODULES to set debuginfod autoconf vars. Also add
pkg.m4 to config/.

ChangeLog:

	* config/debuginfod.m4: use PKG_CHECK_MODULES.
	* config/pkg.m4: New file.
	* configure: Rebuild.
	* configure.ac: Remove AC_DEBUGINFOD.

ChangeLog/binutils:

	* Makefile.am: Replace LIBDEBUGINFOD with DEBUGINFOD_LIBS.
	* Makefile.in: Rebuild.
	* configure: Rebuild.
	* doc/Makefile.in: Rebuild.

ChangeLog/gdb:

	* Makefile.in: Replace LIBDEBUGINFOD with DEBUGINFOD_LIBS.
	* configure: Rebuild.
2020-07-24 15:16:20 -04:00
Nick Clifton
b115b9fd3c Add markers for binutils 2.35 branch 2020-07-04 10:16:22 +01:00
Stephen Casner
11104e4297 Since the pdp11-aout target does not support gdb, gdbserver or gprof these should be excluded in configure.
PR 25830
	* configure.ac (noconfigdirs): Exclude gdb & gprof for pdp11.
	* configure: Rebuild.
2020-04-21 10:27:50 +01:00
Tom Tromey
4635ff9753 Change gdbserver to use existing gdbsupport
This changes the gdbserver build to use the gdbsupport that was built
for gdb.

gdbserver and gdbreplay now must use WIN32APILIBS (aka -lws2_32).
Before this change, gdbserver did not define USE_WIN32API when
building gdbsupport, but now this is always done.

ChangeLog
2020-03-12  Tom Tromey  <tom@tromey.com>

	* Makefile.in: Rebuild.
	* Makefile.def (gdbserver): Depend on gdbsupport.

gdbserver/ChangeLog
2020-03-12  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
	(WIN32APILIBS): New subst.
	* Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
	gdbsupport files.
	(gdbsupport/%.o): Remove target.
	(GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
	(gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
	(WIN32APILIBS): New variable.
	(gdbserver$(EXEEXT)): Add WIN32APILIBS.
	(gdbreplay$(EXEEXT)): Likewise.
2020-03-12 13:32:16 -06:00
Tom Tromey
213291361b Change gdbsupport not to rely on BFD
This changes gdbsupport so that it no longer relies on BFD.  This is a
precursor to making gdbserver use the already-built gdbsupport,
because building gdbserver should not require BFD to be built.

The most notable change here is that CORE_ADDR is always a 64-bit
type.  This makes it so that gdb acts as if it were always built in
64-bit mode.

ChangeLog
2020-03-12  Tom Tromey  <tom@tromey.com>

	* Makefile.in: Rebuild.
	* Makefile.def (gdbsupport): Don't depend on bfd.

gdbsupport/ChangeLog
2020-03-12  Tom Tromey  <tom@tromey.com>

	* common-types.h: Remove GDBSERVER code.
	(gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Redefine.
	* common-defs.h: Remove GDBSERVER code.
2020-03-12 13:32:16 -06:00
Tom Tromey
9a665d6226 Fix gdbserver build when intl already built
gdbserver uses gdb's alloc.c, and this in turn can include headers
from intl via gdbsupport/gdb_locale.h.  This can cause build failures
in some situations, for example if you build gdb and gdbserver on
mingw.

This patch restores the gdbsupport dependency on intl, and changes
gdbserver to use ZW_GNU_GETTEXT_SISTER_DIR.  This fixes this build
problem.

ChangeLog
2020-03-12  Tom Tromey  <tom@tromey.com>

	* Makefile.in: Rebuild.
	* Makefile.def (gdbsupport): Depend on intl.

gdbserver/ChangeLog
2020-03-12  Tom Tromey  <tom@tromey.com>

	* config.in, configure: Rebuild.
	* configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
	* acinclude.m4: Include gettext-sister.m4.
	* Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
	variables.
	(INCLUDE_CFLAGS): Add INTL_CFLAGS.
	(gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2020-03-12 13:32:15 -06:00
Tom Tromey
b6f9caee52 Fix gdbserver-without-gdb build
An earlier patch changed gdbserver to use the already-built top-level
gnulib and gdbsupport.  However, if one did a build that did not
include gdb, then gdbserver would fail to build.

The problem is that configure.ac only adds gnulib and gdbsupport to
the build when gdb is being built.  This patch fixes the problem by
arranging for this to happen when gdbserver is built.

ChangeLog
2020-02-17  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* configure.ac (configdirs): Add gnulib and gdbsupport when building
	gdbserver.
2020-02-17 10:03:15 -07:00
Tom Tromey
1a627e7e6c Change gdbserver to use existing gnulib and libiberty
This changes gdbserver so that it no longer builds its own gnulib and
libiberty.  Instead, it now relies on the ones that were already built
at the top level.

gdbsupport is still built specially for gdbserver.  This is more
complicated and will be tackled in a subsequent patch.

ChangeLog
2020-02-14  Tom Tromey  <tom@tromey.com>

	* Makefile.in: Rebuild.
	* Makefile.def: Make gdbserver require gnulib and libiberty.

gdbserver/ChangeLog
2020-02-14  Tom Tromey  <tom@tromey.com>

	* acinclude.m4: Don't include acx_configure_dir.m4.
	* Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
	(SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
	(all, install-only, uninstall, clean-info, clean)
	(maintainer-clean): Don't recurse.
	(subdir_do, all-lib): Remove.
	($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
	(GNULIB_H): Remove.
	(generated_files): Update.
	($(GNULIB_BUILDDIR)/Makefile): Remove rule.
	* configure: Rebuild.
	* configure.ac: Don't configure gnulib or libiberty.
	(GNULIB): Update.

gdbsupport/ChangeLog
2020-02-14  Tom Tromey  <tom@tromey.com>

	* common-defs.h: Change path to gnulib/config.h.

Change-Id: I469cbbf5db2ab37109c058e9e3a1e4f4dabdfc98
2020-02-14 14:34:20 -07:00
Tom Tromey
919adfe840 Move gdbserver to top level
This patch moves gdbserver to the top level.

This patch is as close to a pure move as possible -- gdbserver still
builds its own variant of gnulib and gdbsupport.  Changing this will
be done in a separate patch.

[v2] Note that, per Simon's review comment, this patch changes the
tree so that gdbserver is not built for or1k or score.  This makes
sense, because there is apparently not actually a gdbserver port here.

[v3] This version of the patch also splits out some configury into a
new file, gdbserver/configure.host, so that the top-level configure
script can simply rely on it in order to decide whether gdbserver
should be built.

[v4] This version adds documentation and removes some unnecessary
top-level dependencies.

[v5] Update docs to mention "make all-gdbserver" and change how
top-level configure decides whether to build gdbserver, switching to a
single, shared script.

Tested by the buildbot.

ChangeLog
2020-02-07  Tom Tromey  <tom@tromey.com>
	    Pedro Alves  <palves@redhat.com>

	* src-release.sh (GDB_SUPPORT_DIRS): Add gdbserver.
	* gdbserver: New directory, moved from gdb/gdbserver.
	* configure.ac (host_tools): Add gdbserver.
	Only build gdbserver on certain systems.
	* Makefile.in, configure: Rebuild.
	* Makefile.def (host_modules, dependencies): Add gdbserver.
	* MAINTAINERS: Add gdbserver.

gdb/ChangeLog
2020-02-07  Tom Tromey  <tom@tromey.com>

	* README: Update gdbserver documentation.
	* gdbserver: Move to top level.
	* configure.tgt (build_gdbserver): Remove.
	* configure.ac: Remove --enable-gdbserver.
	* configure: Rebuild.
	* Makefile.in (distclean): Don't mention gdbserver.

Change-Id: I826b7565b54604711dc7a11edea0499cd51ff39e
2020-02-07 08:42:25 -07:00
Sergio Durigan Junior
fc1ca146f7 Adjust src-release.sh's getver due to gdbsupport's move to toplevel
The move of gdbsupport to the top level directory requires a small
change to src-release.sh's "getver" function, which is responsible for
determining the version string that will be appended to the release
tarball: now the create-version.sh script lives under ./gdbsupport,
and not under gdb/gdbsupport anymore.

This patch unbreaks the snapshot generation, which hasn't been working
since January 14th.

ChangeLog:
2020-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>

	* src-release.sh (getver): Look for gdbsupport's
	create-version.sh script at the current directory if tool is
	"gdb".

Change-Id: Id3b8bed6583a1aaa120c07009366f6c94a62d5db
2020-01-29 15:06:32 -05:00
Simon Marchi
cf1d9e092f sim: don't rely on inferior_ptid in gdbsim_target::wait
When running a program with the simulator target, I get:

    /home/simark/src/binutils-gdb/gdb/inferior.c:279: internal-error: inferior* find_inferior_pid(process_stratum_target*, int): Assertion `pid != 0' failed.

This can be reproduced by building a GDB for --target=arm-none-gnueabi,
and running with

    $ ./gdb -nx --data-directory=data-directory a.out -ex "target sim" -ex load -ex "b main" -ex r

Where a.out is any program with a main.

The problem is that gdbsim_target::wait assumes that inferior_ptid has
the value of the thread it wants to report an event for.

Actually, it's the target's responsibility to come up with the ptid of
the thread the event is for.  In the sim target, that ptid is stored in
sim_inferior_data::remote_sim_ptid, so return that instead of
inferior_ptid.

ChangeLog:

	* remote-sim.c (gdbsim_target::wait): Return
	sim_data->remote_sim_ptid instead of inferior_ptid.
2020-01-19 19:48:16 -05:00
Nick Clifton
ae77468624 Add markers for 2.34 branch to the NEWS files and ChangeLogs. 2020-01-18 13:50:25 +00:00
Nick Clifton
4fb3a8daaf Update top level config files with copies from the official repository.
2020-01-01  Ben Elliston  <bje@gnu.org>

	* config.guess: Update copyright years.
	* config.sub: Likewise.

	2019-12-21  Ben Elliston  <bje@gnu.org>

	* config.guess (set_cc_for_build): Prevent multiple calls by
	checking if $tmp is already set. We can't check CC_FOR_BUILD as
	the user may set it externally. Thanks to Torbj?rn Granlund for
	the bug report.

	2019-12-21  Torbj?rn Granlund  <tg@gmplib.org>

	* config.guess (alpha:Linux:*:*): Guard against missing
	/proc/cpuinfo by redirecting standard error to /dev/null.

	2019-09-12  Daniel Bittman  <danielbittman1@gmail.com>

	* config.guess (*:Twizzler:*:*): New.
	* config.sub (-twizzler*): New.

	2019-07-24  Ben Elliston  <bje@gnu.org>

	* config.guess (mips:OSF1:*.*): Whitespace cleanup.

	2019-06-30  Ben Elliston  <bje@gnu.org>

	* config.sub (case $os): Match nsk* and powerunix. Don't later
	match nsk* and set os=nsk which removes the OS version number.

	2019-06-30  Ben Elliston  <bje@gnu.org>

	* config.sub: Recognise os108*.

	2019-06-26  Ben Elliston  <bje@gnu.org>

	* config.sub (hp300): Set $os to hpux.

	2019-06-26  Ben Elliston  <bje@gnu.org>

	* config.sub (vsta): Move into alphabetical order.

	2019-06-10  Ben Elliston  <bje@gnu.org>

	* config.guess (*:OS108:*:*): Recognise new OS.

	2019-05-28  Ben Elliston  <bje@gnu.org>

	* config.guess (*:Darwin:*:*): Run xcode-select to determine if a
	system compiler is installed. If not, do not run set_cc_for_build,
	as the default cc will open a dialog box asking to install
	Xcode. If no C compiler is available, guess based on uname -p and
	uname -m.

	2019-05-28  Ben Elliston  <bje@gnu.org>

	* config.guess (*:Darwin:*:*): Simplify UNAME_PROCESSOR.
2020-01-18 13:43:19 +00:00