summaryrefslogtreecommitdiff
path: root/gnulib/ChangeLog
Commit message (Collapse)AuthorAgeFilesLines
* gnulib: define the path to gnulib's parent dirMike Frysinger2021-06-141-0/+7
| | | | | | | | 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.
* gnulib: import selectMike Frysinger2021-06-081-0/+10
| | | | | A few sims use this to emulate the syscall & provide network functionality.
* gnulib: import netdbMike Frysinger2021-06-081-0/+8
| | | | A few sims use this to provide network functionality.
* gnulib: import chownMike Frysinger2021-06-081-0/+8
| | | | A few sims use this to emulate chown syscalls.
* gnulib: import ffsMike Frysinger2021-05-241-0/+9
| | | | The Blackfin sim uses this function, but Windows/mingw doesn't provide it.
* gnulib: import gendocsMike Frysinger2021-05-041-0/+8
| | | | This will be used to generate more complete docs for the binutils site.
* gnulib: import getlineMike Frysinger2021-05-041-0/+9
| | | | | | 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.
* gnulib: import gitlog-to-changelogMike Frysinger2021-03-241-0/+9
| | | | This is going to be used to generate ChangeLog files.
* gnulib: update to 776af40e0Paul E. Murphy2021-02-051-0/+6
| | | | | | | | | | | | | | | | | | | | | 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
* gnulib: Ensure all libraries are used when building gdb/gdbserverAndrew Burgess2020-10-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Do not adjust mtime timezone on WindowsTom Tromey2020-09-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update gnulib to current trunkChristian Biesinger2020-08-261-0/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes two issues on Windows: Update. https://sourceware.org/pipermail/gdb-patches/2020-June/169978.html gnulib/ChangeLog: 2020-08-26 Christian Biesinger <cbiesinger@google.com> Pedro Alves <palves@redhat.com> Joel Brobecker <brobecker@adacore.com> * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. * import/Makefile.am: Update. * import/Makefile.in: Regenerate. * import/alloca.in.h (if): Update. * import/assure.h (affirm): Update. * import/at-func.c: Update. * import/attribute.h: New file. * import/btowc.c: New file. * import/canonicalize-lgpl.c: Update. * import/count-one-bits.h (COUNT_ONE_BITS_GENERIC): Update. (COUNT_ONE_BITS): Update. (intrinsic): Update. (__popcnt64): Update. (popcount_supported): Update. * import/ctype.in.h: New file. * import/dirent-private.h (WIN32_FIND_DATA): Update. * import/dirent.in.h (_GL_ATTRIBUTE_PURE): Update. * import/dirname.h: Update. * import/dosname.h: Remove. * import/error.h (_GL_ATTRIBUTE_FORMAT): Update. * import/extra/update-copyright: Update. * import/fchdir.c: Update. * import/fcntl.in.h (GNULIB_defined_rpl_fcntl): Update. (GNULIB_defined_fcntl): Update. * import/filename.h (HAS_DEVICE): Update. (IS_ABSOLUTE_PATH): Update. (IS_PATH_WITH_DIR): Update. (FILE_SYSTEM_PREFIX_LEN): Update. (_IS_DRIVE_LETTER): Update. (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): Update. (IS_ABSOLUTE_FILE_NAME): Update. (IS_RELATIVE_FILE_NAME): Update. (IS_FILE_NAME_WITH_DIR): Update. * import/filenamecat-lgpl.c (mfile_name_concat): Update. * import/fnmatch.c (WIDE_CHAR_SUPPORT): Update. (btowc): Update. (iswctype): Update. (mempcpy): Update. (strnlen): Update. (towlower): Update. (wcscat): Update. (wcslen): Update. (wctype): Update. (wmemchr): Update. (wmempcpy): Update. (SIZE_MAX): Update. (isblank): Update. (__libc_use_alloca): Update. (alloca): Update. (alloca_account): Update. (STREQ): Update. (CHAR_CLASS_MAX_LENGTH): Update. (IS_CHAR_CLASS): Update. (ISWCTYPE): Update. (if): Update. (HANDLE_MULTIBYTE): Update. (internal_function): Update. (FOLD): Update. (CHAR): Update. (UCHAR): Update. (INT): Update. (FCT): Update. (EXT): Update. (END): Update. (L_): Update. (BTOWC): Update. (STRLEN): Update. (STRCAT): Update. (MEMPCPY): Update. (MEMCHR): Update. (WIDE_CHAR_VERSION): Update. (STRUCT): Update. (FINDIDX): Update. (findidx): Update. (ALLOCA_LIMIT): Update. (SHLIB_COMPAT): Update. * import/fnmatch_loop.c (struct STRUCT): Update. (FCT): Update. (EXT): Update. (END): Update. (str): Update. (NEW_PATTERN): Update. * import/getcwd.c: Update. * import/getlogin_r.c (GetUserName): Update. * import/getprogname.c (getprogname): Update. * import/getrandom.c: New file. * import/gettimeofday.c: Remove. * import/glob.in.h (_Restrict_): Update. * import/inttypes.in.h (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. * import/isblank.c: New file. * import/isnanl-nolibm.h (__has_builtin): Update. * import/libc-config.h (versioned_symbol): Update. (compat_symbol): Update. * import/limits.in.h (_GL_ALREADY_INCLUDING_LIMITS_H): Update. * import/m4/btowc.m4: New file. * import/m4/ctype.m4: New file. * import/m4/exponentl.m4: Update. * import/m4/fnmatch.m4: Update. * import/m4/getrandom.m4: New file. * import/m4/glob.m4: Update. * import/m4/gnulib-cache.m4: Update. * import/m4/gnulib-common.m4: Update. * import/m4/gnulib-comp.m4: Update. * import/m4/inttypes.m4: Update. * import/m4/isblank.m4: New file. * import/m4/isnanl.m4: Update. * import/m4/largefile.m4: Update. * import/m4/mbtowc.m4: New file. * import/m4/memmem.m4: Update. * import/m4/minmax.m4: New file. * import/m4/signal_h.m4: Update. * import/m4/stdio_h.m4: Update. * import/m4/stdlib_h.m4: Update. * import/m4/string_h.m4: Update. * import/m4/strnlen.m4: New file. * import/m4/sys_random_h.m4: New file. * import/m4/sys_socket_h.m4: Update. * import/m4/sys_stat_h.m4: Update. * import/m4/time_h.m4: Update. * import/m4/unistd_h.m4: Update. * import/m4/wchar_h.m4: Update. * import/m4/wint_t.m4: Update. * import/m4/wmemchr.m4: New file. * import/m4/wmempcpy.m4: New file. * import/math.in.h (__has_builtin): Update. * import/mbrtowc.c (FALLTHROUGH): Update. * import/mbtowc-impl.h: New file. * import/mbtowc.c: New file. * import/minmax.h: New file. * import/open.c (open): Update. * import/openat-proc.c (openat_proc_name): Update. * import/openat.c (rpl_openat): Update. (openat_needs_fchdir): Update. * import/openat.h (FCHOWNAT_INLINE): Update. (CHOWNAT_INLINE): Update. (FCHMODAT_INLINE): Update. (CHMODAT_INLINE): Update. * import/opendir.c (WIN32_FIND_DATA): Update. (GetFullPathName): Update. (FindFirstFile): Update. * import/readdir.c (FindNextFile): Update. * import/rename.c (MoveFileEx): Update. * import/rewinddir.c (FindFirstFile): Update. * import/rmdir.c: Update. * import/signal.in.h (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. * import/stat-w32.c (_WIN32_WINNT): Update. (LoadLibrary): Update. (GetFinalPathNameByHandle): Update. (GetProcAddress): Update. (DWORD): Update. (GetFileInformationByHandleExFunc): Update. (GetFinalPathNameByHandleFunc): Update. * import/stat.c (WIN32_FIND_DATA): Update. (CreateFile): Update. (FindFirstFile): Update. * import/stdio.in.h (_GL_ATTRIBUTE_FORMAT): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (_GL_FUNCDECL_RPL_1): Update. (_GL_CXXALIAS_RPL_1): Update. (_GL_CXXALIAS_SYS_CAST): Update. * import/stdlib.in.h (_GL_ATTRIBUTE_PURE): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. * import/string.in.h (_GL_ATTRIBUTE_PURE): Update. (_GL_WARN_ON_USE): Update. (_GL_WARN_ON_USE_CXX): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_CXXALIAS_SYS): Update. (mbstok_r): Update. * import/strnlen.c: New file. * import/sys_random.in.h: New file. * import/sys_socket.in.h (GNULIB_defined_socklen_t): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_CXXALIAS_SYS_CAST): Update. * import/sys_stat.in.h (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (lchmod): Update. (_GL_CXXALIAS_RPL_1): Update. (stat): Update. * import/tempname.c (__set_errno): Update. (__secure_getenv): Update. (__try_tempname): Update. (__getpid): Update. (__gettimeofday): Update. (RANDOM_BITS): Update. (uint64_t): Update. (RANDOM_VALUE_MAX): Update. (BASE_62_DIGITS): Update. (BASE_62_POWER): Update. (try_tempname_len): Update. (try_file): Update. (try_dir): Update. (try_nocreate): Update. (gen_tempname_len): Update. (__gen_tempname): Update. (try_tempname): Update. * import/tempname.h (gen_tempname_len): Update. (try_tempname_len): Update. * import/time.in.h (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_CXXALIAS_SYS): Update. * import/unistd.in.h (if): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (_GL_CXXALIASWARN): Update. (_GL_WARN_ON_USE): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. * import/verify.h: Update. * import/warn-on-use.h (_GL_WARN_ON_USE_CXX): Update. * import/wchar.in.h (_GL_ATTRIBUTE_PURE): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (_GL_CXXALIASWARN): Update. (_GL_WARN_ON_USE): Update. (_GL_CXXALIAS_SYS_CAST2): Update. (_GL_CXXALIASWARN1): Update. * import/windows-rwlock.c (CreateEvent): Update. * import/wmemchr-impl.h: New file. * import/wmemchr.c: New file. * import/wmempcpy.c: New file. * update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add gettimeofday. (GNULIB_COMMIT_SHA1): Update gnulib revision.
* Unify Solaris procfs and largefile handlingRainer Orth2020-07-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* gdb: update gnulib importSimon Marchi2020-02-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | 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.
* gnulib: import count-one-bits module and use itSimon Marchi2020-02-141-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update Gnulib to the latest git versionChristian Biesinger2019-12-161-0/+772
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows us to remove a workaround in common-defs.h due to the gnulib fix in: https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00024.html All of GDB's local Gnulib patches were already fixed upstream per their descriptions, so this patch removes them all. The problem listed here: https://sourceware.org/ml/gdb-patches/2019-08/msg00553.html was probably partially fixed by moving gnulib to the toplevel; for the remainder, I am setting MAKEOVERRIDES to empty in gnulib/Makefile.am. See also the comment there (it fixes an issue with compilers that don't use C99/C11 by default such as GCC 4.8.5, the default on Centos 7). gdb/ChangeLog: 2019-12-16 Christian Biesinger <cbiesinger@google.com> * gdbsupport/common-defs.h: Remove workaround for a gnulib bug (we no longer need to include time.h before pathmax.h) gnulib/ChangeLog: 2019-12-16 Christian Biesinger <cbiesinger@google.com> * Makefile.am: Set MAKEOVERRIDES. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. * import/Makefile.am: Update. * import/Makefile.in: Regenerate. * import/_Noreturn.h: New file. * import/alloca.c (i00afunc): Update. * import/alloca.in.h (if): Update. * import/arg-nonnull.h: Rename from import/extra/snippet/arg-nonnull.h. * import/arpa_inet.in.h (if): Update. * import/assure.h: Update. * import/at-func.c: Update. * import/basename-lgpl.c: Update. * import/canonicalize-lgpl.c (if): Update. * import/c++defs.h: Rename from import/extra/snippet/c++defs.h. * import/cdefs.h: New file. * import/chdir-long.c: Update. * import/chdir-long.h: Update. * import/cloexec.c: Update. * import/cloexec.h: Update. * import/close.c: Update. * import/closedir.c: Update. * import/config.charset: Remove. * import/dirent-private.h: Update. * import/dirent.in.h: Update. * import/dirfd.c: Update. * import/dirname-lgpl.c: Update. * import/dirname.h (base_name): Update. * import/dosname.h (if): Update. * import/dup-safer-flag.c: New file. * import/dup-safer.c: Update. * import/dup.c: Update. * import/dup2.c (if): Update. (dup2_nothrow): Update. (ms_windows_dup2): Update. * import/errno.in.h (if): Update. (elif): Update. * import/error.c (if): Update. (strerror_r): Update. (program_name): Update. (error): Update. (error_at_line): Update. * import/error.h: Update. * import/exitfail.c: Update. * import/exitfail.h: Update. * import/extra/config.rpath: Update. * import/extra/snippet/_Noreturn.h: Remove. * import/extra/update-copyright: Update. * import/fchdir.c: Update. * import/fcntl.c (rpl_fcntl): Update. (INCL_DOS): Update. (if): Update. (rpl_fcntl_DUPFD): Update. (rpl_fcntl_DUPFD_CLOEXEC): Update. (klibc_fcntl): Update. (fcntl): Update. (have_dupfd_cloexec): Update. * import/fcntl.in.h (if): Update. (creat): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_CXXALIAS_SYS): Update. (_GL_CXXALIASWARN): Update. (_GL_WARN_ON_USE): Update. (O_CLOEXEC): Update. (GNULIB_defined_O_CLOEXEC): Update. * import/fd-hook.c: Update. * import/fd-hook.h: Update. * import/fd-safer-flag.c: New file. * import/fd-safer.c: Update. * import/fdopendir.c: Update. * import/filename.h: Update. * import/filenamecat-lgpl.c (longest_relative_suffix): Update. (mfile_name_concat): Update. * import/filenamecat.h: Update. * import/flexmember.h: Update. * import/float+.h: Update. * import/float.c: Update. * import/float.in.h (LDBL_MIN): Update. * import/fnmatch.c (__builtin_expect): Update. (FALLTHROUGH): Update. * import/fnmatch.in.h (_FNMATCH_H): Update. (_): Update. (fnmatch): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (_GL_CXXALIASWARN): Update. (_GL_WARN_ON_USE): Update. * import/fnmatch_loop.c (FCT): Update. (EXT): Update. * import/fpucw.h (GET_FPUCW): Update. (SET_FPUCW): Update. * import/frexp.c: Update. * import/frexpl.c: Update. * import/fstat.c (stat): Update. (fstat): Update. (WINDOWS_NATIVE): Update. (fstat_nothrow): Update. (WIN32_LEAN_AND_MEAN): Update. * import/fstatat.c (normal_fstatat): Update. (rpl_fstatat): Update. * import/getcwd-lgpl.c (rpl_getcwd): Update. * import/getcwd.c (getcwd_nothrow): Update. (getcwd_system): Update. (__getcwd): Update. * import/getdtablesize.c (if): Update. (_setmaxstdio): Update. (_setmaxstdio_nothrow): Update. (getdtablesize): Update. * import/getlogin_r.c (if): Update. (getlogin_r): Update. * import/getprogname.c (getprogname): Update. * import/getprogname.h: Update. * import/gettext.h (if): Update. * import/gettimeofday.c (WINDOWS_NATIVE): Update. (localtime): Update. (GetProcAddress): Update. (gmtime): Update. (void): Update. (struct tm): Update. (rpl_localtime): Update. (initialize): Update. (rpl_gmtime): Update. (tzset): Update. (rpl_tzset): Update. * import/glob-libc.h (_Restrict_): Update. (__size_t): Update. (__need_size_t): Update. (glob): Update. (globfree): Update. (__REDIRECT_NTH): Update. (glob64): Update. (globfree64): Update. (glob_pattern_p): Update. * import/glob.c (POSIX): Update. (if): Update. (__set_errno): Update. (getpwnam_r): Update. (__lstat64): Update. (FLEXIBLE_ARRAY_MEMBER): Update. (__glob_pattern_p): Update. (GETPW_R_SIZE_MAX): Update. (GET_LOGIN_NAME_MAX): Update. (DT_UNKNOWN): Update. (DT_DIR): Update. (DT_LNK): Update. (D_TYPE_TO_RESULT): Update. (readdir_result_might_be_symlink): Update. (readdir_result_might_be_dir): Update. (readdir_result_type): Update. (D_INO_TO_RESULT): Update. (READDIR_RESULT_INITIALIZER): Update. (attribute_hidden): Update. (__attribute_noinline__): Update. (__builtin_expect): Update. (__glibc_unlikely): Update. (__has_builtin): Update. (__glob_pattern_type): Update. (is_dir): Update. (glob): Update. (globfree): Update. (libc_hidden_def): Update. (DIRSEP_CHAR): Update. (prefix_array): Update. (weak_alias): Update. (link_exists2_p): Update. (link_exists_p): Update. (glob_in_dir): Update. (GLOBNAMES_MEMBERS): Update. * import/glob.in.h (_GL_GLOB_H): Update. (_): Update. (__BEGIN_DECLS): Update. (__END_DECLS): Update. (_Restrict_): Update. (__THROW): Update. (__THROWNL): Update. (__size_t): Update. (__USE_GNU): Update. (glob): Update. (globfree): Update. (glob_pattern_p): Update. (__glob_pattern_p): Update. (__GLOB_GNULIB): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (_GL_WARN_ON_USE): Update. * import/glob_internal.h: New file. * import/glob_pattern_p.c: New file. * import/globfree.c: New file. * import/glthread/lock.c (glthread_rwlock_init_for_glibc): Update. (glthread_rwlock_rdlock_multithreaded): Update. (glthread_once_call): Update. (glthread_once_multithreaded): Update. (glthread_once_singlethreaded): Update. (glthread_recursive_lock_init_multithreaded): Update. (glthread_recursive_lock_lock_multithreaded): Update. (glthread_recursive_lock_unlock_multithreaded): Update. (glthread_recursive_lock_destroy_multithreaded): Update. (glthread_lock_init_func): Update. (glthread_lock_lock_func): Update. (glthread_lock_unlock_func): Update. (glthread_lock_destroy_func): Update. (gl_waitqueue_t): Update. (gl_waitqueue_init): Update. (gl_waitqueue_add): Update. (gl_waitqueue_notify_first): Update. (gl_waitqueue_notify_all): Update. (glthread_rwlock_init_func): Update. (glthread_rwlock_rdlock_func): Update. (glthread_rwlock_wrlock_func): Update. (glthread_rwlock_unlock_func): Update. (glthread_rwlock_destroy_func): Update. (glthread_recursive_lock_init_func): Update. (glthread_recursive_lock_lock_func): Update. (glthread_recursive_lock_unlock_func): Update. (glthread_recursive_lock_destroy_func): Update. (glthread_once_func): Update. * import/glthread/lock.h (c11_threads_in_use): Update. (pthread_in_use): Update. (gl_rwlock_initializer): Update. (glthread_rwlock_init): Update. (glthread_rwlock_init_for_glibc): Update. (pth_in_use): Update. (gl_lock_define): Update. (gl_lock_define_initialized): Update. (gl_lock_initializer): Update. (glthread_lock_init): Update. (glthread_lock_lock): Update. (glthread_lock_unlock): Update. (glthread_lock_destroy): Update. (gl_rwlock_define): Update. (gl_rwlock_define_initialized): Update. (glthread_rwlock_rdlock): Update. (glthread_rwlock_wrlock): Update. (glthread_rwlock_unlock): Update. (glthread_rwlock_destroy): Update. (gl_recursive_lock_define): Update. (gl_recursive_lock_define_initialized): Update. (gl_recursive_lock_initializer): Update. (glthread_recursive_lock_init): Update. (glthread_recursive_lock_lock): Update. (glthread_recursive_lock_unlock): Update. (glthread_recursive_lock_destroy): Update. (gl_once_define): Update. (glthread_once): Update. (glthread_once_multithreaded): Update. (glthread_once_singlethreaded): Update. (thread_in_use): Update. (glthread_recursive_lock_init_multithreaded): Update. (glthread_recursive_lock_lock_multithreaded): Update. (glthread_recursive_lock_unlock_multithreaded): Update. (glthread_recursive_lock_destroy_multithreaded): Update. (glthread_lock_init_func): Update. (glthread_lock_lock_func): Update. (glthread_lock_unlock_func): Update. (glthread_lock_destroy_func): Update. (glthread_rwlock_init_func): Update. (glthread_rwlock_rdlock_func): Update. (glthread_rwlock_wrlock_func): Update. (glthread_rwlock_unlock_func): Update. (glthread_rwlock_destroy_func): Update. (glthread_recursive_lock_init_func): Update. (glthread_recursive_lock_lock_func): Update. (glthread_recursive_lock_unlock_func): Update. (glthread_recursive_lock_destroy_func): Update. (glthread_once_func): Update. * import/glthread/threadlib.c: Update. * import/hard-locale.c: Update. * import/hard-locale.h: Update. * import/inet_ntop.c: Update. * import/intprops.h (__has_builtin): Update. (_GL_INT_CONVERT): Update. (_GL_INT_NEGATE_CONVERT): Update. (verify): Update. (_GL_HAS_BUILTIN_OVERFLOW): Update. (_GL_HAS_BUILTIN_ADD_OVERFLOW): Update. (_GL_HAS_BUILTIN_OVERFLOW_P): Update. (_GL_HAS_BUILTIN_MUL_OVERFLOW): Update. (_GL_BINARY_OP_OVERFLOW): Update. (INT_ADD_WRAPV): Update. (INT_SUBTRACT_WRAPV): Update. (INT_MULTIPLY_WRAPV): Update. (_GL_INT_OP_WRAPV): Update. (_GL_INT_OP_WRAPV_SMALLISH): Update. (_GL_INT_OP_WRAPV_LONGISH): Update. (_GL_INT_OP_CALC): Update. (_GL_INT_OP_CALC1): Update. (_GL_INT_OP_WRAPV_VIA_UNSIGNED): Update. (_GL_INT_ADD_RANGE_OVERFLOW): Update. (_GL_INT_SUBTRACT_RANGE_OVERFLOW): Update. (_GL_INT_MULTIPLY_RANGE_OVERFLOW): Update. * import/inttypes.in.h (if): Update. * import/isnan.c: Update. * import/isnand-nolibm.h: Update. * import/isnand.c: Update. * import/isnanl-nolibm.h: Update. * import/isnanl.c: Update. * import/itold.c: Update. * import/libc-config.h: New file. * import/limits.in.h (LLONG_MIN): Update. (LLONG_MAX): Update. (ULLONG_MAX): Update. (WORD_BIT): Update. (LONG_BIT): Update. * import/localcharset.c (setlocale): Update. (relocate): Update. (O_NOFOLLOW): Update. (ISSLASH): Update. (DIRECTORY_SEPARATOR): Update. (getc): Update. (volatile): Update. (get_charset_aliases): Update. (struct table_entry): Update. (alias_table_defined): Update. (locale_table_defined): Update. (locale_charset): Update. (if): Update. * import/localcharset.h: Update. * import/localtime-buffer.c: New file. * import/localtime-buffer.h: New file. * import/lstat.c (rpl_lstat): Update. * import/m4/00gnulib.m4: Update. * import/m4/__inline.m4: New file. * import/m4/absolute-header.m4: Update. * import/m4/alloca.m4: Update. * import/m4/arpa_inet_h.m4: Update. * import/m4/builtin-expect.m4: New file. * import/m4/canonicalize.m4: Update. * import/m4/chdir-long.m4: Update. * import/m4/close.m4: Update. * import/m4/closedir.m4: Update. * import/m4/codeset.m4: Update. * import/m4/configmake.m4: Remove. * import/m4/d-ino.m4: Update. * import/m4/d-type.m4: Update. * import/m4/dirent_h.m4: Update. * import/m4/dirfd.m4: Update. * import/m4/dirname.m4: Update. * import/m4/double-slash-root.m4: Update. * import/m4/dup.m4: Update. * import/m4/dup2.m4: Update. * import/m4/eealloc.m4: Update. * import/m4/environ.m4: Update. * import/m4/errno_h.m4: Update. * import/m4/error.m4: Update. * import/m4/exponentd.m4: Update. * import/m4/exponentl.m4: Update. * import/m4/extensions.m4: Update. * import/m4/extern-inline.m4: Update. * import/m4/fchdir.m4: Update. * import/m4/fcntl-o.m4: Update. * import/m4/fcntl.m4: Update. * import/m4/fcntl_h.m4: Update. * import/m4/fdopendir.m4: Update. * import/m4/filenamecat.m4: Update. * import/m4/flexmember.m4: Update. * import/m4/float_h.m4: Update. * import/m4/fnmatch.m4: Update. * import/m4/fnmatch_h.m4: New file. * import/m4/fpieee.m4: Update. * import/m4/frexp.m4: Update. * import/m4/frexpl.m4: Update. * import/m4/fstat.m4: Update. * import/m4/fstatat.m4: Update. * import/m4/getcwd-abort-bug.m4: Update. * import/m4/getcwd-path-max.m4: Update. * import/m4/getcwd.m4: Update. * import/m4/getdtablesize.m4: Update. * import/m4/getlogin.m4: New file. * import/m4/getlogin_r.m4: Update. * import/m4/getpagesize.m4: New file. * import/m4/getprogname.m4: Update. * import/m4/gettimeofday.m4: Update. * import/m4/glibc21.m4: Remove. * import/m4/glob.m4: Update. * import/m4/glob_h.m4: New file. * import/m4/gnulib-cache.m4: Update. * import/m4/gnulib-common.m4: Update. * import/m4/gnulib-comp.m4: Update. * import/m4/gnulib-tool.m4: Update. * import/m4/hard-locale.m4: Remove. * import/m4/host-cpu-c-abi.m4: New file. * import/m4/include_next.m4: Update. * import/m4/inet_ntop.m4: Update. * import/m4/inttypes-pri.m4: Update. * import/m4/inttypes.m4: Update. * import/m4/isnand.m4: Update. * import/m4/isnanl.m4: Update. * import/m4/largefile.m4: Update. * import/m4/lib-ld.m4: Update. * import/m4/lib-link.m4: Update. * import/m4/lib-prefix.m4: Update. * import/m4/limits-h.m4: Update. * import/m4/localcharset.m4: Update. * import/m4/locale-fr.m4: Update. * import/m4/locale-ja.m4: Update. * import/m4/locale-zh.m4: Update. * import/m4/localtime-buffer.m4: New file. * import/m4/lock.m4: Update. * import/m4/longlong.m4: Update. * import/m4/lstat.m4: Update. * import/m4/malloc.m4: Update. * import/m4/malloca.m4: Update. * import/m4/math_h.m4: Update. * import/m4/mbrtowc.m4: Update. * import/m4/mbsinit.m4: Update. * import/m4/mbsrtowcs.m4: Update. * import/m4/mbstate_t.m4: Update. * import/m4/memchr.m4: Update. * import/m4/memmem.m4: Update. * import/m4/mempcpy.m4: Update. * import/m4/memrchr.m4: Update. * import/m4/mkdir.m4: Update. * import/m4/mkdtemp.m4: Update. * import/m4/mkostemp.m4: Update. * import/m4/mmap-anon.m4: Update. * import/m4/mode_t.m4: Update. * import/m4/msvc-inval.m4: Update. * import/m4/msvc-nothrow.m4: Update. * import/m4/multiarch.m4: Update. * import/m4/netinet_in_h.m4: Update. * import/m4/nocrash.m4: Update. * import/m4/off_t.m4: Update. * import/m4/onceonly.m4: Remove. * import/m4/open-cloexec.m4: New file. * import/m4/open-slash.m4: New file. * import/m4/open.m4: Update. * import/m4/openat.m4: Update. * import/m4/opendir.m4: Update. * import/m4/pathmax.m4: Update. * import/m4/pthread_rwlock_rdlock.m4: New file. * import/m4/rawmemchr.m4: Update. * import/m4/readdir.m4: Update. * import/m4/readlink.m4: Update. * import/m4/realloc.m4: Update. * import/m4/rename.m4: Update. * import/m4/rewinddir.m4: Update. * import/m4/rmdir.m4: Update. * import/m4/save-cwd.m4: Update. * import/m4/secure_getenv.m4: Remove. * import/m4/setenv.m4: Update. * import/m4/signal_h.m4: Update. * import/m4/socklen.m4: Update. * import/m4/sockpfaf.m4: Update. * import/m4/ssize_t.m4: Update. * import/m4/stat-time.m4: New file. * import/m4/stat.m4: Update. * import/m4/std-gnu11.m4: New file. * import/m4/stdalign.m4: Update. * import/m4/stdbool.m4: Update. * import/m4/stddef_h.m4: Update. * import/m4/stdint.m4: Update. * import/m4/stdio_h.m4: Update. * import/m4/stdlib_h.m4: Update. * import/m4/strchrnul.m4: Update. * import/m4/strdup.m4: Update. * import/m4/strerror.m4: Update. * import/m4/strerror_r.m4: Update. * import/m4/string_h.m4: Update. * import/m4/strstr.m4: Update. * import/m4/strtok_r.m4: Update. * import/m4/sys_socket_h.m4: Update. * import/m4/sys_stat_h.m4: Update. * import/m4/sys_time_h.m4: Update. * import/m4/sys_types_h.m4: Update. * import/m4/sys_uio_h.m4: Update. * import/m4/tempname.m4: Update. * import/m4/threadlib.m4: Update. * import/m4/time_h.m4: Update. * import/m4/time_r.m4: Update. * import/m4/unistd-safer.m4: Update. * import/m4/unistd_h.m4: Update. * import/m4/warn-on-use.m4: Update. * import/m4/wchar_h.m4: Update. * import/m4/wchar_t.m4: Update. * import/m4/wctype_h.m4: Update. * import/m4/wint_t.m4: Update. * import/malloc.c: Update. * import/malloc/scratch_buffer.h: New file. * import/malloc/scratch_buffer_grow.c: New file. * import/malloc/scratch_buffer_grow_preserve.c: New file. * import/malloc/scratch_buffer_set_array_size.c: New file. * import/malloca.c (MAGIC_NUMBER): Update. (MAGIC_SIZE): Update. (struct preliminary_header): Update. (HEADER_SIZE): Update. (union header): Update. (verify): Update. (HASH_TABLE_SIZE): Update. (freea): Update. * import/malloca.h (malloca): Update. (nmalloca): Update. * import/malloca.valgrind: Remove. * import/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Update. (func): Update. (rpl_func): Update. (f): Update. (d): Update. (l): Update. (_GL_WARN_ON_USE): Update. (_GL_WARN_ON_USE_ATTRIBUTE): Update. (FP_ILOGB0): Update. (FP_ILOGBNAN): Update. (acosf): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (asinf): Update. (atanf): Update. (atan2f): Update. (cosf): Update. (coshf): Update. (expf): Update. (expl): Update. (expm1l): Update. (ilogbl): Update. (rintl): Update. (sinf): Update. (sinhf): Update. (sqrtf): Update. (tanf): Update. (tanhf): Update. (isfinite): Update. (isinf): Update. (isnan): Update. (GNULIB_defined_signbit): Update. (signbit): Update. * import/mbrtowc.c (FALLTHROUGH): Update. (locale_enc): Update. (locale_enc_cached): Update. (gl_lock_define_initialized): Update. (mbrtowc): Update. * import/mbsinit.c (if): Update. (mbsinit): Update. * import/mbsrtowcs-impl.h: Update. * import/mbsrtowcs-state.c: Update. * import/mbsrtowcs.c: Update. * import/memchr.c: Update. * import/memchr.valgrind: Update. * import/memmem.c (__builtin_expect): Update. * import/mempcpy.c: Update. * import/memrchr.c (__memrchr): Update. * import/mkdir.c (if): Update. * import/mkdtemp.c: Update. * import/mkostemp.c: Update. * import/msvc-inval.c: Update. * import/msvc-inval.h: Update. * import/msvc-nothrow.c: Update. * import/msvc-nothrow.h (if): Update. * import/netinet_in.in.h: Update. * import/open.c (open): Update. (if): Update. * import/openat-die.c: Update. * import/openat-priv.h: Update. * import/openat-proc.c: Update. * import/openat.c (rpl_openat): Update. * import/openat.h: Update. * import/opendir.c: Update. * import/pathmax.h (if): Update. * import/pipe-safer.c: Update. * import/rawmemchr.c: Update. * import/rawmemchr.valgrind: Update. * import/readdir.c (readdir): Update. * import/readlink.c: Update. * import/realloc.c: Update. * import/ref-add.sin: Remove. * import/ref-del.sin: Remove. * import/rename.c (if): Update. * import/rewinddir.c: Update. * import/rmdir.c: Update. * import/same-inode.h (SAME_INODE): Update. * import/save-cwd.c (save_cwd): Update. * import/save-cwd.h: Update. * import/scratch_buffer.h: New file. * import/secure_getenv.c: Remove. * import/setenv.c: Update. * import/signal.in.h: Update. * import/stat-time.c: New file. * import/stat-time.h: New file. * import/stat-w32.c: New file. * import/stat-w32.h: New file. * import/stat.c (if): Update. (stat): Update. (REPLACE_FUNC_STAT_DIR): Update. (WINDOWS_NATIVE): Update. (WIN32_LEAN_AND_MEAN): Update. (is_unc_root): Update. (rpl_stat): Update. * import/stdalign.in.h (elif): Update. * import/stdbool.in.h: Update. * import/stddef.in.h (_GL_STDDEF_ALIGNAS): Update. (max_align_t): Update. (GNULIB_defined_max_align_t): Update. * import/stdint.in.h (WINT_MIN): Update. (WINT_MAX): Update. (_STDINT_MIN): Update. (_STDINT_UNSIGNED_MIN): Update. (_STDINT_SIGNED_MIN): Update. (PTRDIFF_MIN): Update. (SIG_ATOMIC_MIN): Update. (WCHAR_MIN): Update. * import/stdio.in.h (if): Update. * import/stdlib.in.h (if): Update. (_GL_WARN_ON_USE): Update. (_GL_FUNCDECL_SYS): Update. (random): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (srandom): Update. (initstate): Update. (setstate): Update. (_GL_CXXALIAS_SYS): Update. (_GL_CXXALIASWARN): Update. (GNULIB_defined_strtod_function): Update. (strtold): Update. (GNULIB_defined_strtold_function): Update. * import/str-two-way.h: Update. * import/strchrnul.c: Update. * import/strchrnul.valgrind: Update. * import/strdup.c: Update. * import/streq.h: Update. * import/strerror-override.c: Update. * import/strerror-override.h: Update. * import/strerror.c (strerror): Update. * import/strerror_r.c (safe_copy): Update. * import/string.in.h (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (_GL_CXXALIASWARN): Update. (_GL_WARN_ON_USE): Update. * import/stripslash.c: Update. * import/strnlen1.c: Update. * import/strnlen1.h: Update. * import/strstr.c (__builtin_expect): Update. * import/strtok_r.c: Update. * import/sys_socket.in.h (CMSG_SPACE): Update. (CMSG_LEN): Update. (struct sockaddr_storage): Update. (SO_REUSEPORT): Update. (_GL_WARN_ON_USE): Update. * import/sys_stat.in.h (if): Update. (stat): Update. (struct stat): Update. (st_atime): Update. (st_mtime): Update. (st_ctime): Update. (_GL_WINDOWS_STAT_TIMESPEC): Update. (GNULIB_defined_struct_stat): Update. (_S_IFBLK): Update. (_S_IFLNK): Update. (_S_IFSOCK): Update. (fstat): Update. (fstatat): Update. (lstat): Update. (stat64): Update. (_stat64): Update. (_stat32i64): Update. (_stati64): Update. (_stat32): Update. (_stat64i32): Update. * import/sys_time.in.h: Update. * import/sys_types.in.h (dev_t): Update. (GNULIB_defined_dev_t): Update. (ino_t): Update. (GNULIB_defined_ino_t): Update. (_GL_WINDOWS_STAT_INODES): Update. (if): Update. * import/sys_uio.in.h: Update. * import/tempname.c (__secure_getenv): Update. (try_nocreate): Update. * import/tempname.h: Update. * import/time.in.h (tzset): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (_GL_CXXALIASWARN): Update. (ctime): Update. (strftime): Update. * import/time_r.c: Update. * import/unistd--.h: Update. * import/unistd-safer.h: Update. * import/unistd.in.h (if): Update. (elif): Update. (__need_getopt): Update. (access): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_CXXALIAS_SYS): Update. (_GL_CXXALIASWARN): Update. (_GL_WARN_ON_USE): Update. (_GL_FUNCDECL_SYS): Update. (__declspec): Update. (_GL_WARN_ON_USE_ATTRIBUTE): Update. (faccessat): Update. (getpass): Update. (truncate): Update. * import/unsetenv.c: Update. * import/verify.h (if): Update. (_GL_HAVE__STATIC_ASSERT): Update. (_GL_HAVE_STATIC_ASSERT): Update. (_GL_HAVE__STATIC_ASSERT1): Update. (_GL_HAVE_STATIC_ASSERT1): Update. (_GL_VERIFY): Update. (_Static_assert): Update. (_GL_HAS_BUILTIN_TRAP): Update. (_GL_HAS_BUILTIN_UNREACHABLE): Update. (verify_true): Update. (verify): Update. (__has_builtin): Update. (elif): Update. (assume): Update. * import/warn-on-use.h: Rename from import/extra/snippet/warn-on-use.h. * import/wchar.in.h (if): Update. (wcsftime): Update. (_GL_FUNCDECL_RPL): Update. (_GL_CXXALIAS_RPL): Update. (_GL_FUNCDECL_SYS): Update. (_GL_CXXALIAS_SYS): Update. (_GL_CXXALIASWARN): Update. (_GL_WARN_ON_USE): Update. * import/wctype.in.h (rpl_iswalnum): Update. (rpl_iswalpha): Update. (rpl_iswblank): Update. (rpl_iswcntrl): Update. (rpl_iswdigit): Update. (rpl_iswgraph): Update. (rpl_iswlower): Update. (rpl_iswprint): Update. (rpl_iswpunct): Update. (rpl_iswspace): Update. (rpl_iswupper): Update. (rpl_iswxdigit): Update. (rpl_towlower): Update. (rpl_towupper): Update. (iswalnum): Update. (iswalpha): Update. (iswblank): Update. (iswcntrl): Update. (iswdigit): Update. (iswgraph): Update. (iswlower): Update. (iswprint): Update. (iswpunct): Update. (iswspace): Update. (iswupper): Update. (iswxdigit): Update. (towlower): Update. (towupper): Update. * import/windows-initguard.h: New file. * import/windows-mutex.c: New file. * import/windows-mutex.h: New file. * import/windows-once.c: New file. * import/windows-once.h: New file. * import/windows-recmutex.c: New file. * import/windows-recmutex.h: New file. * import/windows-rwlock.c: New file. * import/windows-rwlock.h: New file. * import/xalloc-oversized.h: New file. * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch: Remove. * patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch: Remove. * patches/0003-Fix-glob-c-Coverity-issues.patch: Remove. * update-gnulib.sh: Update to latest gnulib and don't apply patches anymore. Also updates the patch -p flag to the current directory structure in case patches are needed again in the future. Change-Id: I9c2b07a3046baecfb664e21b2644353ea888dbfa
* Add no-dist to gnulib configureTom Tromey2019-11-151-0/+6
| | | | | | | | | | | | | | | 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
* Import the time_r gnulib moduleChristian Biesinger2019-11-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows GDB to use localtime_r unconditionally. See https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00022.html for details on the compile error mentioned below. gdb/ChangeLog: 2019-11-15 Christian Biesinger <cbiesinger@google.com> * gdbsupport/common-defs.h: Include time.h before pathmax.h to avoid compile errors. 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/m4/gnulib-cache.m4: Update. * import/m4/gnulib-comp.m4: Update. * import/m4/time_r.m4: New file. * import/time_r.c: New file. * update-gnulib.sh: Import time_r. Change-Id: I53fc861b192940d613ca97f2910b4533c730f667
* Import the strerror_r-posix module and use it in GDB.Christian Biesinger2019-11-151-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Generate gnulib's toplevel Makefile.in using automakeChristian Biesinger2019-11-151-0/+11
| | | | | | | | | | | | | | | | | | | | | 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
* gnulib: Fix path to import/Makefile{,.in}Christian Biesinger2019-11-121-0/+4
| | | | | | | | | | | | 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
* Regenerate gnulib filesChristian Biesinger2019-11-061-0/+5
| | | | | | | | | | | | | | | | | It looks like autoheader and automake weren't run for commit 73cc72729a184f00bf6fc4d74684a8516ba6b683. 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
* Fix Gnulib glob.c resource leaks found by CoverityGary Benson2019-08-281-0/+6
| | | | | | | | | | | 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.
* Fix gnulib/update-gnulib.shGary Benson2019-06-211-0/+4
| | | | | | | | | 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.
* Move gnulib to top levelTom Tromey2019-06-141-0/+6
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.