I see some changes in the generated files when running update-gnulib.sh.
The changes appeared with commit 35b38b0182 ("Finalized intl-update
patches (trois)"). This is most likely due to how the autotools were
ran in that commit, possibly with some different -I arguments.
Change-Id: Idaad8084b0e91e22d066f573775e21d0c7a039cb
commit 1d506c26d9
Update copyright year range in header of all files managed by GDB
updated gnulib/Makefile.am but didn't regenerate gnulib/Makefile.in
also sim/Makefile.in was updated, but the Copyright hunks/years
were off. The first hunk comes from automake 1.15.1 header-vars.am
and so should have 2017 as last year, the second hunk does come from
sim/Makefile.am and so should have 2024 as last year.
* gnulib/Makefile.in: Regenerate.
* sim/Makefile.in: Likewise.
This commit is the result of the following actions:
- Running gdb/copyright.py to update all of the copyright headers to
include 2024,
- Manually updating a few files the copyright.py script told me to
update, these files had copyright headers embedded within the
file,
- Regenerating gdbsupport/Makefile.in to refresh it's copyright
date,
- Using grep to find other files that still mentioned 2023. If
these files were updated last year from 2022 to 2023 then I've
updated them this year to 2024.
I'm sure I've probably missed some dates. Feel free to fix them up as
you spot them.
A user on irc noticed a missing backslash on one line in
update-gnulib.sh. This patch adds it.
Re-running update-gnulib.sh causes a few copyright notices to change.
Presumably these are from upstream gnulib and shouldn't be touched by
our yearly update. I've updated the script to account for this, but I
did not want to try testing it...
This commit is the result of running the gdb/copyright.py script,
which automated the update of the copyright year range for all
source files managed by the GDB project to be updated to include
year 2023.
gdbsupport compilation badly fails with GCC 12 on Solaris, with errors
like
../gnulib/config.h:1693:72: error: ‘malloc’ attribute argument 1 is ambiguous
1693 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
| ^
../gnulib/config.h:1693:72: note: use a cast to the expected type to disambiguate
We've not yet been able to determine where the ambiguity actually lies,
so this patch works around the issue by disabling _GL_ATTRIBUTE_DEALLOC
on Solaris, at least as a workaround for GDB 13.
As Tom suggested in the PR, this is done using our infrastructure for
local gnulib patches.
Tested on sparcv9-sun-solaris2.11, amd64-pc-solaris2.11, and
x86_64-pc-linux-gnu.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Update the gnulib import to fixes these issues:
- GDB build with clang + glibc < 2.33.
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=d6a07b4dc21b3118727743142c678858df442853https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00072.html
With glibc < 2.33, gnulib (since relatively recently) enables a
replacement for free (see gnulib/import/m4/free.m4). In that path,
clang shows this error:
make[2]: Entering directory '/home/smarchi/build/binutils-gdb-clang/gdbsupport'
CXX agent.o
In file included from /home/smarchi/src/binutils-gdb/gdbsupport/agent.cc:20:
In file included from /home/smarchi/src/binutils-gdb/gdbsupport/common-defs.h:95:
../gnulib/import/string.h:636:19: error: exception specification in declaration does not match previous declaration
_GL_EXTERN_C void free (void *) throw ();
^
../gnulib/import/stdlib.h:737:17: note: expanded from macro 'free'
# define free rpl_free
^
../gnulib/import/stdlib.h:739:1: note: previous declaration is here
_GL_FUNCDECL_RPL (free, void, (void *ptr));
^
../gnulib/import/sys/select.h:251:23: note: expanded from macro '_GL_FUNCDECL_RPL'
_GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
^
<scratch space>:139:1: note: expanded from here
rpl_free
^
The gnulib commit mentioned fixes the exception specification of `free`.
- GDB build on RHEL 7:
CC libgnu_a-openat-proc.o
In file included from /usr/include/string.h:633,
from ./string.h:41,
from ../../../binutils-gdb/gnulib/import/openat-proc.c:30:
./string.h:1105:1: error: expected identifier or '(' before '__extension__'
1105 | _GL_FUNCDECL_SYS (strndup, char *,
| ^~~~~~~~~~~~~~~~
https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=84863a1c4dc8cca8fb0f6f670f67779cdd2d543bhttps://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00075.html
Change-Id: Ibd51302feece6f385d0c53e0d08921b5d95e2776
This updates gnulib to a relatively recent commit. Most of this was
done by the gnulib import script; the only change I made was to
update-gnulib.sh.
Tested on x86-64 Fedora 34. I also did a mingw cross build.
This commit brings all the changes made by running gdb/copyright.py
as per GDB's Start of New Year Procedure.
For the avoidance of doubt, all changes in this commits were
performed by the script.
Some sim ports use these to provide networking functionality via the
dv-sockser module or via direct emulation for a few ports.
Gdb seems to build just fine still too.
The current setting assumes that gnulib is only used by dirs
immediately under the source root. Trying to build it two or
more levels deep fails. Switch GNULIB_BUILDDIR to a relative
GNULIB_PARENT_DIR so that it can be used to construct both the
build & source paths.
We use getline in sim today which breaks on older systems that are
not compliant with the latest POSIX standard. For example, mingw64
for Windows omits getline so we fail to build there.
This fixes PR27184, a failure to compile gdb due to
cdefs.h being out of sync with glibc on ppc64le targets
which are compiled with -mabi=ieeelongdouble and glibc
2.32.
Likewise, update usage of _GL_ATTRIBUTE_FORMAT_PRINTF to
_GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.
Likewise, disable newly added rpl_free gnulib api in
gdbserver support libraries.
Likewise, undefine read/write macros before redefining them
on mingw targets.
Likewise, wrap C++ usage of free with GNULIB_NAMESPACE namespace
as needed.
Change-Id: I86517613c0d8ac8f5ea45bbc4ebe2b54a3aef29f
This commits the result of running gdb/copyright.py as per our Start
of New Year procedure...
gdb/ChangeLog
Update copyright year range in copyright header of all GDB files.
An issue was reported here related to building GDB on MinGW:
https://sourceware.org/pipermail/gdb/2020-September/048927.html
It was suggested here:
https://sourceware.org/pipermail/gdb/2020-September/048931.html
that the solution might be to make use of $(LIB_GETRANDOM), a variable
defined in the gnulib makefile, when linking GDB.
In fact I think the issue is bigger than just LIB_GETRANDOM. When
using the script binutils-gdb/gnulib/update-gnulib.sh to reimport
gnulib there is a lot of output from gnulib's gnulib-tool. Part of
that output is this:
You may need to use the following makefile variables when linking.
Use them in <program>_LDADD when linking a program, or
in <library>_a_LDFLAGS or <library>_la_LDFLAGS when linking a library.
$(FREXPL_LIBM)
$(FREXP_LIBM)
$(INET_NTOP_LIB)
$(LIBTHREAD)
$(LIB_GETLOGIN)
$(LIB_GETRANDOM)
$(LIB_HARD_LOCALE)
$(LIB_MBRTOWC)
$(LIB_SETLOCALE_NULL)
$(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise
What I think this is telling us is that we should be including the
value of all these variables on the link line for gdb and gdbserver.
The problem though is that these variables are define in gnulib's
makefile, but are not (necessarily) defined in GDB's makefile.
One solution would be to recreate the checks that gnulib performs in
order to recreate these variables in both gdb's and gdbserver's
makefile. Though this shouldn't be too hard, most (if not all) of
these checks are in the form macros defined in m4 files in the gnulib
tree, so we could just reference these as needed. However, in this
commit I propose a different solution.
Currently, in the top level makefile, we give gdb and gdbserver a
dependency on gnulib. Once gnulib has finished building gdb and
gdbserver can start, these projects then have a hard coded (relative)
path to the compiled gnulib library in their makefiles.
In this commit I extend the gnulib configure script to install a new
makefile fragment in the gnulib build directory. This new file will
have the usual variable substitutions applied to it, and so can
include the complete list (see above) of all the extra libraries that
are needed when linking against gnulib.
In fact the new makefile fragment defines three variables, these are:
LIBGNU: The path to the archive containing gnulib. Can be used as a
dependency as when this file changes gdb/gdbserver should be
relinked.
LIBGNU_EXTRA_LIBS: A list of linker -l.... flags that should be
included in the link line of gdb/gdbserver. These are
libraries that $(LIBGNU) depends on. This list is taken from
the output of gnulib-tool, which is run by our
gnulib/update-gnulib.sh script.
INCGNU: A list of -I.... include paths that should be passed to the
compiler, these are where the gnulib headers can be found.
Now both gdb and gdbserver can include the makefile fragment and make
use of these variables.
The makefile fragment relies on the variable GNULIB_BUILDDIR being
defined. This is checked for in the fragment, and was already defined
in the makefiles of gdb and gdbserver.
gdb/ChangeLog:
* Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU
or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking.
gdbserver/ChangeLog:
* Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU
or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking.
gnulib/ChangeLog:
* Makefile.gnulib.inc.in: New file.
* Makefile.in: Regenerate.
* configure: Regenerate.
* configure.ac: Install the new file.
PR win32/25302 notes that gdb will crash when trying to "run" even a
simple program on Windows. The essential bug here is that the BFD
cache can easily be corrupted -- I have sent a separate patch for
that.
The particular reason that the cache is corrupted on Windows is that
gnulib overrides "stat" to make it do timezone adjustment -- but BFD
does not use this version of stat. The difference here triggers the
latent cache bug, but can also cause other bugs as well; in particular
it can cause spurious warnings about source files being newer.
This patch simply removes the stat override on mingw, making gnulib
and BFD agree.
I tested this by backing out the local AdaCore changes to work around
this bug and then verifying that I could reproduce it. Then, I
applied this patch and verified that "run" works again.
2020-09-08 Tom Tromey <tromey@adacore.com>
PR win32/25302:
* update-gnulib.sh: Apply stat patch.
* patches/0001-use-windows-stat: New file.
* import/m4/stat.m4: Update.
* configure: Rebuild.
GDB currently doesn't build on 32-bit Solaris:
* On Solaris 11.4/x86:
In file included from /usr/include/sys/procfs.h:26,
from /vol/src/gnu/gdb/hg/master/dist/gdb/i386-sol2-nat.c:24:
/usr/include/sys/old_procfs.h:31:2: error: #error "Cannot use procfs in the large file compilation environment"
#error "Cannot use procfs in the large file compilation environment"
^~~~~
* On Solaris 11.3/x86 there are several more instances of this.
The interaction between procfs and large-file support historically has
been a royal mess on Solaris:
* There are two versions of the procfs interface:
** The old ioctl-based /proc, deprecated and not used any longer in
either gdb or binutils.
** The `new' (introduced in Solaris 2.6, 1997) structured /proc.
* There are two headers one can possibly include:
** <procfs.h> which only provides the structured /proc, definining
_STRUCTURED_PROC=1 and then including ...
** <sys/procfs.h> which defaults to _STRUCTURED_PROC=0, the ioctl-based
/proc, but provides structured /proc if _STRUCTURED_PROC == 1.
* procfs and the large-file environment didn't go well together:
** Until Solaris 11.3, <sys/procfs.h> would always #error in 32-bit
compilations when the large-file environment was active
(_FILE_OFFSET_BITS == 64).
** In both Solaris 11.4 and Illumos, this restriction was lifted for
structured /proc.
So one has to be careful always to define _STRUCTURED_PROC=1 when
testing for or using <sys/procfs.h> on Solaris. As the errors above
show, this isn't always the case in binutils-gdb right now.
Also one may need to disable large-file support for 32-bit compilations
on Solaris. config/largefile.m4 meant to do this by wrapping the
AC_SYS_LARGEFILE autoconf macro with appropriate checks, yielding
ACX_LARGEFILE. Unfortunately the macro doesn't always succeed because
it neglects the _STRUCTURED_PROC part.
To make things even worse, since GCC 9 g++ predefines
_FILE_OFFSET_BITS=64 on Solaris. So even if largefile.m4 deciced not to
enable large-file support, this has no effect, breaking the gdb build.
This patch addresses all this as follows:
* All tests for the <sys/procfs.h> header are made with
_STRUCTURED_PROC=1, the definition going into the various config.h
files instead of having to make them (and sometimes failing) in the
affected sources.
* To cope with the g++ predefine of _FILE_OFFSET_BITS=64,
-U_FILE_OFFSET_BITS is added to various *_CPPFLAGS variables. It had
been far easier to have just
#undef _FILE_OFFSET_BITS
in config.h, but unfortunately such a construct in config.in is
commented by config.status irrespective of indentation and whitespace
if large-file support is disabled. I found no way around this and
putting the #undef in several global headers for bfd, binutils, ld,
and gdb seemed way more invasive.
* Last, the applicability check in largefile.m4 was modified only to
disable largefile support if really needed. To do so, it checks if
<sys/procfs.h> compiles with _FILE_OFFSET_BITS=64 defined. If it
doesn't, the disabling only happens if gdb exists in-tree and isn't
disabled, otherwise (building binutils from a tarball), there's no
conflict.
What initially confused me was the check for $plugins here, which
originally caused the disabling not to take place. Since AC_PLUGINGS
does enable plugin support if <dlfcn.h> exists (which it does on
Solaris), the disabling never happened.
I could find no explanation why the linker plugin needs large-file
support but thought it would be enough if gld and GCC's lto-plugin
agreed on the _FILE_OFFSET_BITS value. Unfortunately, that's not
enough: lto-plugin uses the simple-object interface from libiberty,
which includes off_t arguments. So to fully disable large-file
support would mean also disabling it in libiberty and its users: gcc
and libstdc++-v3. This seems highly undesirable, so I decided to
disable the linker plugin instead if large-file support won't work.
The patch allows binutils+gdb to build on i386-pc-solaris2.11 (both
Solaris 11.3 and 11.4, using GCC 9.3.0 which is the worst case due to
predefined _FILE_OFFSET_BITS=64). Also regtested on
amd64-pc-solaris2.11 (again on Solaris 11.3 and 11.4),
x86_64-pc-linux-gnu and i686-pc-linux-gnu.
config:
* largefile.m4 (ACX_LARGEFILE) <sparc-*-solaris*|i?86-*-solaris*>:
Check for <sys/procfs.h> incompatilibity with large-file support
on Solaris.
Only disable large-file support and perhaps plugins if needed.
Set, substitute LARGEFILE_CPPFLAGS if so.
bfd:
* bfd.m4 (BFD_SYS_PROCFS_H): New macro.
(BFD_HAVE_SYS_PROCFS_TYPE): Require BFD_SYS_PROCFS_H.
Don't define _STRUCTURED_PROC.
(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
* elf.c [HAVE_SYS_PROCFS_H] (_STRUCTURED_PROC): Don't define.
* configure.ac: Use BFD_SYS_PROCFS_H to check for <sys/procfs.h>.
* configure, config.in: Regenerate.
* Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
* Makefile.in, doc/Makefile.in: Regenerate.
binutils:
* Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
* Makefile.in, doc/Makefile.in: Regenerate.
* configure: Regenerate.
gas:
* Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
* Makefile.in, doc/Makefile.in: Regenerate.
* configure: Regenerate.
gdb:
* proc-api.c (_STRUCTURED_PROC): Don't define.
* proc-events.c: Likewise.
* proc-flags.c: Likewise.
* proc-why.c: Likewise.
* procfs.c: Likewise.
* Makefile.in (INTERNAL_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
* configure, config.in: Regenerate.
gdbserver:
* configure, config.in: Regenerate.
gdbsupport:
* Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
* common.m4 (GDB_AC_COMMON): Use BFD_SYS_PROCFS_H to check for
<sys/procfs.h>.
* Makefile.in: Regenerate.
* configure, config.in: Regenerate.
gnulib:
* configure.ac: Run ACX_LARGEFILE before gl_EARLY.
* configure: Regenerate.
gprof:
* Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
* Makefile.in: Regenerate.
* configure: Regenerate.
ld:
* Makefile.am (AM_CPPFLAGS): Add LARGEFILE_CPPFLAGS.
* Makefile.in: Regenerate.
* configure: Regenerate.
This is mostly to get this commit from gnulib:
e22cd2677a4b7beacbf30b93bb0559f7b89f96ce
Add ‘extern "C"’ to count-one-bits.h etc.
... which fixes this compilation problem I observed with clang++:
CXXLD gdb
arch/arm-get-next-pcs.o:arm-get-next-pcs.c:function thumb_get_next_pcs_raw(arm_get_next_pcs*): error: undefined reference to 'count_one_bits(unsigned int)'
<more such undefined references>
I built-tested on GNU/Linux x86-64 (gcc-9 and clang-9) as well as with the
x86_64-w64-mingw32-gcc cross-compiler.
gnulib/ChangeLog:
* update-gnulib.sh (GNULIB_COMMIT_SHA1): Bump to
e22cd2677a4b7beacbf30b93bb0559f7b89f96ce.
* Makefile.in, config.in, configure, import/*: Re-generate.
For a fix I intend to submit, I would need a function that counts the
number of set bits in a word. There is __builtin_popcount that is
supported by gcc and clang, but there is also a gnulib module that wraps
that and provides a fallback for other compilers, so I think it would be
good to use it.
I also noticed that there is a bitcount function in arch/arm.c, so I
thought that as a first step I would replace that one with the gnulib
count-one-bits module. This is what this patch does.
The gnulib module provides multiple functions, with various parameter
length (unsigned int, unsigned long int, unsigned long long int), I
chose the one that made sense for each call site based on the argument
type.
gnulib/ChangeLog:
* update-gnulib.sh (IMPORTED_GNULIB_MODULES): Import
count-one-bits module.
* configure: Re-generate.
* aclocal.m4: Re-generate.
* Makefile.in: Re-generate.
* import/count-one-bits.c: New file.
* import/count-one-bits.h: New file.
* import/Makefile.am: Re-generate.
* import/Makefile.in: Re-generate.
* import/m4/gnulib-cache.m4: Re-generate.
* import/m4/gnulib-comp.m4: Re-generate.
* import/m4/count-one-bits.m4: New file.
gdb/ChangeLog:
* arm-tdep.c: Include count-one-bits.h.
(cleanup_block_store_pc): Use count_one_bits.
(cleanup_block_load_pc): Use count_one_bits.
(arm_copy_block_xfer): Use count_one_bits.
(thumb2_copy_block_xfer): Use count_one_bits.
(thumb_copy_pop_pc_16bit): Use count_one_bits.
* arch/arm-get-next-pcs.c: Include count-one-bits.h.
(thumb_get_next_pcs_raw): Use count_one_bits.
(arm_get_next_pcs_raw): Use count_one_bits_l.
* arch/arm.c (bitcount): Remove.
* arch/arm.h (bitcount): Remove.
This patch renames the .c source files in gdbsupport to .cc.
In the gdb directory, there is an argument against renaming the source
files, which is that it makes using some git commands more difficult to
do archeology. Some commands have some kind of "follow" option that
makes git try to follow renames, but it doesn't work in all situations.
Given that we have just moved the gdbsupport directory, that argument
doesn't hold for source files in that directory. I therefore suggest
renaming them to .cc, so that they are automatically recognized as C++
by various tools and editors.
The original motivation behind this is that when building gdbsupport
with clang, I get:
CC agent.o
clang: error: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Werror,-Wdeprecated]
In the gdb/ directory, we make clang happy by passing "-x c++". We
could do this in gdbsupport too, but I think that renaming the files is
a better long-term solution.
gdbserver still does its own build of gdbsupport, so a few changes in
its Makefile are necessary.
gdbsupport/ChangeLog:
* Makefile.am: Rename source files from .c to .cc.
(CC, CFLAGS): Don't override.
(AM_CFLAGS): Rename to ...
(AM_CXXFLAGS): ... this.
* Makefile.in: Re-generate.
* %.c: Rename to %.cc.
gdbserver/ChangeLog:
* Makefile.in: Rename gdbsupport source files from .c to .cc.
This adds the no-dist option to the gnulib configure script. gdb
doesn't use "make dist", so there's no need for this. Adding this
option makes the Makefiles less verbose.
gnulib/ChangeLog
2019-11-15 Tom Tromey <tromey@adacore.com>
* aclocal.m4, configure, Makefile.in, import/Makefile.in:
Rebuild.
* configure.ac: Remove obsolete comment. Add no-dist.
Change-Id: I5224e18af9acd5284acb79d5756b0e84b00406e9
Makes sure to assign the return value of strerror_r to an int,
so that we get a compile error if we accidentally get the
wrong version.
gdb/ChangeLog:
2019-11-15 Christian Biesinger <cbiesinger@google.com>
* config.in: Regenerate.
* configure: Regenerate.
* gdbsupport/common.m4: No longer check for strerror_r.
* gdbsupport/posix-strerror.c (safe_strerror): Always call the
POSIX version of strerror_r, now that gnulib provides it if
necessary.
gdb/gdbserver/ChangeLog:
2019-11-15 Christian Biesinger <cbiesinger@google.com>
* config.in: Regenerate.
* configure: Regenerate.
gnulib/ChangeLog:
2019-11-15 Christian Biesinger <cbiesinger@google.com>
* Makefile.in: Regenerate.
* aclocal.m4: Regenerate.
* config.in: Regenerate.
* configure: Regenerate.
* import/Makefile.am: Update.
* import/Makefile.in: Regenerate.
* import/extra/config.rpath: New file.
* import/glthread/lock.c: New file.
* import/glthread/lock.h: New file.
* import/glthread/threadlib.c: New file.
* import/m4/gnulib-cache.m4: Update.
* import/m4/gnulib-comp.m4: Update.
* import/m4/lib-ld.m4: New file.
* import/m4/lib-link.m4: New file.
* import/m4/lib-prefix.m4: New file.
* import/m4/lock.m4: New file.
* import/m4/strerror_r.m4: New file.
* import/m4/threadlib.m4: New file.
* import/strerror_r.c: New file.
* update-gnulib.sh: Import strerror_r-posix.
Change-Id: I5cfeb12a5203a4cd94a78581541e6085a68685c3
This is a lot simpler and as a side-effect this will correctly
regenerate import/Makefile and config.h during rebuilds if
necessary.
gnulib/ChangeLog:
2019-11-15 Christian Biesinger <cbiesinger@google.com>
* Makefile.am: New file.
* Makefile.in: Replace with generated file.
* aclocal-m4-deps.mk: Remove.
* configure.ac: Use the foreign option for automake and specify
the aclocal search path here.
* update-gnulib.sh: Don't generate aclocal-m4-deps.mk anymore.
Also don't specify the aclocal include path here, now that it
is in configure.ac.
Change-Id: I6a2c4d41cf4f0e21d5c813197bad63ed5c08e408
I don't know why this path is what it is but it is clearly wrong.
gnulib/ChangeLog:
2019-11-12 Christian Biesinger <cbiesinger@google.com>
* Makefile.in: Fix path to say import/ instead of gnulib/.
Change-Id: Ib7f6a319ee764d20072e38911766ca7032d6ca8e
It looks like autoheader and automake weren't run for commit
73cc72729a.
Note, it looks like the installed gettext version affects the
generated output here, I used 0.19.8.1 to get no diff.
gnulib/ChangeLog:
2019-11-06 Christian Biesinger <cbiesinger@google.com>
* config.in: Regenerate.
* import/Makefile.in: Regenerate.
Change-Id: Iadd43023713a77921b0f850184a19afb1517be02
Coverity discovered a number of resource leaks in Gnulib's glob.c.
This commit backports the Gnulib commits that fix the leaks.
gnulib/ChangeLog:
* patches/0003-Fix-glob-c-Coverity-issues.patch: New file.
* update-gnulib.sh: List the above.
* import/glob.c: Rebuild.
This commit fixes two paths in update-gnulib.sh that weren't updated
when gnulib was moved to toplevel.
gnulib/ChangeLog:
* update-gnulib.sh: Adjust paths.
This patch moves the gdb/gnulib subdirectory to the top level.
It adjusts the top-level build system to build gnulib when necessary,
and changes gdb to use this. However, gdbserver still builds its own
copy of gnulib, just from the new source location.
A small hack was needed to ensure that gnulib is only built when gdb
is enabled. The Makefile only provides an ordering -- the directory
must be mentioned in configdirs to actually be compiled at all.
Most of the patch is just a "git mv" of gnulib, though a few minor
path adjustments were needed in some files there.
Tested by the buildbot.
ChangeLog
2019-06-14 Tom Tromey <tom@tromey.com>
* MAINTAINERS: Add gnulib.
* gnulib: New directory, move from gdb/gnulib.
* configure.ac (host_libs): Add gnulib.
* configure: Rebuild.
* Makefile.def (host_modules, dependencies): Add gnulib.
* Makefile.in: Rebuild.
gdb/ChangeLog
2019-06-14 Tom Tromey <tom@tromey.com>
* gnulib: Move directory to top-level.
* configure.ac: Don't configure gnulib.
* configure: Rebuild.
* common/common-defs.h: Use new path to gnulib.
* Makefile.in (GNULIB_BUILDDIR): Now ../gnulib.
(GNULIB_H): Remove.
(INCGNU): Look in new gnulib location.
(HFILES_NO_SRCDIR): Remove gnulib files.
(SUBDIR, REQUIRED_SUBDIRS): Remove gnulib.
(generated_files): Remove GNULIB_H.
($(LIBGNU), all-lib): Remove targets.
(distclean): Don't mention GNULIB_BUILDDIR.
($(GNULIB_BUILDDIR)/Makefile): Remove target.
gdb/gdbserver/ChangeLog
2019-06-14 Tom Tromey <tom@tromey.com>
* configure.ac: Use new path to gnulib.
* configure: Rebuild.
* Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
to gnulib.
gnulib/ChangeLog
2019-06-14 Tom Tromey <tom@tromey.com>
* update-gnulib.sh: Adjust paths.
* Makefile.in: Adjust paths.
* configure.ac: Adjust paths. Use ACX_LARGEFILE.
* configure: Rebuild.