binutils-gdb/gnulib/update-gnulib.sh

184 lines
5.3 KiB
Bash
Raw Normal View History

#! /bin/sh
# Copyright (C) 2011-2020 Free Software Foundation, Inc.
#
# This file is part of GDB.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Usage: update-gnulib.sh <path-to-gnulib-repository>
# Update our import of gnulib in the GDB source tree.
#
# This script assumes that it is being called from the gdb/gnulib
# subdirectory, and will verify this before proceeding.
#
# This script will also make a number of other verifications:
# . The gnulib version (it should match $GNULIB_COMMIT_SHA1).
# . The correct versions of the auto-tools that are used to
# regenerate the various scripts and Makefiles are on the PATH.
# The list of gnulib modules we are importing in GDB.
IMPORTED_GNULIB_MODULES="\
alloca \
canonicalize-lgpl \
gnulib: import count-one-bits module and use it 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.
2020-02-14 20:41:07 +01:00
count-one-bits \
dirent \
dirfd \
errno \
fnmatch-gnu \
frexpl \
Import "glob" and "getcwd" modules from gnulib These two modules are necessary because of the rework that will be done in the "change directory" logic on GDB/gdbserver in the next commits. First, we will get rid of the "gdb_dirbuf" global variable and instead rely on the fact that "getcwd (NULL, 0)", which is a GNU extension, returns a heap-allocated string with the necessary bytes to hold the full path. This is a good practice not only because globals are not ideal but also because there is no good way to know beforehand the size of the full pathname allowed in the filesystem ("PATH_MAX" is not portable and does not reflect all the possible filesystems out there). We will also have a way to "cd" to a directory also on gdbserver, but in order to do that uniformly, there must be a way to do tilde expansion on directories provided by the user. Currently, GDB uses "tilde_expand" from readline to do that, but gdbserver doesn't link against readline and therefore cannot use this function. The solution is to use "glob" instead, which can perform tilde expansion as a GNU extension. Therefore, we need gnulib's version of "glob". A special note is necessary for gdb/ser-tcp.c. It defines "close" as "closesocket" on Win32 targets. If we leave the code as is, this would conflict with gnulib's definition of "close". Therefore, in order to keep the same code path from before this import, I decided to "#undef close" first, and then let the original (re)definition of it take place. gdb/ChangeLog: 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com> * gnulib/aclocal.m4: Regenerate. * gnulib/config.in: Regenerate. * gnulib/configure: Regenerate. * gnulib/import/Makefile.am: Regenerate. * gnulib/import/Makefile.in: Regenerate. * gnulib/import/assure.h: New file. * gnulib/import/at-func.c: Likewise * gnulib/import/chdir-long.c: New file. * gnulib/import/chdir-long.h: New file. * gnulib/import/cloexec.c: New file. * gnulib/import/cloexec.h: New file. * gnulib/import/close.c: New file. * gnulib/import/closedir.c: New file. * gnulib/import/dirent-private.h: New file. * gnulib/import/dup-safer.c: New file. * gnulib/import/dup.c: New file. * gnulib/import/dup2.c: New file. * gnulib/import/error.c: New file. * gnulib/import/error.h: New file. * gnulib/import/exitfail.c: New file. * gnulib/import/exitfail.h: New file. * gnulib/import/fchdir.c: New file. * gnulib/import/fcntl.c: New file. * gnulib/import/fcntl.in.h: New file. * gnulib/import/fd-hook.c: New file. * gnulib/import/fd-hook.h: New file. * gnulib/import/fd-safer.c: New file. * gnulib/import/fdopendir.c: New file. * gnulib/import/filename.h: New file. * gnulib/import/filenamecat-lgpl.c: New file. * gnulib/import/filenamecat.h: New file. * gnulib/import/fstat.c: New file. * gnulib/import/fstatat.c: New file. * gnulib/import/getcwd-lgpl.c: New file. * gnulib/import/getcwd.c: New file. * gnulib/import/getdtablesize.c: New file. * gnulib/import/getlogin_r.c: New file. * gnulib/import/getprogname.c: New file. * gnulib/import/getprogname.h: New file. * gnulib/import/gettext.h: New file. * gnulib/import/glob-libc.h: New file. * gnulib/import/glob.c: New file. * gnulib/import/glob.in.h: New file. * gnulib/import/intprops.h: New file. * gnulib/import/m4/chdir-long.m4: New file. * gnulib/import/m4/close.m4: New file. * gnulib/import/m4/closedir.m4: New file. * gnulib/import/m4/d-ino.m4: New file. * gnulib/import/m4/d-type.m4: New file. * gnulib/import/m4/dup.m4: New file. * gnulib/import/m4/dup2.m4: New file. * gnulib/import/m4/error.m4: New file. * gnulib/import/m4/fchdir.m4: New file. * gnulib/import/m4/fcntl.m4: New file. * gnulib/import/m4/fcntl_h.m4: New file. * gnulib/import/m4/fdopendir.m4: New file. * gnulib/import/m4/filenamecat.m4: New file. * gnulib/import/m4/fstat.m4: New file. * gnulib/import/m4/fstatat.m4: New file. * gnulib/import/m4/getcwd-abort-bug.m4: New file. * gnulib/import/m4/getcwd-path-max.m4: New file. * gnulib/import/m4/getcwd.m4: New file. * gnulib/import/m4/getdtablesize.m4: New file. * gnulib/import/m4/getlogin_r.m4: New file. * gnulib/import/m4/getprogname.m4: New file. * gnulib/import/m4/glob.m4: New file. * gnulib/import/m4/gnulib-cache.m4: Regenerate. * gnulib/import/m4/gnulib-comp.m4: Regenerate. * gnulib/import/m4/mempcpy.m4: New file. * gnulib/import/m4/memrchr.m4: New file. * gnulib/import/m4/mode_t.m4: New file. * gnulib/import/m4/msvc-inval.m4: New file. * gnulib/import/m4/msvc-nothrow.m4: New file. * gnulib/import/m4/open.m4: New file. * gnulib/import/m4/openat.m4: New file. * gnulib/import/m4/opendir.m4: New file. * gnulib/import/m4/readdir.m4: New file. * gnulib/import/m4/realloc.m4: New file. * gnulib/import/m4/rewinddir.m4: New file. * gnulib/import/m4/save-cwd.m4: New file. * gnulib/import/m4/strdup.m4: New file. * gnulib/import/m4/strerror.m4: New file. * gnulib/import/m4/unistd-safer.m4: New file. * gnulib/import/mempcpy.c: New file. * gnulib/import/memrchr.c: New file. * gnulib/import/msvc-inval.c: New file. * gnulib/import/msvc-inval.h: New file. * gnulib/import/msvc-nothrow.c: New file. * gnulib/import/msvc-nothrow.h: New file. * gnulib/import/open.c: New file. * gnulib/import/openat-die.c: New file. * gnulib/import/openat-priv.h: New file. * gnulib/import/openat-proc.c: New file. * gnulib/import/openat.c: New file. * gnulib/import/openat.h: New file. * gnulib/import/opendir.c: New file. * gnulib/import/pipe-safer.c: New file. * gnulib/import/readdir.c: New file. * gnulib/import/realloc.c: New file. * gnulib/import/rewinddir.c: New file. * gnulib/import/save-cwd.c: New file. * gnulib/import/save-cwd.h: New file. * gnulib/import/strdup.c: New file. * gnulib/import/strerror-override.c: New file. * gnulib/import/strerror-override.h: New file. * gnulib/import/strerror.c: New file. * gnulib/import/unistd--.h: New file. * gnulib/import/unistd-safer.h: New file. * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add "getcwd" and "glob". * ser-tcp.c: Undefine "close" before redefining it.
2017-09-09 02:09:12 +02:00
getcwd \
glob \
inet_ntop
inttypes \
lstat \
Update gnulib to current upstream master I tried building gdb with G++ 4.7 and CXX="g++ -std=gnu+11", and that tripped on a build error: In file included from build-gnulib/import/stdio.h:53:0, from /home/pedro/gdb/mygit/cxx-convertion/src/gdb/common/common-defs.h:31, from /home/pedro/gdb/mygit/cxx-convertion/src/gdb/defs.h:28, from /home/pedro/gdb/mygit/cxx-convertion/src/gdb/armobsd-tdep.c:20: build-gnulib/import/stddef.h:104:3: error: conflicting declaration ‘typedef union max_align_t max_align_t’ In file included from build-gnulib/import/stddef.h:55:0, from build-gnulib/import/stdio.h:53, from /home/pedro/gdb/mygit/cxx-convertion/src/gdb/common/common-defs.h:31, from /home/pedro/gdb/mygit/cxx-convertion/src/gdb/defs.h:28, from /home/pedro/gdb/mygit/cxx-convertion/src/gdb/armobsd-tdep.c:20: /opt/gcc-4.7/lib/gcc/x86_64-unknown-linux-gnu/4.7.4/include/stddef.h:426:3: error: ‘max_align_t’ has a previous declaration as ‘typedef struct max_align_t max_align_t’ Updating gnulib to current master fixes it, since it brings in this fix: http://lists.gnu.org/archive/html/bug-gnulib/2016-04/msg00000.html Our last update was in August 2015. This doesn't bring in much added baggage, it's mostly bug fixes. It pulled in the "limits-h" module as automatic dependency, and given that looks potentially useful I added it to the set of modules we require. Tested on x86_64 Fedora 23, with g++ 4.7 and g++ 5.3, native and gdbserver. gdb/ChangeLog: 2016-10-18 Pedro Alves <palves@redhat.com> * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to 2692e23a48e21f6daa029e8af9f1a143b7532f47. * gnulib/configure, gnulib/config.in, gnulib/aclocal.m4: Regenerate. * gnulib/import/Makefile: Update. * gnulib/import/alloca: Update. * gnulib/import/basename-lgpl: Update. * gnulib/import/canonicalize-lgpl: Update. * gnulib/import/config: Update. * gnulib/import/dirent: Update. * gnulib/import/dirfd: Update. * gnulib/import/dirname-lgpl: Update. * gnulib/import/dirname.h: Update. * gnulib/import/dosname.h: Update. * gnulib/import/errno: Update. * gnulib/import/extra/snippet/arg-nonnull.h: Update. * gnulib/import/extra/snippet/c++defs.h: Update. * gnulib/import/extra/snippet/warn-on-use.h: Update. * gnulib/import/extra/update-copyright: Update. * gnulib/import/flexmember.h: Update. * gnulib/import/float+.h: Update. * gnulib/import/float: Update. * gnulib/import/float: Update. * gnulib/import/fnmatch: Update. * gnulib/import/fnmatch: Update. * gnulib/import/fnmatch_loop: Update. * gnulib/import/fpucw.h: Update. * gnulib/import/frexp: Update. * gnulib/import/frexpl: Update. * gnulib/import/gettimeofday: Update. * gnulib/import/hard-locale: Update. * gnulib/import/hard-locale.h: Update. * gnulib/import/inttypes: Update. * gnulib/import/isnan: Update. * gnulib/import/isnand-nolibm.h: Update. * gnulib/import/isnand: Update. * gnulib/import/isnanl-nolibm.h: Update. * gnulib/import/isnanl: Update. * gnulib/import/itold: Update. * gnulib/import/limits: Update. * gnulib/import/localcharset: Update. * gnulib/import/localcharset.h: Update. * gnulib/import/lstat: Update. * gnulib/import/m4/00gnulib: Update. * gnulib/import/m4/absolute-header: Update. * gnulib/import/m4/alloca: Update. * gnulib/import/m4/canonicalize: Update. * gnulib/import/m4/codeset: Update. * gnulib/import/m4/configmake: Update. * gnulib/import/m4/dirent_h: Update. * gnulib/import/m4/dirfd: Update. * gnulib/import/m4/dirname: Update. * gnulib/import/m4/double-slash-root: Update. * gnulib/import/m4/eealloc: Update. * gnulib/import/m4/errno_h: Update. * gnulib/import/m4/exponentd: Update. * gnulib/import/m4/exponentl: Update. * gnulib/import/m4/extensions: Update. * gnulib/import/m4/extern-inline: Update. * gnulib/import/m4/fcntl-o: Update. * gnulib/import/m4/flexmember: Update. * gnulib/import/m4/float_h: Update. * gnulib/import/m4/fnmatch: Update. * gnulib/import/m4/fpieee: Update. * gnulib/import/m4/frexp: Update. * gnulib/import/m4/frexpl: Update. * gnulib/import/m4/gettimeofday: Update. * gnulib/import/m4/glibc21: Update. * gnulib/import/m4/gnulib-cache: Update. * gnulib/import/m4/gnulib-common: Update. * gnulib/import/m4/gnulib-comp: Update. * gnulib/import/m4/gnulib-tool: Update. * gnulib/import/m4/hard-locale: Update. * gnulib/import/m4/include_next: Update. * gnulib/import/m4/inttypes-pri: Update. * gnulib/import/m4/inttypes: Update. * gnulib/import/m4/isnand: Update. * gnulib/import/m4/isnanl: Update. * gnulib/import/m4/largefile: Update. * gnulib/import/m4/limits-h: Update. * gnulib/import/m4/localcharset: Update. * gnulib/import/m4/locale-fr: Update. * gnulib/import/m4/locale-ja: Update. * gnulib/import/m4/locale-zh: Update. * gnulib/import/m4/longlong: Update. * gnulib/import/m4/lstat: Update. * gnulib/import/m4/malloc: Update. * gnulib/import/m4/malloca: Update. * gnulib/import/m4/math_h: Update. * gnulib/import/m4/mbrtowc: Update. * gnulib/import/m4/mbsinit: Update. * gnulib/import/m4/mbsrtowcs: Update. * gnulib/import/m4/mbstate_t: Update. * gnulib/import/m4/memchr: Update. * gnulib/import/m4/memmem: Update. * gnulib/import/m4/mmap-anon: Update. * gnulib/import/m4/multiarch: Update. * gnulib/import/m4/nocrash: Update. * gnulib/import/m4/off_t: Update. * gnulib/import/m4/pathmax: Update. * gnulib/import/m4/rawmemchr: Update. * gnulib/import/m4/readlink: Update. * gnulib/import/m4/rename: Update. * gnulib/import/m4/rmdir: Update. * gnulib/import/m4/signal_h: Update. * gnulib/import/m4/ssize_t: Update. * gnulib/import/m4/stat: Update. * gnulib/import/m4/stdbool: Update. * gnulib/import/m4/stddef_h: Update. * gnulib/import/m4/stdint: Update. * gnulib/import/m4/stdio_h: Update. * gnulib/import/m4/stdlib_h: Update. * gnulib/import/m4/strchrnul: Update. * gnulib/import/m4/string_h: Update. * gnulib/import/m4/strstr: Update. * gnulib/import/m4/strtok_r: Update. * gnulib/import/m4/sys_socket_h: Update. * gnulib/import/m4/sys_stat_h: Update. * gnulib/import/m4/sys_time_h: Update. * gnulib/import/m4/sys_types_h: Update. * gnulib/import/m4/time_h: Update. * gnulib/import/m4/unistd_h: Update. * gnulib/import/m4/warn-on-use: Update. * gnulib/import/m4/wchar_h: Update. * gnulib/import/m4/wchar_t: Update. * gnulib/import/m4/wctype_h: Update. * gnulib/import/m4/wint_t: Update. * gnulib/import/malloc: Update. * gnulib/import/malloca: Update. * gnulib/import/malloca.h: Update. * gnulib/import/math: Update. * gnulib/import/math: Update. * gnulib/import/mbrtowc: Update. * gnulib/import/mbsinit: Update. * gnulib/import/mbsrtowcs-impl.h: Update. * gnulib/import/mbsrtowcs-state: Update. * gnulib/import/mbsrtowcs: Update. * gnulib/import/memchr: Update. * gnulib/import/memmem: Update. * gnulib/import/pathmax.h: Update. * gnulib/import/rawmemchr: Update. * gnulib/import/readlink: Update. * gnulib/import/ref-add.sin: Update. * gnulib/import/ref-del.sin: Update. * gnulib/import/rename: Update. * gnulib/import/rmdir: Update. * gnulib/import/same-inode.h: Update. * gnulib/import/signal: Update. * gnulib/import/stat: Update. * gnulib/import/stdbool: Update. * gnulib/import/stddef: Update. * gnulib/import/stdint: Update. * gnulib/import/stdio: Update. * gnulib/import/stdlib: Update. * gnulib/import/str-two-way.h: Update. * gnulib/import/strchrnul: Update. * gnulib/import/streq.h: Update. * gnulib/import/string: Update. * gnulib/import/stripslash: Update. * gnulib/import/strnlen1: Update. * gnulib/import/strnlen1.h: Update. * gnulib/import/strstr: Update. * gnulib/import/strtok_r: Update. * gnulib/import/sys_stat: Update. * gnulib/import/sys_time: Update. * gnulib/import/sys_types: Update. * gnulib/import/time: Update. * gnulib/import/unistd: Update. * gnulib/import/unistd: Update. * gnulib/import/verify.h: Update. * gnulib/import/wchar: Update. * gnulib/import/wctype: Update. * gnulib/import/flexmember.h: New file. * gnulib/import/hard-locale.c: New file. * gnulib/import/hard-locale.h: New file. * gnulib/import/limits.in.h: New file. * gnulib/import/m4/flexmember.m4: New file. * gnulib/import/m4/hard-locale.m4: New file. * gnulib/import/m4/limits-h.m4: New file.
2016-10-18 18:18:29 +02:00
limits-h \
memchr \
memmem \
mkdir \
Import mkdtemp gnulib module, fix mingw build Building with mingw currently fails: CXX unittests/mkdir-recursive-selftests.o /home/emaisin/src/binutils-gdb/gdb/unittests/mkdir-recursive-selftests.c: In function ‘void selftests::mkdir_recursive::test()’: /home/emaisin/src/binutils-gdb/gdb/unittests/mkdir-recursive-selftests.c:49:20: error: ‘mkdtemp’ was not declared in this scope if (mkdtemp (base) == NULL) ^ Commit e418a61a67a ("Move mkdir_recursive to common/filestuff.c") moved this code, but also removed the HAVE_MKDTEMP guard which prevented the mkdtemp call to be compiled on mingw. We can either put back the HAVE_MKDTEMP ifdef, or import the gnulib mkdtemp module, which provides the function for mingw. Since the mkdir_recursive is susceptible to be used on mingw at some point, I think it would be nice to have it tested on mingw, so I did the latter. Once built, I tested it on Windows (copied the resulting gdb.exe on a Windows machine, ran it, and ran "maint selftest mkdir_recursive"). It failed, because the temporary directory is hardcoded to "/tmp/...". I therefore added and used a new get_standard_temp_dir function, which returns an appropriate temporary directory for the host platform. gdb/ChangeLog: * common/pathstuff.c (get_standard_temp_dir): New. * common/pathstuff.h (get_standard_temp_dir): New. * config.in: Re-generate. * configure: Re-generate. * configure.ac: Don't check for mkdtemp. * gnulib/aclocal-m4-deps.mk: Re-generate. * gnulib/aclocal.m4: Re-generate. * gnulib/config.in: Re-generate. * gnulib/configure: Re-generate. * gnulib/import/Makefile.am: Re-generate. * gnulib/import/Makefile.in: Re-generate. * gnulib/import/m4/gnulib-cache.m4: Re-generate. * gnulib/import/m4/gnulib-comp.m4: Re-generate. * gnulib/import/m4/mkdtemp.m4: New file. * gnulib/import/mkdtemp.c: New file. * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdtemp module. * unittests/mkdir-recursive-selftests.c (test): Use get_standard_temp_dir. (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP ifdef. * compile/compile.c (get_compile_file_tempdir): Likewise.
2018-11-01 20:40:43 +01:00
mkdtemp \
mkostemp \
pathmax \
rawmemchr \
readlink \
rename \
setenv \
signal-h \
strchrnul \
strerror_r-posix \
strstr \
strtok_r \
sys_stat \
time_r \
unistd \
unsetenv \
update-copyright \
wchar \
wctype-h \
"
# The gnulib commit ID to use for the update.
GNULIB_COMMIT_SHA1="e22cd2677a4b7beacbf30b93bb0559f7b89f96ce"
# The expected version number for the various auto tools we will
# use after the import.
Bump to autoconf 2.69 and automake 1.15.1 When trying to run the update-gnulib.sh script in gdb, I get this: Error: Wrong automake version (Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^ =:+{}]+)}/ at /opt/automake/1.11.1/bin/automake line 4113.), we need 1.11.1. Aborting. Apparently, it's an issue with a regex in automake that triggers a warning starting with Perl 5.22. It has been fixed in automake 1.15.1. So I think it's a good excuse to bump the versions of autoconf and automake used in the gnulib import. And to avoid requiring multiple builds of autoconf/automake, it was suggested that we bump the required version of those tools for all binutils-gdb. For autoconf, the 2.69 version is universally available, so it's an easy choice. For automake, different distros and distro versions have different automake versions. But 1.15.1 seems to be the most readily available as a package. In any case, it's easy to build it from source. I removed the version checks from AUTOMAKE_OPTIONS and AC_PREREQ, because I don't think they are useful in our case. They only specify a lower bound for the acceptable version of automake/autoconf. That's useful if you let the user choose the version of the tool they want to use, but want to set a minimum version (because you use a feature that was introduced in that version). In our case, we force people to use a specific version anyway. For the autoconf version, we have the check in config/override.m4 that enforces the version we want. It will be one less thing to update next time we change autotools version. I hit a few categories of problems that required some changes. They are described below along with the chosen solutions. Problem 1: configure.ac:17: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated. For more info, see: configure.ac:17: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation Solution 1: Adjust the code based on the example at that URL. Problem 2 (in zlib/): Makefile.am: error: required file './INSTALL' not found Makefile.am: 'automake --add-missing' can install 'INSTALL' Makefile.am: error: required file './NEWS' not found Makefile.am: error: required file './AUTHORS' not found Makefile.am: error: required file './COPYING' not found Makefile.am: 'automake --add-missing' can install 'COPYING' Solution 2: Add the foreign option to AUTOMAKE_OPTIONS. Problem 3: doc/Makefile.am:20: error: support for Cygnus-style trees has been removed Solution 3: Remove the cygnus options. Problem 4: Makefile.am:656: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') Solution 4: Rename "INCLUDES = " to "AM_CPPFLAGS += " (because AM_CPPFLAGS is already defined earlier). Problem 5: doc/Makefile.am:71: warning: suffix '.texinfo' for Texinfo files is discouraged; use '.texi' instead doc/Makefile.am: warning: Oops! doc/Makefile.am: It appears this file (or files included by it) are triggering doc/Makefile.am: an undocumented, soon-to-be-removed automake hack. doc/Makefile.am: Future automake versions will no longer place in the builddir doc/Makefile.am: (rather than in the srcdir) the generated '.info' files that doc/Makefile.am: appear to be cleaned, by e.g. being listed in CLEANFILES or doc/Makefile.am: DISTCLEANFILES. doc/Makefile.am: If you want your '.info' files to be placed in the builddir doc/Makefile.am: rather than in the srcdir, you have to use the shiny new doc/Makefile.am: 'info-in-builddir' automake option. Solution 5: Rename .texinfo files to .texi. Problem 6: doc/Makefile.am: warning: Oops! doc/Makefile.am: It appears this file (or files included by it) are triggering doc/Makefile.am: an undocumented, soon-to-be-removed automake hack. doc/Makefile.am: Future automake versions will no longer place in the builddir doc/Makefile.am: (rather than in the srcdir) the generated '.info' files that doc/Makefile.am: appear to be cleaned, by e.g. being listed in CLEANFILES or doc/Makefile.am: DISTCLEANFILES. doc/Makefile.am: If you want your '.info' files to be placed in the builddir doc/Makefile.am: rather than in the srcdir, you have to use the shiny new doc/Makefile.am: 'info-in-builddir' automake option. Solution 6: Remove the hack at the bottom of doc/Makefile.am and use the info-in-builddir automake option. Problem 7: doc/Makefile.am:35: error: required file '../texinfo.tex' not found doc/Makefile.am:35: 'automake --add-missing' can install 'texinfo.tex' Solution 7: Use the no-texinfo.tex automake option. We also have one in texinfo/texinfo.tex, not sure if we should point to that, or move it (or a newer version of it added with automake --add-missing) to top-level. Problem 8: Makefile.am:131: warning: source file 'config/tc-aarch64.c' is in a subdirectory, Makefile.am:131: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. Solution 8: Use subdir-objects, that means adjusting references to some .o that will now be in config/. Problem 9: configure.ac:375: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2601: _AC_COMPILE_IFELSE is expanded from... ../../lib/autoconf/general.m4:2617: AC_COMPILE_IFELSE is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2042: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:2063: AC_CACHE_CHECK is expanded from... configure.ac:375: the top level Solution 9: Use AC_LANG_SOURCE, or use proper quoting. Problem 10 (in intl/): configure.ac:7: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS /usr/share/aclocal/threadlib.m4:36: gl_THREADLIB_EARLY_BODY is expanded from... /usr/share/aclocal/threadlib.m4:29: gl_THREADLIB_EARLY is expanded from... /usr/share/aclocal/threadlib.m4:318: gl_THREADLIB is expanded from... /usr/share/aclocal/lock.m4:9: gl_LOCK is expanded from... /usr/share/aclocal/intl.m4:211: gt_INTL_SUBDIR_CORE is expanded from... /usr/share/aclocal/intl.m4:25: AM_INTL_SUBDIR is expanded from... /usr/share/aclocal/gettext.m4:57: AM_GNU_GETTEXT is expanded from... configure.ac:7: the top level Solution 10: Add AC_USE_SYSTEM_EXTENSIONS in configure.ac. ChangeLog: * libtool.m4: Use AC_LANG_SOURCE. * configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE. * README-maintainer-mode: Update version requirements. * ar-lib: New file. * test-driver: New file. * configure: Re-generate. bfd/ChangeLog: * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11. (INCLUDES): Rename to ... (AM_CPPFLAGS): ... this. * configure.ac: Remove AC_PREREQ. * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove 1.9, cygnus, add info-in-builddir no-texinfo.tex. (info_TEXINFOS): Rename bfd.texinfo to bfd.texi. * doc/bfd.texinfo: Rename to ... * doc/bfd.texi: ... this. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * config.in: Re-generate. * configure: Re-generate. * doc/Makefile.in: Re-generate. binutils/ChangeLog: * configure.ac: Remove AC_PREREQ. * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, add info-in-builddir no-texinfo.tex. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * config.in: Re-generate. * configure: Re-generate. * doc/Makefile.in: Re-generate. config/ChangeLog: * override.m4 (_GCC_AUTOCONF_VERSION): Bump from 2.64 to 2.69. etc/ChangeLog: * configure.in: Remove AC_PREREQ. * configure: Re-generate. gas/ChangeLog: * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11, add subdir-objects. (TARG_CPU_O, OBJ_FORMAT_O, ATOF_TARG_O): Add config/ prefix. * configure.ac (TARG_CPU_O, OBJ_FORMAT_O, ATOF_TARG_O, emfiles, extra_objects): Add config/ prefix. * doc/as.texinfo: Rename to... * doc/as.texi: ... this. * doc/Makefile.am: Rename as.texinfo to as.texi throughout. Remove DISTCLEANFILES hack. (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add no-texinfo.tex and info-in-builddir. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * config.in: Re-generate. * configure: Re-generate. * doc/Makefile.in: Re-generate. gdb/ChangeLog: * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION, PACKAGE_STRING, PACKAGE_TARNAME): Undefine. * configure.ac: Remove AC_PREREQ, add missing quoting. * gnulib/configure.ac: Modernize usage of AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ. * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69. (AUTOMAKE_VERSION): Bump to 1.15.1. * configure: Re-generate. * config.in: Re-generate. * aclocal.m4: Re-generate. * gnulib/aclocal.m4: Re-generate. * gnulib/config.in: Re-generate. * gnulib/configure: Re-generate. * gnulib/import/Makefile.in: Re-generate. gdb/gdbserver/ChangeLog: * configure.ac: Remove AC_PREREQ, add missing quoting. * configure: Re-generate. * config.in: Re-generate. * aclocal.m4: Re-generate. gdb/testsuite/ChangeLog: * configure.ac: Remove AC_PREREQ. * configure: Re-generate. gold/ChangeLog: * configure.ac: Remove AC_PREREQ, add missing quoting and usage of AC_LANG_SOURCE. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * configure: Re-generate. * testsuite/Makefile.in: Re-generate. gprof/ChangeLog: * configure.ac: Remove AC_PREREQ. * Makefile.am: Remove DISTCLEANFILES hack. (AUTOMAKE_OPTIONS): Remove 1.11, add info-in-builddir. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * configure: Re-generate. * gconfig.in: Re-generate. intl/ChangeLog: * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS, remove AC_PREREQ. * configure: Re-generate. * config.h.in: Re-generate. * aclocal.m4: Re-generate. ld/ChangeLog: * configure.ac: Remove AC_PREREQ. * Makefile.am: Remove DISTCLEANFILES hack, rename ld.texinfo to ld.texi, ldint.texinfo to ldint.texi throughout. (AUTOMAKE_OPTIONS): Add info-in-builddir. * README: Rename ld.texinfo to ld.texi, ldint.texinfo to ldint.texi throughout. * gen-doc.texi: Likewise. * h8-doc.texi: Likewise. * ld.texinfo: Rename to ... * ld.texi: ... this. * ldint.texinfo: Rename to ... * ldint.texi: ... this. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * config.in: Re-generate. * configure: Re-generate. libdecnumber/ChangeLog: * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * aclocal.m4. libiberty/ChangeLog: * configure.ac: Remove AC_PREREQ. * configure: Re-generate. * config.in: Re-generate. opcodes/ChangeLog: * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.11. * configure.ac: Remove AC_PREREQ. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * configure: Re-generate. readline/ChangeLog.gdb: * configure: Re-generate. * examples/rlfe/configure: Re-generate. sim/ChangeLog: * All configure.ac: Remove AC_PREREQ. * All configure: Re-generate. zlib/ChangeLog.bin-gdb: * configure.ac: Modernize AC_INIT call, remove AC_PREREQ. * Makefile.am (AUTOMAKE_OPTIONS): Remove 1.8, cygnus, add foreign. * Makefile.in: Re-generate. * aclocal.m4: Re-generate. * configure: Re-generate.
2018-06-19 22:54:48 +02:00
AUTOCONF_VERSION="2.69"
AUTOMAKE_VERSION="1.15.1"
ACLOCAL_VERSION="$AUTOMAKE_VERSION"
if [ $# -ne 1 ]; then
echo "Error: Path to gnulib repository missing. Aborting."
echo "Usage: update-gnulib.sh <path-to-gnulib-repository>"
exit 1
fi
gnulib_prefix=$1
gnulib_tool="$gnulib_prefix/gnulib-tool"
# Verify that the gnulib directory does exist...
if [ ! -f "$gnulib_tool" ]; then
echo "Error: Invalid gnulib directory. Cannot find gnulib tool"
echo " ($gnulib_tool)."
echo "Aborting."
exit 1
fi
# Verify that we have the right version of gnulib...
gnulib_head_sha1=`cd $gnulib_prefix && git rev-parse HEAD`
if [ "$gnulib_head_sha1" != "$GNULIB_COMMIT_SHA1" ]; then
echo "Error: Wrong version of gnulib: $gnulib_head_sha1"
echo " (we expected it to be $GNULIB_COMMIT_SHA1)"
echo "Aborting."
exit 1
fi
# Verify that we are in the correct directory.
if [ ! -f ../gdb/main.c -o ! -d import ]; then
echo "Error: This script should be called from the gnulib subdirectory."
echo "Aborting."
exit 1
fi
# Verify that we have the correct version of autoconf.
ver=`autoconf --version 2>&1 | head -1 | sed 's/.*) //'`
if [ "$ver" != "$AUTOCONF_VERSION" ]; then
echo "Error: Wrong autoconf version ($ver), we need $AUTOCONF_VERSION."
echo "Aborting."
exit 1
fi
# Verify that we have the correct version of automake.
ver=`automake --version 2>&1 | head -1 | sed 's/.*) //'`
if [ "$ver" != "$AUTOMAKE_VERSION" ]; then
echo "Error: Wrong automake version ($ver), we need $AUTOMAKE_VERSION."
echo "Aborting."
exit 1
fi
# Verify that we have the correct version of aclocal.
#
# The grep below is needed because Perl >= 5.16 dumps a "called too
# early to check prototype" warning when running aclocal 1.11.1. This
# causes trouble below, because the warning is the first line output
# by aclocal, resulting in:
#
# $ sh ./update-gnulib.sh ~/src/gnulib/src/
# Error: Wrong aclocal version: called too early to check prototype at /opt/automake-1.11.1/bin/aclocal line 617.. Aborting.
#
# Some distros carry an automake patch for that:
# https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=aclocal-function-prototypes.debdiff;att=1;bug=752784
#
# But since we prefer pristine FSF versions of autotools, work around
# the issue here. This can be removed later when we bump the required
# automake version.
#
ver=`aclocal --version 2>&1 | grep -v "called too early to check prototype" | head -1 | sed 's/.*) //'`
if [ "$ver" != "$ACLOCAL_VERSION" ]; then
echo "Error: Wrong aclocal version ($ver), we need $ACLOCAL_VERSION."
echo "Aborting."
exit 1
fi
# Update our gnulib import.
$gnulib_prefix/gnulib-tool --import --dir=. --lib=libgnu \
--source-base=import --m4-base=import/m4 --doc-base=doc \
--tests-base=tests --aux-dir=import/extra \
--no-conditional-dependencies --no-libtool --macro-prefix=gl \
--no-vc-files \
$IMPORTED_GNULIB_MODULES
if [ $? -ne 0 ]; then
echo "Error: gnulib import failed. Aborting."
exit 1
fi
# Apply our local patches.
apply_patches ()
{
Update Gnulib to the latest git version 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
2019-11-17 06:37:06 +01:00
patch -p2 -f -i "$1"
if [ $? -ne 0 ]; then
echo "Failed to apply some patches. Aborting."
exit 1
fi
}
# Regenerate all necessary files...
aclocal &&
autoconf &&
autoheader &&
automake
if [ $? -ne 0 ]; then
echo "Error: Failed to regenerate Makefiles and configure scripts."
exit 1
fi