* [PATCH] Update gnulib to current upstream master @ 2018-08-28 19:59 Sergio Durigan Junior 2018-08-29 16:19 ` Tom Tromey 2018-08-29 19:06 ` Pedro Alves 0 siblings, 2 replies; 20+ messages in thread From: Sergio Durigan Junior @ 2018-08-28 19:59 UTC (permalink / raw) To: GDB Patches [-- Attachment #1: Type: text/plain, Size: 13937 bytes --] [ Disclaimer: I'm sending the patch gzipped because I'm afraid sourceware won't accept a 1.2MB message. ] It has been a while since we don't update our gnulib copy against their upstream master branch, so I thought I'd propose this patch. It also fixes (at least) one bug reported against GDB: https://sourceware.org/bugzilla/show_bug.cgi?id=23558 The problem reported there is about the replacement of 'getcwd' when cross-compiling GDB. With our current gnulib copy, the mechanism for deciding whether to use the system's 'getcwd' or gnulib's version is too simplistic and pessimistic, so when cross-compiling we always end up using gnulib's version, which has a limitation: it cannot handle the situation when the parent directory doesn't have read permissions. This has been reported against upstream gnulib and the fix has been pushed here: https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=a96d2e67052c879b1bcc5bc461722beac75fc372 I regtested this patch on Fedora 28 x86-64, and there were no regressions. OK? gdb/ChangeLog: 2018-08-28 Sergio Durigan Junior <sergiodj@redhat.com> PR gdb/23555 PR gdb/23558 * gnulib/aclocal.m4: Regenerate. * gnulib/config.in: Regenerate. * gnulib/configure: Regenerate. * gnulib/import/Makefile.am: Update. * gnulib/import/Makefile.in: Update. * gnulib/import/extra/snippet/_Noreturn.h: Rename to... * gnulib/import/_Noreturn.h: ... this. * gnulib/import/alloca.in.h: Update. * gnulib/import/extra/snippet/arg-nonnull.h: Rename to... * gnulib/import/arg-nonnull.h: ... this. * gnulib/import/assure.h: Update. * gnulib/import/at-func.c: Update. * gnulib/import/basename-lgpl.c: Update. * gnulib/import/extra/snippet/c++defs.h: Rename to... * gnulib/import/c++defs.h: ... this. * gnulib/import/canonicalize-lgpl.c: Update. * gnulib/import/cdefs.h: Update. * gnulib/import/chdir-long.c: Update. * gnulib/import/chdir-long.h: Update. * gnulib/import/cloexec.c: Update. * gnulib/import/cloexec.h: Update. * gnulib/import/close.c: Update. * gnulib/import/closedir.c: Update. * gnulib/import/config.charset: Update. * gnulib/import/dirent-private.h: Update. * gnulib/import/dirent.in.h: Update. * gnulib/import/dirfd.c: Update. * gnulib/import/dirname-lgpl.c: Update. * gnulib/import/dirname.h: Update. * gnulib/import/dosname.h: Update. * gnulib/import/dup-safer-flag.c: Update. * gnulib/import/dup-safer.c: Update. * gnulib/import/dup.c: Update. * gnulib/import/dup2.c: Update. * gnulib/import/errno.in.h: Update. * gnulib/import/error.c: Update. * gnulib/import/error.h: Update. * gnulib/import/exitfail.c: Update. * gnulib/import/exitfail.h: Update. * gnulib/import/extra/update-copyright: Update. * gnulib/import/fchdir.c: Update. * gnulib/import/fcntl.c: Update. * gnulib/import/fcntl.in.h: Update. * gnulib/import/fd-hook.c: Update. * gnulib/import/fd-hook.h: Update. * gnulib/import/fd-safer-flag.c: Update. * gnulib/import/fd-safer.c: Update. * gnulib/import/fdopendir.c: Update. * gnulib/import/filename.h: Update. * gnulib/import/filenamecat-lgpl.c: Update. * gnulib/import/filenamecat.h: Update. * gnulib/import/flexmember.h: Update. * gnulib/import/float+.h: Update. * gnulib/import/float.c: Update. * gnulib/import/float.in.h: Update. * gnulib/import/fnmatch.c: Update. * gnulib/import/fnmatch.in.h: Update. * gnulib/import/fnmatch_loop.c: Update. * gnulib/import/fpucw.h: Update. * gnulib/import/frexp.c: Update. * gnulib/import/frexpl.c: Update. * gnulib/import/fstat.c: Update. * gnulib/import/fstatat.c: Update. * gnulib/import/getcwd-lgpl.c: Update. * gnulib/import/getcwd.c: Update. * gnulib/import/getdtablesize.c: Update. * gnulib/import/getlogin_r.c: Update. * gnulib/import/getprogname.c: Update. * gnulib/import/getprogname.h: Update. * gnulib/import/gettext.h: Update. * gnulib/import/gettimeofday.c: Update. * gnulib/import/glob-libc.h: Update. * gnulib/import/glob.c: Update. * gnulib/import/glob.in.h: Update. * gnulib/import/glob_internal.h: Update. * gnulib/import/glob_pattern_p.c: Update. * gnulib/import/globfree.c: Update. * gnulib/import/hard-locale.c: Update. * gnulib/import/hard-locale.h: Update. * gnulib/import/intprops.h: Update. * gnulib/import/inttypes.in.h: Update. * gnulib/import/isnan.c: Update. * gnulib/import/isnand-nolibm.h: Update. * gnulib/import/isnand.c: Update. * gnulib/import/isnanl-nolibm.h: Update. * gnulib/import/isnanl.c: Update. * gnulib/import/itold.c: Update. * gnulib/import/libc-config.h: Update. * gnulib/import/limits.in.h: Update. * gnulib/import/localcharset.c: Update. * gnulib/import/localcharset.h: Update. * gnulib/import/localtime-buffer.c: Update. * gnulib/import/localtime-buffer.h: Update. * gnulib/import/lstat.c: Update. * gnulib/import/m4/00gnulib.m4: Update. * gnulib/import/m4/__inline.m4: Update. * gnulib/import/m4/absolute-header.m4: Update. * gnulib/import/m4/alloca.m4: Update. * gnulib/import/m4/builtin-expect.m4: Update. * gnulib/import/m4/canonicalize.m4: Update. * gnulib/import/m4/chdir-long.m4: Update. * gnulib/import/m4/close.m4: Update. * gnulib/import/m4/closedir.m4: Update. * gnulib/import/m4/configmake.m4: Update. * gnulib/import/m4/d-ino.m4: Update. * gnulib/import/m4/d-type.m4: Update. * gnulib/import/m4/dirent_h.m4: Update. * gnulib/import/m4/dirfd.m4: Update. * gnulib/import/m4/dirname.m4: Update. * gnulib/import/m4/double-slash-root.m4: Update. * gnulib/import/m4/dup.m4: Update. * gnulib/import/m4/dup2.m4: Update. * gnulib/import/m4/eealloc.m4: Update. * gnulib/import/m4/environ.m4: Update. * gnulib/import/m4/errno_h.m4: Update. * gnulib/import/m4/error.m4: Update. * gnulib/import/m4/exponentd.m4: Update. * gnulib/import/m4/exponentl.m4: Update. * gnulib/import/m4/extensions.m4: Update. * gnulib/import/m4/extern-inline.m4: Update. * gnulib/import/m4/fchdir.m4: Update. * gnulib/import/m4/fcntl-o.m4: Update. * gnulib/import/m4/fcntl.m4: Update. * gnulib/import/m4/fcntl_h.m4: Update. * gnulib/import/m4/fdopendir.m4: Update. * gnulib/import/m4/filenamecat.m4: Update. * gnulib/import/m4/flexmember.m4: Update. * gnulib/import/m4/float_h.m4: Update. * gnulib/import/m4/fnmatch.m4: Update. * gnulib/import/m4/fnmatch_h.m4: Update. * gnulib/import/m4/fpieee.m4: Update. * gnulib/import/m4/frexp.m4: Update. * gnulib/import/m4/frexpl.m4: Update. * gnulib/import/m4/fstat.m4: Update. * gnulib/import/m4/fstatat.m4: Update. * gnulib/import/m4/getcwd-abort-bug.m4: Update. * gnulib/import/m4/getcwd-path-max.m4: Update. * gnulib/import/m4/getcwd.m4: Update. * gnulib/import/m4/getdtablesize.m4: Update. * gnulib/import/m4/getlogin.m4: Update. * gnulib/import/m4/getlogin_r.m4: Update. * gnulib/import/m4/getpagesize.m4: Update. * gnulib/import/m4/getprogname.m4: Update. * gnulib/import/m4/gettimeofday.m4: Update. * gnulib/import/m4/glibc21.m4: Update. * gnulib/import/m4/glob.m4: Update. * gnulib/import/m4/glob_h.m4: Update. * gnulib/import/m4/gnulib-cache.m4: Update. * gnulib/import/m4/gnulib-common.m4: Update. * gnulib/import/m4/gnulib-comp.m4: Update. * gnulib/import/m4/gnulib-tool.m4: Update. * gnulib/import/m4/hard-locale.m4: Update. * gnulib/import/m4/include_next.m4: Update. * gnulib/import/m4/inttypes-pri.m4: Update. * gnulib/import/m4/inttypes.m4: Update. * gnulib/import/m4/isnand.m4: Update. * gnulib/import/m4/isnanl.m4: Update. * gnulib/import/m4/largefile.m4: Update. * gnulib/import/m4/limits-h.m4: Update. * gnulib/import/m4/localcharset.m4: Update. * gnulib/import/m4/locale-fr.m4: Update. * gnulib/import/m4/locale-ja.m4: Update. * gnulib/import/m4/locale-zh.m4: Update. * gnulib/import/m4/localtime-buffer.m4: Update. * gnulib/import/m4/longlong.m4: Update. * gnulib/import/m4/lstat.m4: Update. * gnulib/import/m4/malloc.m4: Update. * gnulib/import/m4/malloca.m4: Update. * gnulib/import/m4/math_h.m4: Update. * gnulib/import/m4/mbrtowc.m4: Update. * gnulib/import/m4/mbsinit.m4: Update. * gnulib/import/m4/mbsrtowcs.m4: Update. * gnulib/import/m4/mbstate_t.m4: Update. * gnulib/import/m4/memchr.m4: Update. * gnulib/import/m4/memmem.m4: Update. * gnulib/import/m4/mempcpy.m4: Update. * gnulib/import/m4/memrchr.m4: Update. * gnulib/import/m4/mkdir.m4: Update. * gnulib/import/m4/mkstemp.m4: Update. * gnulib/import/m4/mmap-anon.m4: Update. * gnulib/import/m4/mode_t.m4: Update. * gnulib/import/m4/msvc-inval.m4: Update. * gnulib/import/m4/msvc-nothrow.m4: Update. * gnulib/import/m4/multiarch.m4: Update. * gnulib/import/m4/nocrash.m4: Update. * gnulib/import/m4/off_t.m4: Update. * gnulib/import/m4/onceonly.m4: Update. * gnulib/import/m4/open-cloexec.m4: Update. * gnulib/import/m4/open.m4: Update. * gnulib/import/m4/openat.m4: Update. * gnulib/import/m4/opendir.m4: Update. * gnulib/import/m4/pathmax.m4: Update. * gnulib/import/m4/rawmemchr.m4: Update. * gnulib/import/m4/readdir.m4: Update. * gnulib/import/m4/readlink.m4: Update. * gnulib/import/m4/realloc.m4: Update. * gnulib/import/m4/rename.m4: Update. * gnulib/import/m4/rewinddir.m4: Update. * gnulib/import/m4/rmdir.m4: Update. * gnulib/import/m4/save-cwd.m4: Update. * gnulib/import/m4/secure_getenv.m4: Update. * gnulib/import/m4/setenv.m4: Update. * gnulib/import/m4/signal_h.m4: Update. * gnulib/import/m4/ssize_t.m4: Update. * gnulib/import/m4/stat-time.m4: Update. * gnulib/import/m4/stat.m4: Update. * gnulib/import/m4/std-gnu11.m4: Update. * gnulib/import/m4/stdbool.m4: Update. * gnulib/import/m4/stddef_h.m4: Update. * gnulib/import/m4/stdint.m4: Update. * gnulib/import/m4/stdio_h.m4: Update. * gnulib/import/m4/stdlib_h.m4: Update. * gnulib/import/m4/strchrnul.m4: Update. * gnulib/import/m4/strdup.m4: Update. * gnulib/import/m4/strerror.m4: Update. * gnulib/import/m4/string_h.m4: Update. * gnulib/import/m4/strstr.m4: Update. * gnulib/import/m4/strtok_r.m4: Update. * gnulib/import/m4/sys_socket_h.m4: Update. * gnulib/import/m4/sys_stat_h.m4: Update. * gnulib/import/m4/sys_time_h.m4: Update. * gnulib/import/m4/sys_types_h.m4: Update. * gnulib/import/m4/tempname.m4: Update. * gnulib/import/m4/time_h.m4: Update. * gnulib/import/m4/unistd-safer.m4: Update. * gnulib/import/m4/unistd_h.m4: Update. * gnulib/import/m4/warn-on-use.m4: Update. * gnulib/import/m4/wchar_h.m4: Update. * gnulib/import/m4/wchar_t.m4: Update. * gnulib/import/m4/wctype_h.m4: Update. * gnulib/import/m4/wint_t.m4: Update. * gnulib/import/malloc.c: Update. * gnulib/import/malloc/scratch_buffer.h: Update. * gnulib/import/malloc/scratch_buffer_grow.c: Update. * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update. * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update. * gnulib/import/malloca.c: Update. * gnulib/import/malloca.h: Update. * gnulib/import/malloca.valgrind: Update. * gnulib/import/math.in.h: Update. * gnulib/import/mbrtowc.c: Update. * gnulib/import/mbsinit.c: Update. * gnulib/import/mbsrtowcs-impl.h: Update. * gnulib/import/mbsrtowcs-state.c: Update. * gnulib/import/mbsrtowcs.c: Update. * gnulib/import/memchr.c: Update. * gnulib/import/memmem.c: Update. * gnulib/import/mempcpy.c: Update. * gnulib/import/memrchr.c: Update. * gnulib/import/mkdir.c: Update. * gnulib/import/mkstemp.c: Update. * gnulib/import/msvc-inval.c: Update. * gnulib/import/msvc-inval.h: Update. * gnulib/import/msvc-nothrow.c: Update. * gnulib/import/msvc-nothrow.h: Update. * gnulib/import/open.c: Update. * gnulib/import/openat-die.c: Update. * gnulib/import/openat-priv.h: Update. * gnulib/import/openat-proc.c: Update. * gnulib/import/openat.c: Update. * gnulib/import/openat.h: Update. * gnulib/import/opendir.c: Update. * gnulib/import/pathmax.h: Update. * gnulib/import/pipe-safer.c: Update. * gnulib/import/rawmemchr.c: Update. * gnulib/import/readdir.c: Update. * gnulib/import/readlink.c: Update. * gnulib/import/realloc.c: Update. * gnulib/import/ref-add.sin: Update. * gnulib/import/ref-del.sin: Update. * gnulib/import/rename.c: Update. * gnulib/import/rewinddir.c: Update. * gnulib/import/rmdir.c: Update. * gnulib/import/same-inode.h: Update. * gnulib/import/save-cwd.c: Update. * gnulib/import/save-cwd.h: Update. * gnulib/import/scratch_buffer.h: Update. * gnulib/import/secure_getenv.c: Update. * gnulib/import/setenv.c: Update. * gnulib/import/signal.in.h: Update. * gnulib/import/stat-time.c: Update. * gnulib/import/stat-time.h: Update. * gnulib/import/stat-w32.c: Update. * gnulib/import/stat-w32.h: Update. * gnulib/import/stat.c: Update. * gnulib/import/stdbool.in.h: Update. * gnulib/import/stddef.in.h: Update. * gnulib/import/stdint.in.h: Update. * gnulib/import/stdio.in.h: Update. * gnulib/import/stdlib.in.h: Update. * gnulib/import/str-two-way.h: Update. * gnulib/import/strchrnul.c: Update. * gnulib/import/strdup.c: Update. * gnulib/import/streq.h: Update. * gnulib/import/strerror-override.c: Update. * gnulib/import/strerror-override.h: Update. * gnulib/import/strerror.c: Update. * gnulib/import/string.in.h: Update. * gnulib/import/stripslash.c: Update. * gnulib/import/strnlen1.c: Update. * gnulib/import/strnlen1.h: Update. * gnulib/import/strstr.c: Update. * gnulib/import/strtok_r.c: Update. * gnulib/import/sys_stat.in.h: Update. * gnulib/import/sys_time.in.h: Update. * gnulib/import/sys_types.in.h: Update. * gnulib/import/tempname.c: Update. * gnulib/import/tempname.h: Update. * gnulib/import/time.in.h: Update. * gnulib/import/unistd--.h: Update. * gnulib/import/unistd-safer.h: Update. * gnulib/import/unistd.in.h: Update. * gnulib/import/unsetenv.c: Update. * gnulib/import/verify.h: Update. * gnulib/import/extra/snippet/warn-on-use.h: Update. * gnulib/import/wchar.in.h: Update. * gnulib/import/wctype.in.h: Update. * gnulib/import/xalloc-oversized.h: Update. -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/ [-- Attachment #2: 0001-Update-gnulib-to-current-upstream-master.patch.gz --] [-- Type: application/gzip, Size: 245496 bytes --] ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib to current upstream master 2018-08-28 19:59 [PATCH] Update gnulib to current upstream master Sergio Durigan Junior @ 2018-08-29 16:19 ` Tom Tromey 2018-08-29 16:29 ` Sergio Durigan Junior 2018-08-29 19:06 ` Pedro Alves 1 sibling, 1 reply; 20+ messages in thread From: Tom Tromey @ 2018-08-29 16:19 UTC (permalink / raw) To: Sergio Durigan Junior; +Cc: GDB Patches >>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes: Sergio> It has been a while since we don't update our gnulib copy against Sergio> their upstream master branch, so I thought I'd propose this patch. It Sergio> also fixes (at least) one bug reported against GDB: Sergio> https://sourceware.org/bugzilla/show_bug.cgi?id=23558 Thank you for doing this. I think it is ok. It's an enormous auto-generated patch, so of course I didn't read it. But I think this point in the release cycle is a good time to update gnulib, and worst case we can either (1) back this out, or (2) fix whatever gnulib bugs might arise. BTW you mentioned on irc that you forgot to mention update-gnulib.sh in the ChangeLog; please do that, no need to repost though. Tom ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib to current upstream master 2018-08-29 16:19 ` Tom Tromey @ 2018-08-29 16:29 ` Sergio Durigan Junior 0 siblings, 0 replies; 20+ messages in thread From: Sergio Durigan Junior @ 2018-08-29 16:29 UTC (permalink / raw) To: Tom Tromey; +Cc: GDB Patches On Wednesday, August 29 2018, Tom Tromey wrote: >>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes: > > Sergio> It has been a while since we don't update our gnulib copy against > Sergio> their upstream master branch, so I thought I'd propose this patch. It > Sergio> also fixes (at least) one bug reported against GDB: > Sergio> https://sourceware.org/bugzilla/show_bug.cgi?id=23558 > > Thank you for doing this. > > I think it is ok. It's an enormous auto-generated patch, so of course I > didn't read it. But I think this point in the release cycle is a good > time to update gnulib, and worst case we can either (1) back this out, > or (2) fix whatever gnulib bugs might arise. > > BTW you mentioned on irc that you forgot to mention update-gnulib.sh in > the ChangeLog; please do that, no need to repost though. Thanks, Tom. I pushed the patch with the updated ChangeLog: 7a6dbc2fdb2323c35e981f93236f323e9d7c0b24 -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/ ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib to current upstream master 2018-08-28 19:59 [PATCH] Update gnulib to current upstream master Sergio Durigan Junior 2018-08-29 16:19 ` Tom Tromey @ 2018-08-29 19:06 ` Pedro Alves 2018-08-29 19:34 ` Sergio Durigan Junior ` (2 more replies) 1 sibling, 3 replies; 20+ messages in thread From: Pedro Alves @ 2018-08-29 19:06 UTC (permalink / raw) To: Sergio Durigan Junior, GDB Patches On 08/28/2018 08:59 PM, Sergio Durigan Junior wrote: > [ Disclaimer: I'm sending the patch gzipped because I'm afraid > sourceware won't accept a 1.2MB message. ] > > It has been a while since we don't update our gnulib copy against > their upstream master branch, so I thought I'd propose this patch. It > also fixes (at least) one bug reported against GDB: > > https://sourceware.org/bugzilla/show_bug.cgi?id=23558 > > The problem reported there is about the replacement of 'getcwd' when > cross-compiling GDB. With our current gnulib copy, the mechanism for > deciding whether to use the system's 'getcwd' or gnulib's version is > too simplistic and pessimistic, so when cross-compiling we always end > up using gnulib's version, which has a limitation: it cannot handle > the situation when the parent directory doesn't have read permissions. > > This has been reported against upstream gnulib and the fix has been > pushed here: > > https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=a96d2e67052c879b1bcc5bc461722beac75fc372 > > I regtested this patch on Fedora 28 x86-64, and there were no > regressions. > > OK? It is standard practice when updating gnulib to discuss the set of modules that the exercise brings in due to module dependencies. If we're now including some more modules, that may mean that we could eliminate some older host compatibility code from gdb in favor of gnulib's and list the module dependencies explicitly in IMPORTED_GNULIB_MODULES in update-gnulib.h. Conversely, there's a chance that we were depending on some module that wasn't explicitly listed in IMPORTED_GNULIB_MODULES, and an update could remove the module by mistake. Another reason for that is that that are some modules that are problematic for us (e.g., the one that pulls in Windows's select replacement), so we need to look out for that, in case it is pulled in by a dependency. Also, if there were newer m4 files or m4 files deleted, I think we we need to update the list in gnulib/Makefile.in (aclocal_m4_deps). Should we cherry pick the getcwd fix to the 8.2 branch? Thanks, Pedro Alves ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib to current upstream master 2018-08-29 19:06 ` Pedro Alves @ 2018-08-29 19:34 ` Sergio Durigan Junior 2018-08-31 13:04 ` Pedro Alves 2018-08-30 0:04 ` Tom Tromey 2018-08-30 15:57 ` [PATCH] Update gnulib/Makefile.in:aclocal_m4_deps Sergio Durigan Junior 2 siblings, 1 reply; 20+ messages in thread From: Sergio Durigan Junior @ 2018-08-29 19:34 UTC (permalink / raw) To: Pedro Alves; +Cc: GDB Patches On Wednesday, August 29 2018, Pedro Alves wrote: > On 08/28/2018 08:59 PM, Sergio Durigan Junior wrote: >> [ Disclaimer: I'm sending the patch gzipped because I'm afraid >> sourceware won't accept a 1.2MB message. ] >> >> It has been a while since we don't update our gnulib copy against >> their upstream master branch, so I thought I'd propose this patch. It >> also fixes (at least) one bug reported against GDB: >> >> https://sourceware.org/bugzilla/show_bug.cgi?id=23558 >> >> The problem reported there is about the replacement of 'getcwd' when >> cross-compiling GDB. With our current gnulib copy, the mechanism for >> deciding whether to use the system's 'getcwd' or gnulib's version is >> too simplistic and pessimistic, so when cross-compiling we always end >> up using gnulib's version, which has a limitation: it cannot handle >> the situation when the parent directory doesn't have read permissions. >> >> This has been reported against upstream gnulib and the fix has been >> pushed here: >> >> https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=a96d2e67052c879b1bcc5bc461722beac75fc372 >> >> I regtested this patch on Fedora 28 x86-64, and there were no >> regressions. >> >> OK? > > It is standard practice when updating gnulib to discuss the set of > modules that the exercise brings in due to module dependencies. > If we're now including some more modules, that may mean that > we could eliminate some older host compatibility code from gdb > in favor of gnulib's and list the module dependencies > explicitly in IMPORTED_GNULIB_MODULES in update-gnulib.h. > > Conversely, there's a chance that we were depending on some > module that wasn't explicitly listed in IMPORTED_GNULIB_MODULES, > and an update could remove the module by mistake. Hm, OK, I didn't think about this scenario, so I didn't bother including the list of modules that were pulled when updating gnulib. So, I ran the gnulib update process twice, once for our previous version, and once for the new version (that I pushed). The differences are: --- /tmp/gnulib1.txt 2018-08-29 15:20:56.394418711 -0400 +++ /tmp/gnulib2.txt 2018-08-29 15:22:57.846895510 -0400 @@ -4,13 +4,14 @@ alloca-opt assure at-internal + builtin-expect + c99 canonicalize-lgpl chdir chdir-long cloexec close closedir - configmake d-ino d-type dirent @@ -30,6 +31,7 @@ fcntl fcntl-h fd-hook + fd-safer-flag fdopendir filename filenamecat-lgpl @@ -37,6 +39,7 @@ float fnmatch fnmatch-gnu + fnmatch-h fpieee fpucw frexp @@ -51,6 +54,7 @@ gettext-h gettimeofday glob + glob-h hard-locale include_next intprops @@ -59,8 +63,10 @@ isnand-nolibm isnanl-nolibm largefile + libc-config limits-h localcharset + localtime-buffer lstat malloc-posix malloca @@ -94,7 +100,7 @@ rmdir same-inode save-cwd - secure_getenv + scratch_buffer setenv signal-h snippet/_Noreturn @@ -103,8 +109,10 @@ snippet/warn-on-use ssize_t stat + stat-time + std-gnu11 stdbool stddef stdint stdio stdlib @@ -130,40 +138,36 @@ verify wchar wctype-h + xalloc-oversized It doesn't seem like we're importing any important module implicity, nor that we stopped important anything important, but I may be wrong. > Another reason for that is that that are some modules that > are problematic for us (e.g., the one that pulls in Windows's > select replacement), so we need to look out for that, in case > it is pulled in by a dependency. It seems we're still covered. > Also, if there were newer m4 files or m4 files deleted, I think we > we need to update the list in gnulib/Makefile.in (aclocal_m4_deps). As I said on IRC, I had no idea we needed to manually edit any other file, especially one that's under the gnulib/ dir. But I'll do it and propose a patch. > Should we cherry pick the getcwd fix to the 8.2 branch? If you're proposing cherry-picking only the patch to the .m4 file under the gnulib/ dir, then perhaps we could. Backporting the whole gnulib update is not a good idea, IMHO. But I'm sure that's not what you meant. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/ ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib to current upstream master 2018-08-29 19:34 ` Sergio Durigan Junior @ 2018-08-31 13:04 ` Pedro Alves 0 siblings, 0 replies; 20+ messages in thread From: Pedro Alves @ 2018-08-31 13:04 UTC (permalink / raw) To: Sergio Durigan Junior; +Cc: GDB Patches On 08/29/2018 08:34 PM, Sergio Durigan Junior wrote: > --- /tmp/gnulib1.txt 2018-08-29 15:20:56.394418711 -0400 > +++ /tmp/gnulib2.txt 2018-08-29 15:22:57.846895510 -0400 > @@ -4,13 +4,14 @@ > alloca-opt > assure > at-internal > + builtin-expect > + c99 > canonicalize-lgpl > chdir > chdir-long > cloexec > close > closedir > - configmake > d-ino > d-type > dirent > @@ -30,6 +31,7 @@ > fcntl > fcntl-h > fd-hook > + fd-safer-flag > fdopendir > filename > filenamecat-lgpl > @@ -37,6 +39,7 @@ > float > fnmatch > fnmatch-gnu > + fnmatch-h We have a fnmatch.h replacement file in src/include/, and we include fnmatch.h using quotes ("fnmatch.h"). Hopefully this won't cause weird definition mismatches on hosts where gnulib provides a replacement. Let's keep an eye out on that. > fpieee > fpucw > frexp > @@ -51,6 +54,7 @@ > gettext-h > gettimeofday > glob > + glob-h > hard-locale > include_next > intprops > @@ -59,8 +63,10 @@ > isnand-nolibm > isnanl-nolibm > largefile > + libc-config > limits-h > localcharset > + localtime-buffer > lstat > malloc-posix > malloca > @@ -94,7 +100,7 @@ > rmdir > same-inode > save-cwd > - secure_getenv > + scratch_buffer > setenv > signal-h > snippet/_Noreturn > @@ -103,8 +109,10 @@ > snippet/warn-on-use > ssize_t > stat > + stat-time > + std-gnu11 I wonder whether we should be using std-gnu11 explicitly. > stdbool > stddef > stdint > stdio > stdlib > @@ -130,40 +138,36 @@ > verify > wchar > wctype-h > + xalloc-oversized > > > It doesn't seem like we're importing any important module implicity, nor > that we stopped important anything important, but I may be wrong. > Agreed, I crosschecked the list diff above against <https://www.gnu.org/software/gnulib/MODULES.html>, following the links in the leftmost column to check relevant module descriptions, and in some cases looked at the sources of the modules. Nothing big stood out to me. >> Should we cherry pick the getcwd fix to the 8.2 branch? > If you're proposing cherry-picking only the patch to the .m4 file under > the gnulib/ dir, then perhaps we could. This, cherry-pick the getcwd fix that was applied on the gnulib tree. > Backporting the whole gnulib > update is not a good idea, IMHO. But I'm sure that's not what you > meant. That's not what I meant. Thanks, Pedro Alves ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib to current upstream master 2018-08-29 19:06 ` Pedro Alves 2018-08-29 19:34 ` Sergio Durigan Junior @ 2018-08-30 0:04 ` Tom Tromey 2018-08-30 3:01 ` Sergio Durigan Junior 2018-08-30 15:57 ` [PATCH] Update gnulib/Makefile.in:aclocal_m4_deps Sergio Durigan Junior 2 siblings, 1 reply; 20+ messages in thread From: Tom Tromey @ 2018-08-30 0:04 UTC (permalink / raw) To: Pedro Alves; +Cc: Sergio Durigan Junior, GDB Patches >>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes: Pedro> It is standard practice when updating gnulib to discuss the set of Pedro> modules that the exercise brings in due to module dependencies. Sorry about that, I should have remembered before approving this. Tom ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib to current upstream master 2018-08-30 0:04 ` Tom Tromey @ 2018-08-30 3:01 ` Sergio Durigan Junior 0 siblings, 0 replies; 20+ messages in thread From: Sergio Durigan Junior @ 2018-08-30 3:01 UTC (permalink / raw) To: Tom Tromey; +Cc: Pedro Alves, GDB Patches On Wednesday, August 29 2018, Tom Tromey wrote: >>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes: > > Pedro> It is standard practice when updating gnulib to discuss the set of > Pedro> modules that the exercise brings in due to module dependencies. > > Sorry about that, I should have remembered before approving this. Please let me know if the summary I sent in: https://sourceware.org/ml/gdb-patches/2018-08/msg00776.html is enough/makes sense. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/ ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH] Update gnulib/Makefile.in:aclocal_m4_deps 2018-08-29 19:06 ` Pedro Alves 2018-08-29 19:34 ` Sergio Durigan Junior 2018-08-30 0:04 ` Tom Tromey @ 2018-08-30 15:57 ` Sergio Durigan Junior 2018-08-30 17:05 ` Simon Marchi 2 siblings, 1 reply; 20+ messages in thread From: Sergio Durigan Junior @ 2018-08-30 15:57 UTC (permalink / raw) To: GDB Patches; +Cc: Pedro Alves, Tom Tromey, Sergio Durigan Junior It was pointed by Pedro that gnulib/Makefile.in should be updated accordingly after our local gnulib is also updated. The specific part that needs to be refreshed is the "aclocal_m4_deps" variable, which lists the .m4 files present under the "gnulib/import/m4/" directory. This patch does that. No regressions introduced. gdb/ChangeLog: 2018-08-30 Sergio Durigan Junior <sergiodj@redhat.com> * gnulib/Makefile.in (aclocal_m4_deps): Update according to the files present in "gnulib/import/m4/". --- gdb/ChangeLog | 5 ++ gdb/gnulib/Makefile.in | 155 ++++++++++++++++++++++++++++++++--------- 2 files changed, 128 insertions(+), 32 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0d55fd45f5..2ecc4173e8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-08-30 Sergio Durigan Junior <sergiodj@redhat.com> + + * gnulib/Makefile.in (aclocal_m4_deps): Update according to + the files present in "gnulib/import/m4/". + 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com> * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd, diff --git a/gdb/gnulib/Makefile.in b/gdb/gnulib/Makefile.in index 191ecbda02..1602da54b6 100644 --- a/gdb/gnulib/Makefile.in +++ b/gdb/gnulib/Makefile.in @@ -207,49 +207,140 @@ ACLOCAL = aclocal ACLOCAL_AMFLAGS = -I import/m4 -I ../../config aclocal_m4_deps = \ configure.ac \ - import/m4/00gnulib.m4 \ - import/m4/alloca.m4 \ - import/m4/codeset.m4 \ - import/m4/configmake.m4 \ - import/m4/extensions.m4 \ - import/m4/fcntl-o.m4 \ - import/m4/fnmatch.m4 \ - import/m4/glibc21.m4 \ - import/m4/gnulib-cache.m4 \ + import/m4/flexmember.m4 \ + import/m4/eealloc.m4 \ + import/m4/mkdir.m4 \ + import/m4/close.m4 \ + import/m4/unistd-safer.m4 \ + import/m4/inttypes-pri.m4 \ + import/m4/chdir-long.m4 \ import/m4/gnulib-common.m4 \ - import/m4/gnulib-comp.m4 \ + import/m4/readdir.m4 \ + import/m4/stdlib_h.m4 \ + import/m4/getlogin_r.m4 \ + import/m4/warn-on-use.m4 \ + import/m4/getdtablesize.m4 \ + import/m4/rewinddir.m4 \ + import/m4/string_h.m4 \ + import/m4/closedir.m4 \ + import/m4/canonicalize.m4 \ + import/m4/stdio_h.m4 \ + import/m4/fdopendir.m4 \ + import/m4/getcwd-abort-bug.m4 \ + import/m4/alloca.m4 \ + import/m4/strstr.m4 \ + import/m4/stat-time.m4 \ + import/m4/builtin-expect.m4 \ + import/m4/rawmemchr.m4 \ + import/m4/msvc-nothrow.m4 \ + import/m4/absolute-header.m4 \ + import/m4/isnanl.m4 \ + import/m4/stddef_h.m4 \ import/m4/gnulib-tool.m4 \ - import/m4/include_next.m4 \ - import/m4/inttypes-pri.m4 \ - import/m4/inttypes.m4 \ - import/m4/localcharset.m4 \ - import/m4/locale-fr.m4 \ + import/m4/realloc.m4 \ + import/m4/d-type.m4 \ + import/m4/frexp.m4 \ + import/m4/getcwd-path-max.m4 \ + import/m4/dup2.m4 \ + import/m4/strtok_r.m4 \ + import/m4/exponentd.m4 \ + import/m4/std-gnu11.m4 \ import/m4/locale-ja.m4 \ + import/m4/gettimeofday.m4 \ + import/m4/time_h.m4 \ + import/m4/malloc.m4 \ + import/m4/fnmatch_h.m4 \ + import/m4/codeset.m4 \ + import/m4/getcwd.m4 \ + import/m4/readlink.m4 \ import/m4/locale-zh.m4 \ - import/m4/longlong.m4 \ + import/m4/stdint.m4 \ + import/m4/memrchr.m4 \ + import/m4/onceonly.m4 \ + import/m4/pathmax.m4 \ + import/m4/rename.m4 \ + import/m4/rmdir.m4 \ + import/m4/dup.m4 \ + import/m4/errno_h.m4 \ import/m4/mbrtowc.m4 \ - import/m4/mbsinit.m4 \ + import/m4/environ.m4 \ + import/m4/wchar_h.m4 \ + import/m4/strchrnul.m4 \ + import/m4/fcntl_h.m4 \ + import/m4/getpagesize.m4 \ + import/m4/largefile.m4 \ + import/m4/openat.m4 \ + import/m4/save-cwd.m4 \ + import/m4/stat.m4 \ + import/m4/include_next.m4 \ + import/m4/mmap-anon.m4 \ + import/m4/mode_t.m4 \ + import/m4/exponentl.m4 \ + import/m4/sys_types_h.m4 \ + import/m4/fcntl-o.m4 \ + import/m4/stdbool.m4 \ + import/m4/float_h.m4 \ + import/m4/msvc-inval.m4 \ + import/m4/wctype_h.m4 \ + import/m4/gnulib-cache.m4 \ import/m4/mbsrtowcs.m4 \ - import/m4/mbstate_t.m4 \ + import/m4/limits-h.m4 \ + import/m4/locale-fr.m4 \ + import/m4/fstatat.m4 \ + import/m4/inttypes.m4 \ import/m4/memchr.m4 \ - import/m4/memmem.m4 \ - import/m4/mmap-anon.m4 \ - import/m4/multiarch.m4 \ + import/m4/glob.m4 \ + import/m4/fstat.m4 \ + import/m4/sys_stat_h.m4 \ import/m4/off_t.m4 \ - import/m4/pathmax.m4 \ + import/m4/strdup.m4 \ import/m4/ssize_t.m4 \ - import/m4/stdbool.m4 \ - import/m4/stddef_h.m4 \ - import/m4/stdint.m4 \ - import/m4/string_h.m4 \ - import/m4/strtok_r.m4 \ - import/m4/sys_types_h.m4 \ + import/m4/math_h.m4 \ import/m4/unistd_h.m4 \ - import/m4/warn-on-use.m4 \ - import/m4/wchar_h.m4 \ + import/m4/fpieee.m4 \ + import/m4/mempcpy.m4 \ + import/m4/wint_t.m4 \ + import/m4/d-ino.m4 \ + import/m4/setenv.m4 \ + import/m4/open-cloexec.m4 \ + import/m4/longlong.m4 \ + import/m4/multiarch.m4 \ + import/m4/filenamecat.m4 \ + import/m4/gnulib-comp.m4 \ + import/m4/mkstemp.m4 \ + import/m4/dirfd.m4 \ + import/m4/getlogin.m4 \ + import/m4/signal_h.m4 \ + import/m4/sys_socket_h.m4 \ + import/m4/dirname.m4 \ + import/m4/00gnulib.m4 \ + import/m4/dirent_h.m4 \ + import/m4/opendir.m4 \ + import/m4/error.m4 \ + import/m4/extensions.m4 \ + import/m4/fchdir.m4 \ + import/m4/mbsinit.m4 \ + import/m4/__inline.m4 \ + import/m4/extern-inline.m4 \ + import/m4/fnmatch.m4 \ + import/m4/lstat.m4 \ + import/m4/nocrash.m4 \ + import/m4/sys_time_h.m4 \ + import/m4/localcharset.m4 \ + import/m4/open.m4 \ + import/m4/localtime-buffer.m4 \ + import/m4/getprogname.m4 \ import/m4/wchar_t.m4 \ - import/m4/wctype_h.m4 \ - import/m4/wint_t.m4 + import/m4/isnand.m4 \ + import/m4/double-slash-root.m4 \ + import/m4/malloca.m4 \ + import/m4/fcntl.m4 \ + import/m4/frexpl.m4 \ + import/m4/strerror.m4 \ + import/m4/glob_h.m4 \ + import/m4/tempname.m4 \ + import/m4/memmem.m4 \ + import/m4/mbstate_t.m4 $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -- 2.17.1 ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib/Makefile.in:aclocal_m4_deps 2018-08-30 15:57 ` [PATCH] Update gnulib/Makefile.in:aclocal_m4_deps Sergio Durigan Junior @ 2018-08-30 17:05 ` Simon Marchi 2018-08-30 20:00 ` Sergio Durigan Junior 0 siblings, 1 reply; 20+ messages in thread From: Simon Marchi @ 2018-08-30 17:05 UTC (permalink / raw) To: Sergio Durigan Junior; +Cc: GDB Patches, Pedro Alves, Tom Tromey On 2018-08-30 11:57, Sergio Durigan Junior wrote: > It was pointed by Pedro that gnulib/Makefile.in should be updated > accordingly after our local gnulib is also updated. The specific part > that needs to be refreshed is the "aclocal_m4_deps" variable, which > lists the .m4 files present under the "gnulib/import/m4/" directory. > This patch does that. > > No regressions introduced. > > gdb/ChangeLog: > 2018-08-30 Sergio Durigan Junior <sergiodj@redhat.com> > > * gnulib/Makefile.in (aclocal_m4_deps): Update according to > the files present in "gnulib/import/m4/". > --- > gdb/ChangeLog | 5 ++ > gdb/gnulib/Makefile.in | 155 ++++++++++++++++++++++++++++++++--------- > 2 files changed, 128 insertions(+), 32 deletions(-) > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index 0d55fd45f5..2ecc4173e8 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,3 +1,8 @@ > +2018-08-30 Sergio Durigan Junior <sergiodj@redhat.com> > + > + * gnulib/Makefile.in (aclocal_m4_deps): Update according to > + the files present in "gnulib/import/m4/". > + > 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com> > > * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd, > diff --git a/gdb/gnulib/Makefile.in b/gdb/gnulib/Makefile.in > index 191ecbda02..1602da54b6 100644 > --- a/gdb/gnulib/Makefile.in > +++ b/gdb/gnulib/Makefile.in > @@ -207,49 +207,140 @@ ACLOCAL = aclocal > ACLOCAL_AMFLAGS = -I import/m4 -I ../../config > aclocal_m4_deps = \ > configure.ac \ > - import/m4/00gnulib.m4 \ > - import/m4/alloca.m4 \ > - import/m4/codeset.m4 \ > - import/m4/configmake.m4 \ > - import/m4/extensions.m4 \ > - import/m4/fcntl-o.m4 \ > - import/m4/fnmatch.m4 \ > - import/m4/glibc21.m4 \ > - import/m4/gnulib-cache.m4 \ > + import/m4/flexmember.m4 \ > + import/m4/eealloc.m4 \ > + import/m4/mkdir.m4 \ > + import/m4/close.m4 \ > + import/m4/unistd-safer.m4 \ > + import/m4/inttypes-pri.m4 \ > + import/m4/chdir-long.m4 \ > import/m4/gnulib-common.m4 \ > - import/m4/gnulib-comp.m4 \ > + import/m4/readdir.m4 \ > + import/m4/stdlib_h.m4 \ > + import/m4/getlogin_r.m4 \ > + import/m4/warn-on-use.m4 \ > + import/m4/getdtablesize.m4 \ > + import/m4/rewinddir.m4 \ > + import/m4/string_h.m4 \ > + import/m4/closedir.m4 \ > + import/m4/canonicalize.m4 \ > + import/m4/stdio_h.m4 \ > + import/m4/fdopendir.m4 \ > + import/m4/getcwd-abort-bug.m4 \ > + import/m4/alloca.m4 \ > + import/m4/strstr.m4 \ > + import/m4/stat-time.m4 \ > + import/m4/builtin-expect.m4 \ > + import/m4/rawmemchr.m4 \ > + import/m4/msvc-nothrow.m4 \ > + import/m4/absolute-header.m4 \ > + import/m4/isnanl.m4 \ > + import/m4/stddef_h.m4 \ > import/m4/gnulib-tool.m4 \ > - import/m4/include_next.m4 \ > - import/m4/inttypes-pri.m4 \ > - import/m4/inttypes.m4 \ > - import/m4/localcharset.m4 \ > - import/m4/locale-fr.m4 \ > + import/m4/realloc.m4 \ > + import/m4/d-type.m4 \ > + import/m4/frexp.m4 \ > + import/m4/getcwd-path-max.m4 \ > + import/m4/dup2.m4 \ > + import/m4/strtok_r.m4 \ > + import/m4/exponentd.m4 \ > + import/m4/std-gnu11.m4 \ > import/m4/locale-ja.m4 \ > + import/m4/gettimeofday.m4 \ > + import/m4/time_h.m4 \ > + import/m4/malloc.m4 \ > + import/m4/fnmatch_h.m4 \ > + import/m4/codeset.m4 \ > + import/m4/getcwd.m4 \ > + import/m4/readlink.m4 \ > import/m4/locale-zh.m4 \ > - import/m4/longlong.m4 \ > + import/m4/stdint.m4 \ > + import/m4/memrchr.m4 \ > + import/m4/onceonly.m4 \ > + import/m4/pathmax.m4 \ > + import/m4/rename.m4 \ > + import/m4/rmdir.m4 \ > + import/m4/dup.m4 \ > + import/m4/errno_h.m4 \ > import/m4/mbrtowc.m4 \ > - import/m4/mbsinit.m4 \ > + import/m4/environ.m4 \ > + import/m4/wchar_h.m4 \ > + import/m4/strchrnul.m4 \ > + import/m4/fcntl_h.m4 \ > + import/m4/getpagesize.m4 \ > + import/m4/largefile.m4 \ > + import/m4/openat.m4 \ > + import/m4/save-cwd.m4 \ > + import/m4/stat.m4 \ > + import/m4/include_next.m4 \ > + import/m4/mmap-anon.m4 \ > + import/m4/mode_t.m4 \ > + import/m4/exponentl.m4 \ > + import/m4/sys_types_h.m4 \ > + import/m4/fcntl-o.m4 \ > + import/m4/stdbool.m4 \ > + import/m4/float_h.m4 \ > + import/m4/msvc-inval.m4 \ > + import/m4/wctype_h.m4 \ > + import/m4/gnulib-cache.m4 \ > import/m4/mbsrtowcs.m4 \ > - import/m4/mbstate_t.m4 \ > + import/m4/limits-h.m4 \ > + import/m4/locale-fr.m4 \ > + import/m4/fstatat.m4 \ > + import/m4/inttypes.m4 \ > import/m4/memchr.m4 \ > - import/m4/memmem.m4 \ > - import/m4/mmap-anon.m4 \ > - import/m4/multiarch.m4 \ > + import/m4/glob.m4 \ > + import/m4/fstat.m4 \ > + import/m4/sys_stat_h.m4 \ > import/m4/off_t.m4 \ > - import/m4/pathmax.m4 \ > + import/m4/strdup.m4 \ > import/m4/ssize_t.m4 \ > - import/m4/stdbool.m4 \ > - import/m4/stddef_h.m4 \ > - import/m4/stdint.m4 \ > - import/m4/string_h.m4 \ > - import/m4/strtok_r.m4 \ > - import/m4/sys_types_h.m4 \ > + import/m4/math_h.m4 \ > import/m4/unistd_h.m4 \ > - import/m4/warn-on-use.m4 \ > - import/m4/wchar_h.m4 \ > + import/m4/fpieee.m4 \ > + import/m4/mempcpy.m4 \ > + import/m4/wint_t.m4 \ > + import/m4/d-ino.m4 \ > + import/m4/setenv.m4 \ > + import/m4/open-cloexec.m4 \ > + import/m4/longlong.m4 \ > + import/m4/multiarch.m4 \ > + import/m4/filenamecat.m4 \ > + import/m4/gnulib-comp.m4 \ > + import/m4/mkstemp.m4 \ > + import/m4/dirfd.m4 \ > + import/m4/getlogin.m4 \ > + import/m4/signal_h.m4 \ > + import/m4/sys_socket_h.m4 \ > + import/m4/dirname.m4 \ > + import/m4/00gnulib.m4 \ > + import/m4/dirent_h.m4 \ > + import/m4/opendir.m4 \ > + import/m4/error.m4 \ > + import/m4/extensions.m4 \ > + import/m4/fchdir.m4 \ > + import/m4/mbsinit.m4 \ > + import/m4/__inline.m4 \ > + import/m4/extern-inline.m4 \ > + import/m4/fnmatch.m4 \ > + import/m4/lstat.m4 \ > + import/m4/nocrash.m4 \ > + import/m4/sys_time_h.m4 \ > + import/m4/localcharset.m4 \ > + import/m4/open.m4 \ > + import/m4/localtime-buffer.m4 \ > + import/m4/getprogname.m4 \ > import/m4/wchar_t.m4 \ > - import/m4/wctype_h.m4 \ > - import/m4/wint_t.m4 > + import/m4/isnand.m4 \ > + import/m4/double-slash-root.m4 \ > + import/m4/malloca.m4 \ > + import/m4/fcntl.m4 \ > + import/m4/frexpl.m4 \ > + import/m4/strerror.m4 \ > + import/m4/glob_h.m4 \ > + import/m4/tempname.m4 \ > + import/m4/memmem.m4 \ > + import/m4/mbstate_t.m4 > > $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps) > cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) This looks good to me, the set of m4 files listed here matches the list of actual m4 files in import/m4. Follow-up question, could we use $(wildcard ...) instead of listing them by hand? Simon ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib/Makefile.in:aclocal_m4_deps 2018-08-30 17:05 ` Simon Marchi @ 2018-08-30 20:00 ` Sergio Durigan Junior 2018-08-31 7:59 ` Joel Brobecker 2018-08-31 11:21 ` Pedro Alves 0 siblings, 2 replies; 20+ messages in thread From: Sergio Durigan Junior @ 2018-08-30 20:00 UTC (permalink / raw) To: Simon Marchi; +Cc: GDB Patches, Pedro Alves, Tom Tromey On Thursday, August 30 2018, Simon Marchi wrote: > On 2018-08-30 11:57, Sergio Durigan Junior wrote: >> It was pointed by Pedro that gnulib/Makefile.in should be updated >> accordingly after our local gnulib is also updated. The specific part >> that needs to be refreshed is the "aclocal_m4_deps" variable, which >> lists the .m4 files present under the "gnulib/import/m4/" directory. >> This patch does that. >> >> No regressions introduced. >> >> gdb/ChangeLog: >> 2018-08-30 Sergio Durigan Junior <sergiodj@redhat.com> >> >> * gnulib/Makefile.in (aclocal_m4_deps): Update according to >> the files present in "gnulib/import/m4/". >> --- >> gdb/ChangeLog | 5 ++ >> gdb/gnulib/Makefile.in | 155 ++++++++++++++++++++++++++++++++--------- >> 2 files changed, 128 insertions(+), 32 deletions(-) >> >> diff --git a/gdb/ChangeLog b/gdb/ChangeLog >> index 0d55fd45f5..2ecc4173e8 100644 >> --- a/gdb/ChangeLog >> +++ b/gdb/ChangeLog >> @@ -1,3 +1,8 @@ >> +2018-08-30 Sergio Durigan Junior <sergiodj@redhat.com> >> + >> + * gnulib/Makefile.in (aclocal_m4_deps): Update according to >> + the files present in "gnulib/import/m4/". >> + >> 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com> >> >> * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd, >> diff --git a/gdb/gnulib/Makefile.in b/gdb/gnulib/Makefile.in >> index 191ecbda02..1602da54b6 100644 >> --- a/gdb/gnulib/Makefile.in >> +++ b/gdb/gnulib/Makefile.in >> @@ -207,49 +207,140 @@ ACLOCAL = aclocal >> ACLOCAL_AMFLAGS = -I import/m4 -I ../../config >> aclocal_m4_deps = \ >> configure.ac \ >> - import/m4/00gnulib.m4 \ >> - import/m4/alloca.m4 \ >> - import/m4/codeset.m4 \ >> - import/m4/configmake.m4 \ >> - import/m4/extensions.m4 \ >> - import/m4/fcntl-o.m4 \ >> - import/m4/fnmatch.m4 \ >> - import/m4/glibc21.m4 \ >> - import/m4/gnulib-cache.m4 \ >> + import/m4/flexmember.m4 \ >> + import/m4/eealloc.m4 \ >> + import/m4/mkdir.m4 \ >> + import/m4/close.m4 \ >> + import/m4/unistd-safer.m4 \ >> + import/m4/inttypes-pri.m4 \ >> + import/m4/chdir-long.m4 \ >> import/m4/gnulib-common.m4 \ >> - import/m4/gnulib-comp.m4 \ >> + import/m4/readdir.m4 \ >> + import/m4/stdlib_h.m4 \ >> + import/m4/getlogin_r.m4 \ >> + import/m4/warn-on-use.m4 \ >> + import/m4/getdtablesize.m4 \ >> + import/m4/rewinddir.m4 \ >> + import/m4/string_h.m4 \ >> + import/m4/closedir.m4 \ >> + import/m4/canonicalize.m4 \ >> + import/m4/stdio_h.m4 \ >> + import/m4/fdopendir.m4 \ >> + import/m4/getcwd-abort-bug.m4 \ >> + import/m4/alloca.m4 \ >> + import/m4/strstr.m4 \ >> + import/m4/stat-time.m4 \ >> + import/m4/builtin-expect.m4 \ >> + import/m4/rawmemchr.m4 \ >> + import/m4/msvc-nothrow.m4 \ >> + import/m4/absolute-header.m4 \ >> + import/m4/isnanl.m4 \ >> + import/m4/stddef_h.m4 \ >> import/m4/gnulib-tool.m4 \ >> - import/m4/include_next.m4 \ >> - import/m4/inttypes-pri.m4 \ >> - import/m4/inttypes.m4 \ >> - import/m4/localcharset.m4 \ >> - import/m4/locale-fr.m4 \ >> + import/m4/realloc.m4 \ >> + import/m4/d-type.m4 \ >> + import/m4/frexp.m4 \ >> + import/m4/getcwd-path-max.m4 \ >> + import/m4/dup2.m4 \ >> + import/m4/strtok_r.m4 \ >> + import/m4/exponentd.m4 \ >> + import/m4/std-gnu11.m4 \ >> import/m4/locale-ja.m4 \ >> + import/m4/gettimeofday.m4 \ >> + import/m4/time_h.m4 \ >> + import/m4/malloc.m4 \ >> + import/m4/fnmatch_h.m4 \ >> + import/m4/codeset.m4 \ >> + import/m4/getcwd.m4 \ >> + import/m4/readlink.m4 \ >> import/m4/locale-zh.m4 \ >> - import/m4/longlong.m4 \ >> + import/m4/stdint.m4 \ >> + import/m4/memrchr.m4 \ >> + import/m4/onceonly.m4 \ >> + import/m4/pathmax.m4 \ >> + import/m4/rename.m4 \ >> + import/m4/rmdir.m4 \ >> + import/m4/dup.m4 \ >> + import/m4/errno_h.m4 \ >> import/m4/mbrtowc.m4 \ >> - import/m4/mbsinit.m4 \ >> + import/m4/environ.m4 \ >> + import/m4/wchar_h.m4 \ >> + import/m4/strchrnul.m4 \ >> + import/m4/fcntl_h.m4 \ >> + import/m4/getpagesize.m4 \ >> + import/m4/largefile.m4 \ >> + import/m4/openat.m4 \ >> + import/m4/save-cwd.m4 \ >> + import/m4/stat.m4 \ >> + import/m4/include_next.m4 \ >> + import/m4/mmap-anon.m4 \ >> + import/m4/mode_t.m4 \ >> + import/m4/exponentl.m4 \ >> + import/m4/sys_types_h.m4 \ >> + import/m4/fcntl-o.m4 \ >> + import/m4/stdbool.m4 \ >> + import/m4/float_h.m4 \ >> + import/m4/msvc-inval.m4 \ >> + import/m4/wctype_h.m4 \ >> + import/m4/gnulib-cache.m4 \ >> import/m4/mbsrtowcs.m4 \ >> - import/m4/mbstate_t.m4 \ >> + import/m4/limits-h.m4 \ >> + import/m4/locale-fr.m4 \ >> + import/m4/fstatat.m4 \ >> + import/m4/inttypes.m4 \ >> import/m4/memchr.m4 \ >> - import/m4/memmem.m4 \ >> - import/m4/mmap-anon.m4 \ >> - import/m4/multiarch.m4 \ >> + import/m4/glob.m4 \ >> + import/m4/fstat.m4 \ >> + import/m4/sys_stat_h.m4 \ >> import/m4/off_t.m4 \ >> - import/m4/pathmax.m4 \ >> + import/m4/strdup.m4 \ >> import/m4/ssize_t.m4 \ >> - import/m4/stdbool.m4 \ >> - import/m4/stddef_h.m4 \ >> - import/m4/stdint.m4 \ >> - import/m4/string_h.m4 \ >> - import/m4/strtok_r.m4 \ >> - import/m4/sys_types_h.m4 \ >> + import/m4/math_h.m4 \ >> import/m4/unistd_h.m4 \ >> - import/m4/warn-on-use.m4 \ >> - import/m4/wchar_h.m4 \ >> + import/m4/fpieee.m4 \ >> + import/m4/mempcpy.m4 \ >> + import/m4/wint_t.m4 \ >> + import/m4/d-ino.m4 \ >> + import/m4/setenv.m4 \ >> + import/m4/open-cloexec.m4 \ >> + import/m4/longlong.m4 \ >> + import/m4/multiarch.m4 \ >> + import/m4/filenamecat.m4 \ >> + import/m4/gnulib-comp.m4 \ >> + import/m4/mkstemp.m4 \ >> + import/m4/dirfd.m4 \ >> + import/m4/getlogin.m4 \ >> + import/m4/signal_h.m4 \ >> + import/m4/sys_socket_h.m4 \ >> + import/m4/dirname.m4 \ >> + import/m4/00gnulib.m4 \ >> + import/m4/dirent_h.m4 \ >> + import/m4/opendir.m4 \ >> + import/m4/error.m4 \ >> + import/m4/extensions.m4 \ >> + import/m4/fchdir.m4 \ >> + import/m4/mbsinit.m4 \ >> + import/m4/__inline.m4 \ >> + import/m4/extern-inline.m4 \ >> + import/m4/fnmatch.m4 \ >> + import/m4/lstat.m4 \ >> + import/m4/nocrash.m4 \ >> + import/m4/sys_time_h.m4 \ >> + import/m4/localcharset.m4 \ >> + import/m4/open.m4 \ >> + import/m4/localtime-buffer.m4 \ >> + import/m4/getprogname.m4 \ >> import/m4/wchar_t.m4 \ >> - import/m4/wctype_h.m4 \ >> - import/m4/wint_t.m4 >> + import/m4/isnand.m4 \ >> + import/m4/double-slash-root.m4 \ >> + import/m4/malloca.m4 \ >> + import/m4/fcntl.m4 \ >> + import/m4/frexpl.m4 \ >> + import/m4/strerror.m4 \ >> + import/m4/glob_h.m4 \ >> + import/m4/tempname.m4 \ >> + import/m4/memmem.m4 \ >> + import/m4/mbstate_t.m4 >> >> $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps) >> cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) > > This looks good to me, the set of m4 files listed here matches the > list of actual m4 files in import/m4. Follow-up question, could we > use $(wildcard ...) instead of listing them by hand? Yeah, I think that could work. That's basically what I did to generate this list: "ls *.m4". If you want, I can edit the patch and make it use $(wildcard) before pushing it. -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/ ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib/Makefile.in:aclocal_m4_deps 2018-08-30 20:00 ` Sergio Durigan Junior @ 2018-08-31 7:59 ` Joel Brobecker 2018-08-31 16:02 ` Sergio Durigan Junior 2018-08-31 11:21 ` Pedro Alves 1 sibling, 1 reply; 20+ messages in thread From: Joel Brobecker @ 2018-08-31 7:59 UTC (permalink / raw) To: Sergio Durigan Junior; +Cc: Simon Marchi, GDB Patches, Pedro Alves, Tom Tromey > > This looks good to me, the set of m4 files listed here matches the > > list of actual m4 files in import/m4. Follow-up question, could we > > use $(wildcard ...) instead of listing them by hand? > > Yeah, I think that could work. That's basically what I did to generate > this list: "ls *.m4". If you want, I can edit the patch and make it use > $(wildcard) before pushing it. I would push the patch as is for now, since it is a necessary improvement on its own that doesn't really make the next step any more difficult than before; and then, if you are willing, work on using $(wildcard ...) as a followup. -- Joel ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib/Makefile.in:aclocal_m4_deps 2018-08-31 7:59 ` Joel Brobecker @ 2018-08-31 16:02 ` Sergio Durigan Junior 0 siblings, 0 replies; 20+ messages in thread From: Sergio Durigan Junior @ 2018-08-31 16:02 UTC (permalink / raw) To: Joel Brobecker; +Cc: Simon Marchi, GDB Patches, Pedro Alves, Tom Tromey On Friday, August 31 2018, Joel Brobecker wrote: >> > This looks good to me, the set of m4 files listed here matches the >> > list of actual m4 files in import/m4. Follow-up question, could we >> > use $(wildcard ...) instead of listing them by hand? >> >> Yeah, I think that could work. That's basically what I did to generate >> this list: "ls *.m4". If you want, I can edit the patch and make it use >> $(wildcard) before pushing it. > > I would push the patch as is for now, since it is a necessary > improvement on its own that doesn't really make the next step > any more difficult than before; and then, if you are willing, > work on using $(wildcard ...) as a followup. Thanks, Joel and Simon. I pushed it now: dab999b116b507ad431c70fab0a28074dfea29df -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/ ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib/Makefile.in:aclocal_m4_deps 2018-08-30 20:00 ` Sergio Durigan Junior 2018-08-31 7:59 ` Joel Brobecker @ 2018-08-31 11:21 ` Pedro Alves 2018-08-31 16:03 ` Sergio Durigan Junior 2018-09-02 21:21 ` [PATCH] Automatically update "aclocal_m4_deps" when updating gnulib Sergio Durigan Junior 1 sibling, 2 replies; 20+ messages in thread From: Pedro Alves @ 2018-08-31 11:21 UTC (permalink / raw) To: Sergio Durigan Junior, Simon Marchi; +Cc: GDB Patches, Tom Tromey On 08/30/2018 09:00 PM, Sergio Durigan Junior wrote: > On Thursday, August 30 2018, Simon Marchi wrote: > >> On 2018-08-30 11:57, Sergio Durigan Junior wrote: >>> $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps) >>> cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) >> >> This looks good to me, the set of m4 files listed here matches the >> list of actual m4 files in import/m4. Follow-up question, could we >> use $(wildcard ...) instead of listing them by hand? > > Yeah, I think that could work. That's basically what I did to generate > this list: "ls *.m4". If you want, I can edit the patch and make it use > $(wildcard) before pushing it. > Really not sure that's a good idea. We don't use $wildcard for listing .c files either, for example, and I think for good reason. It makes the set of files to build dependent of what you happen to have or not have locally, instead of determined statically. That in general affects development, changing git branches, etc. Consider that GDB even links successfully if you miss including/linking some .c file in the build, given the _initialize_foo registration mechanism. Maybe not so much an issue with the m4 files, but I'd think a more principle approach to automate this would be to make the update-gnulib.sh script generate/update a Makefile fragment file that contained the aclocal_m4_deps m4 files list, check that file into the tree, and then gdb/gnulib/Makefile.in would source/include that fragment file. Thanks, Pedro Alves ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Update gnulib/Makefile.in:aclocal_m4_deps 2018-08-31 11:21 ` Pedro Alves @ 2018-08-31 16:03 ` Sergio Durigan Junior 2018-09-02 21:21 ` [PATCH] Automatically update "aclocal_m4_deps" when updating gnulib Sergio Durigan Junior 1 sibling, 0 replies; 20+ messages in thread From: Sergio Durigan Junior @ 2018-08-31 16:03 UTC (permalink / raw) To: Pedro Alves; +Cc: Simon Marchi, GDB Patches, Tom Tromey On Friday, August 31 2018, Pedro Alves wrote: > On 08/30/2018 09:00 PM, Sergio Durigan Junior wrote: >> On Thursday, August 30 2018, Simon Marchi wrote: >> >>> On 2018-08-30 11:57, Sergio Durigan Junior wrote: > >>>> $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps) >>>> cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) >>> >>> This looks good to me, the set of m4 files listed here matches the >>> list of actual m4 files in import/m4. Follow-up question, could we >>> use $(wildcard ...) instead of listing them by hand? >> >> Yeah, I think that could work. That's basically what I did to generate >> this list: "ls *.m4". If you want, I can edit the patch and make it use >> $(wildcard) before pushing it. >> > > Really not sure that's a good idea. We don't use $wildcard for listing .c files > either, for example, and I think for good reason. It makes the set of files to build > dependent of what you happen to have or not have locally, instead of determined > statically. That in general affects development, changing git branches, etc. > Consider that GDB even links successfully if you miss including/linking some .c file > in the build, given the _initialize_foo registration mechanism. Hm, alright, that's a good point. > Maybe not so much an issue with the m4 files, but I'd think a more > principle approach to automate this would be to make the > update-gnulib.sh script generate/update a Makefile fragment file that > contained the aclocal_m4_deps m4 files list, check that file into the > tree, and then gdb/gnulib/Makefile.in would source/include that > fragment file. Yeah, that works as well. I'll work on a patch and submit it soon. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/ ^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH] Automatically update "aclocal_m4_deps" when updating gnulib 2018-08-31 11:21 ` Pedro Alves 2018-08-31 16:03 ` Sergio Durigan Junior @ 2018-09-02 21:21 ` Sergio Durigan Junior 2018-09-03 11:15 ` Pedro Alves 1 sibling, 1 reply; 20+ messages in thread From: Sergio Durigan Junior @ 2018-09-02 21:21 UTC (permalink / raw) To: GDB Patches; +Cc: Pedro Alves, Tom Tromey, Simon Marchi, Sergio Durigan Junior When we update gnulib using our "update-gnulib.sh" tool, it doesn't automatically update the list of M4 files present at gnulib/Makefile.in:aclocal_m4_deps. This patch extends the tool to do that. It also puts "aclocal_m4_deps" in its own file (a Makefile fragment), so that it's easier to update it programatically. Tested by generating the file and diff'ing the results against the current version of "aclocal_m4_deps". gdb/ChangeLog: 2018-09-02 Sergio Durigan Junior <sergiodj@redhat.com> Pedro Alves <palves@redhat.com> * gnulib/Makefile.in (aclocal_m4_deps): Move to "aclocal-m4-deps.mk". Include file here. * gnulib/aclocal-m4-deps.mk: New file. * gnulib/update-gnulib.sh: Automatically update "aclocal-m4-deps.mk". --- gdb/gnulib/Makefile.in | 138 +--------------------------------- gdb/gnulib/aclocal-m4-deps.mk | 136 +++++++++++++++++++++++++++++++++ gdb/gnulib/update-gnulib.sh | 6 ++ 3 files changed, 144 insertions(+), 136 deletions(-) create mode 100644 gdb/gnulib/aclocal-m4-deps.mk diff --git a/gdb/gnulib/Makefile.in b/gdb/gnulib/Makefile.in index 1602da54b6..4aa8ee51b7 100644 --- a/gdb/gnulib/Makefile.in +++ b/gdb/gnulib/Makefile.in @@ -205,142 +205,8 @@ config.status: $(srcdir)/configure ACLOCAL = aclocal ACLOCAL_AMFLAGS = -I import/m4 -I ../../config -aclocal_m4_deps = \ - configure.ac \ - import/m4/flexmember.m4 \ - import/m4/eealloc.m4 \ - import/m4/mkdir.m4 \ - import/m4/close.m4 \ - import/m4/unistd-safer.m4 \ - import/m4/inttypes-pri.m4 \ - import/m4/chdir-long.m4 \ - import/m4/gnulib-common.m4 \ - import/m4/readdir.m4 \ - import/m4/stdlib_h.m4 \ - import/m4/getlogin_r.m4 \ - import/m4/warn-on-use.m4 \ - import/m4/getdtablesize.m4 \ - import/m4/rewinddir.m4 \ - import/m4/string_h.m4 \ - import/m4/closedir.m4 \ - import/m4/canonicalize.m4 \ - import/m4/stdio_h.m4 \ - import/m4/fdopendir.m4 \ - import/m4/getcwd-abort-bug.m4 \ - import/m4/alloca.m4 \ - import/m4/strstr.m4 \ - import/m4/stat-time.m4 \ - import/m4/builtin-expect.m4 \ - import/m4/rawmemchr.m4 \ - import/m4/msvc-nothrow.m4 \ - import/m4/absolute-header.m4 \ - import/m4/isnanl.m4 \ - import/m4/stddef_h.m4 \ - import/m4/gnulib-tool.m4 \ - import/m4/realloc.m4 \ - import/m4/d-type.m4 \ - import/m4/frexp.m4 \ - import/m4/getcwd-path-max.m4 \ - import/m4/dup2.m4 \ - import/m4/strtok_r.m4 \ - import/m4/exponentd.m4 \ - import/m4/std-gnu11.m4 \ - import/m4/locale-ja.m4 \ - import/m4/gettimeofday.m4 \ - import/m4/time_h.m4 \ - import/m4/malloc.m4 \ - import/m4/fnmatch_h.m4 \ - import/m4/codeset.m4 \ - import/m4/getcwd.m4 \ - import/m4/readlink.m4 \ - import/m4/locale-zh.m4 \ - import/m4/stdint.m4 \ - import/m4/memrchr.m4 \ - import/m4/onceonly.m4 \ - import/m4/pathmax.m4 \ - import/m4/rename.m4 \ - import/m4/rmdir.m4 \ - import/m4/dup.m4 \ - import/m4/errno_h.m4 \ - import/m4/mbrtowc.m4 \ - import/m4/environ.m4 \ - import/m4/wchar_h.m4 \ - import/m4/strchrnul.m4 \ - import/m4/fcntl_h.m4 \ - import/m4/getpagesize.m4 \ - import/m4/largefile.m4 \ - import/m4/openat.m4 \ - import/m4/save-cwd.m4 \ - import/m4/stat.m4 \ - import/m4/include_next.m4 \ - import/m4/mmap-anon.m4 \ - import/m4/mode_t.m4 \ - import/m4/exponentl.m4 \ - import/m4/sys_types_h.m4 \ - import/m4/fcntl-o.m4 \ - import/m4/stdbool.m4 \ - import/m4/float_h.m4 \ - import/m4/msvc-inval.m4 \ - import/m4/wctype_h.m4 \ - import/m4/gnulib-cache.m4 \ - import/m4/mbsrtowcs.m4 \ - import/m4/limits-h.m4 \ - import/m4/locale-fr.m4 \ - import/m4/fstatat.m4 \ - import/m4/inttypes.m4 \ - import/m4/memchr.m4 \ - import/m4/glob.m4 \ - import/m4/fstat.m4 \ - import/m4/sys_stat_h.m4 \ - import/m4/off_t.m4 \ - import/m4/strdup.m4 \ - import/m4/ssize_t.m4 \ - import/m4/math_h.m4 \ - import/m4/unistd_h.m4 \ - import/m4/fpieee.m4 \ - import/m4/mempcpy.m4 \ - import/m4/wint_t.m4 \ - import/m4/d-ino.m4 \ - import/m4/setenv.m4 \ - import/m4/open-cloexec.m4 \ - import/m4/longlong.m4 \ - import/m4/multiarch.m4 \ - import/m4/filenamecat.m4 \ - import/m4/gnulib-comp.m4 \ - import/m4/mkstemp.m4 \ - import/m4/dirfd.m4 \ - import/m4/getlogin.m4 \ - import/m4/signal_h.m4 \ - import/m4/sys_socket_h.m4 \ - import/m4/dirname.m4 \ - import/m4/00gnulib.m4 \ - import/m4/dirent_h.m4 \ - import/m4/opendir.m4 \ - import/m4/error.m4 \ - import/m4/extensions.m4 \ - import/m4/fchdir.m4 \ - import/m4/mbsinit.m4 \ - import/m4/__inline.m4 \ - import/m4/extern-inline.m4 \ - import/m4/fnmatch.m4 \ - import/m4/lstat.m4 \ - import/m4/nocrash.m4 \ - import/m4/sys_time_h.m4 \ - import/m4/localcharset.m4 \ - import/m4/open.m4 \ - import/m4/localtime-buffer.m4 \ - import/m4/getprogname.m4 \ - import/m4/wchar_t.m4 \ - import/m4/isnand.m4 \ - import/m4/double-slash-root.m4 \ - import/m4/malloca.m4 \ - import/m4/fcntl.m4 \ - import/m4/frexpl.m4 \ - import/m4/strerror.m4 \ - import/m4/glob_h.m4 \ - import/m4/tempname.m4 \ - import/m4/memmem.m4 \ - import/m4/mbstate_t.m4 + +include $(srcdir)/aclocal-m4-deps.mk $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) diff --git a/gdb/gnulib/aclocal-m4-deps.mk b/gdb/gnulib/aclocal-m4-deps.mk new file mode 100644 index 0000000000..07db2ab616 --- /dev/null +++ b/gdb/gnulib/aclocal-m4-deps.mk @@ -0,0 +1,136 @@ +aclocal_m4_deps = \ + configure.ac \ + import/m4/flexmember.m4 \ + import/m4/eealloc.m4 \ + import/m4/mkdir.m4 \ + import/m4/close.m4 \ + import/m4/unistd-safer.m4 \ + import/m4/inttypes-pri.m4 \ + import/m4/chdir-long.m4 \ + import/m4/gnulib-common.m4 \ + import/m4/readdir.m4 \ + import/m4/stdlib_h.m4 \ + import/m4/getlogin_r.m4 \ + import/m4/warn-on-use.m4 \ + import/m4/getdtablesize.m4 \ + import/m4/rewinddir.m4 \ + import/m4/string_h.m4 \ + import/m4/closedir.m4 \ + import/m4/canonicalize.m4 \ + import/m4/stdio_h.m4 \ + import/m4/fdopendir.m4 \ + import/m4/getcwd-abort-bug.m4 \ + import/m4/alloca.m4 \ + import/m4/strstr.m4 \ + import/m4/stat-time.m4 \ + import/m4/builtin-expect.m4 \ + import/m4/rawmemchr.m4 \ + import/m4/msvc-nothrow.m4 \ + import/m4/absolute-header.m4 \ + import/m4/isnanl.m4 \ + import/m4/stddef_h.m4 \ + import/m4/gnulib-tool.m4 \ + import/m4/realloc.m4 \ + import/m4/d-type.m4 \ + import/m4/frexp.m4 \ + import/m4/getcwd-path-max.m4 \ + import/m4/dup2.m4 \ + import/m4/strtok_r.m4 \ + import/m4/exponentd.m4 \ + import/m4/std-gnu11.m4 \ + import/m4/locale-ja.m4 \ + import/m4/gettimeofday.m4 \ + import/m4/time_h.m4 \ + import/m4/malloc.m4 \ + import/m4/fnmatch_h.m4 \ + import/m4/codeset.m4 \ + import/m4/getcwd.m4 \ + import/m4/readlink.m4 \ + import/m4/locale-zh.m4 \ + import/m4/stdint.m4 \ + import/m4/memrchr.m4 \ + import/m4/onceonly.m4 \ + import/m4/pathmax.m4 \ + import/m4/rename.m4 \ + import/m4/rmdir.m4 \ + import/m4/dup.m4 \ + import/m4/errno_h.m4 \ + import/m4/mbrtowc.m4 \ + import/m4/environ.m4 \ + import/m4/wchar_h.m4 \ + import/m4/strchrnul.m4 \ + import/m4/fcntl_h.m4 \ + import/m4/getpagesize.m4 \ + import/m4/largefile.m4 \ + import/m4/openat.m4 \ + import/m4/save-cwd.m4 \ + import/m4/stat.m4 \ + import/m4/include_next.m4 \ + import/m4/mmap-anon.m4 \ + import/m4/mode_t.m4 \ + import/m4/exponentl.m4 \ + import/m4/sys_types_h.m4 \ + import/m4/fcntl-o.m4 \ + import/m4/stdbool.m4 \ + import/m4/float_h.m4 \ + import/m4/msvc-inval.m4 \ + import/m4/wctype_h.m4 \ + import/m4/gnulib-cache.m4 \ + import/m4/mbsrtowcs.m4 \ + import/m4/limits-h.m4 \ + import/m4/locale-fr.m4 \ + import/m4/fstatat.m4 \ + import/m4/inttypes.m4 \ + import/m4/memchr.m4 \ + import/m4/glob.m4 \ + import/m4/fstat.m4 \ + import/m4/sys_stat_h.m4 \ + import/m4/off_t.m4 \ + import/m4/strdup.m4 \ + import/m4/ssize_t.m4 \ + import/m4/math_h.m4 \ + import/m4/unistd_h.m4 \ + import/m4/fpieee.m4 \ + import/m4/mempcpy.m4 \ + import/m4/wint_t.m4 \ + import/m4/d-ino.m4 \ + import/m4/setenv.m4 \ + import/m4/open-cloexec.m4 \ + import/m4/longlong.m4 \ + import/m4/multiarch.m4 \ + import/m4/filenamecat.m4 \ + import/m4/gnulib-comp.m4 \ + import/m4/mkstemp.m4 \ + import/m4/dirfd.m4 \ + import/m4/getlogin.m4 \ + import/m4/signal_h.m4 \ + import/m4/sys_socket_h.m4 \ + import/m4/dirname.m4 \ + import/m4/00gnulib.m4 \ + import/m4/dirent_h.m4 \ + import/m4/opendir.m4 \ + import/m4/error.m4 \ + import/m4/extensions.m4 \ + import/m4/fchdir.m4 \ + import/m4/mbsinit.m4 \ + import/m4/__inline.m4 \ + import/m4/extern-inline.m4 \ + import/m4/fnmatch.m4 \ + import/m4/lstat.m4 \ + import/m4/nocrash.m4 \ + import/m4/sys_time_h.m4 \ + import/m4/localcharset.m4 \ + import/m4/open.m4 \ + import/m4/localtime-buffer.m4 \ + import/m4/getprogname.m4 \ + import/m4/wchar_t.m4 \ + import/m4/isnand.m4 \ + import/m4/double-slash-root.m4 \ + import/m4/malloca.m4 \ + import/m4/fcntl.m4 \ + import/m4/frexpl.m4 \ + import/m4/strerror.m4 \ + import/m4/glob_h.m4 \ + import/m4/tempname.m4 \ + import/m4/memmem.m4 \ + import/m4/mbstate_t.m4 diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh index 3dcafeb3e6..6c10c8a8c4 100755 --- a/gdb/gnulib/update-gnulib.sh +++ b/gdb/gnulib/update-gnulib.sh @@ -167,3 +167,9 @@ if [ $? -ne 0 ]; then exit 1 fi +# Update aclocal-m4-deps.mk +cat > aclocal-m4-deps.mk <<EOF +aclocal_m4_deps = \\ + configure.ac \\ +$(find import/m4 -type f -name "*.m4" | sed 's/^/\t/; s/$/ \\/; $s/ \\//g') +EOF -- 2.17.1 ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Automatically update "aclocal_m4_deps" when updating gnulib 2018-09-02 21:21 ` [PATCH] Automatically update "aclocal_m4_deps" when updating gnulib Sergio Durigan Junior @ 2018-09-03 11:15 ` Pedro Alves 2018-09-03 21:18 ` Sergio Durigan Junior 0 siblings, 1 reply; 20+ messages in thread From: Pedro Alves @ 2018-09-03 11:15 UTC (permalink / raw) To: Sergio Durigan Junior, GDB Patches; +Cc: Tom Tromey, Simon Marchi On 09/02/2018 10:21 PM, Sergio Durigan Junior wrote: > When we update gnulib using our "update-gnulib.sh" tool, it doesn't > automatically update the list of M4 files present at > gnulib/Makefile.in:aclocal_m4_deps. This patch extends the tool to do > that. It also puts "aclocal_m4_deps" in its own file (a Makefile > fragment), so that it's easier to update it programatically. > > Tested by generating the file and diff'ing the results against the > current version of "aclocal_m4_deps". Thanks for doing this. Three remarks below. > diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh > index 3dcafeb3e6..6c10c8a8c4 100755 > --- a/gdb/gnulib/update-gnulib.sh > +++ b/gdb/gnulib/update-gnulib.sh > @@ -167,3 +167,9 @@ if [ $? -ne 0 ]; then > exit 1 > fi > > +# Update aclocal-m4-deps.mk > +cat > aclocal-m4-deps.mk <<EOF > +aclocal_m4_deps = \\ > + configure.ac \\ > +$(find import/m4 -type f -name "*.m4" | sed 's/^/\t/; s/$/ \\/; $s/ \\//g') > +EOF #1 I'd find it a little better to make it so that the new file only includes the M4 files, and leave adding configure.ac to Makefile.in. I.e., put the m4 files list in a different variable here and them do something like: # Fill in $m4_files include $(srcdir)/m4-files.mk aclocal_m4_deps = configure.ac $m4_files in Makefile.in, or, tweak the rule to include configure.ac directly: $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ configure.ac $(m4_files) #2 I think it'll be good practice to generate the file to a temporary name, and then use move-if-change to atomically update the destination, in case someone Ctrl-Cs just while the script is halfway generated. I.e.: cat > foo.mk.tmp <<EOF ..... $(srcdir)/..../move-if-change foo.mk.tmp foo.mk #3 Could you also make the script emit a header in the new file that reads: # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: That would make emacs and vi open the file in read-only mode. Thanks, Pedro Alves ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Automatically update "aclocal_m4_deps" when updating gnulib 2018-09-03 11:15 ` Pedro Alves @ 2018-09-03 21:18 ` Sergio Durigan Junior 2018-09-04 11:10 ` Pedro Alves 0 siblings, 1 reply; 20+ messages in thread From: Sergio Durigan Junior @ 2018-09-03 21:18 UTC (permalink / raw) To: Pedro Alves; +Cc: GDB Patches, Tom Tromey, Simon Marchi [-- Attachment #1: Type: text/plain, Size: 2326 bytes --] On Monday, September 03 2018, Pedro Alves wrote: > On 09/02/2018 10:21 PM, Sergio Durigan Junior wrote: >> When we update gnulib using our "update-gnulib.sh" tool, it doesn't >> automatically update the list of M4 files present at >> gnulib/Makefile.in:aclocal_m4_deps. This patch extends the tool to do >> that. It also puts "aclocal_m4_deps" in its own file (a Makefile >> fragment), so that it's easier to update it programatically. >> >> Tested by generating the file and diff'ing the results against the >> current version of "aclocal_m4_deps". > > Thanks for doing this. Thanks for the review. > Three remarks below. > >> diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh >> index 3dcafeb3e6..6c10c8a8c4 100755 >> --- a/gdb/gnulib/update-gnulib.sh >> +++ b/gdb/gnulib/update-gnulib.sh >> @@ -167,3 +167,9 @@ if [ $? -ne 0 ]; then >> exit 1 >> fi >> >> +# Update aclocal-m4-deps.mk >> +cat > aclocal-m4-deps.mk <<EOF >> +aclocal_m4_deps = \\ >> + configure.ac \\ >> +$(find import/m4 -type f -name "*.m4" | sed 's/^/\t/; s/$/ \\/; $s/ \\//g') >> +EOF > > #1 > > I'd find it a little better to make it so that the new file only includes > the M4 files, and leave adding configure.ac to Makefile.in. I.e., put > the m4 files list in a different variable here and them do something like: > > # Fill in $m4_files > include $(srcdir)/m4-files.mk > > aclocal_m4_deps = configure.ac $m4_files > > in Makefile.in, or, tweak the rule to include configure.ac directly: > > $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ configure.ac $(m4_files) Done. > I think it'll be good practice to generate the file to a temporary > name, and then use move-if-change to atomically update the destination, > in case someone Ctrl-Cs just while the script is halfway generated. > > I.e.: > > cat > foo.mk.tmp <<EOF > ..... > $(srcdir)/..../move-if-change foo.mk.tmp foo.mk Done. > #3 > > Could you also make the script emit a header in the new file that > reads: > > # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: > > That would make emacs and vi open the file in read-only mode. Done. Here's the updated version of the patch. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/ [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-Automatically-update-aclocal_m4_deps-when-updating-g.patch --] [-- Type: text/x-patch, Size: 9833 bytes --] From 36d5af6256f788f2d6cc3ff4238d24cd2a52bdbc Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior <sergiodj@redhat.com> Date: Sun, 2 Sep 2018 17:11:46 -0400 Subject: [PATCH] Automatically update "aclocal_m4_deps" when updating gnulib When we update gnulib using our "update-gnulib.sh" tool, it doesn't automatically update the list of M4 files present at gnulib/Makefile.in:aclocal_m4_deps. This patch extends the tool to do that. It also puts "aclocal_m4_deps" in its own file (a Makefile fragment), so that it's easier to update it programatically. Tested by generating the file and diff'ing the results against the current version of "aclocal_m4_deps". gdb/ChangeLog: 2018-09-02 Sergio Durigan Junior <sergiodj@redhat.com> Pedro Alves <palves@redhat.com> * gnulib/Makefile.in (aclocal_m4_deps): Move to "aclocal-m4-deps.mk". Include file here. $(srcdir)/aclocal.m4: Add "configure.ac". * gnulib/aclocal-m4-deps.mk: New file. * gnulib/update-gnulib.sh: Automatically update "aclocal-m4-deps.mk". --- gdb/gnulib/Makefile.in | 142 +--------------------------------- gdb/gnulib/aclocal-m4-deps.mk | 136 ++++++++++++++++++++++++++++++++ gdb/gnulib/update-gnulib.sh | 10 +++ 3 files changed, 150 insertions(+), 138 deletions(-) create mode 100644 gdb/gnulib/aclocal-m4-deps.mk diff --git a/gdb/gnulib/Makefile.in b/gdb/gnulib/Makefile.in index 1602da54b6..df0e611341 100644 --- a/gdb/gnulib/Makefile.in +++ b/gdb/gnulib/Makefile.in @@ -205,144 +205,10 @@ config.status: $(srcdir)/configure ACLOCAL = aclocal ACLOCAL_AMFLAGS = -I import/m4 -I ../../config -aclocal_m4_deps = \ - configure.ac \ - import/m4/flexmember.m4 \ - import/m4/eealloc.m4 \ - import/m4/mkdir.m4 \ - import/m4/close.m4 \ - import/m4/unistd-safer.m4 \ - import/m4/inttypes-pri.m4 \ - import/m4/chdir-long.m4 \ - import/m4/gnulib-common.m4 \ - import/m4/readdir.m4 \ - import/m4/stdlib_h.m4 \ - import/m4/getlogin_r.m4 \ - import/m4/warn-on-use.m4 \ - import/m4/getdtablesize.m4 \ - import/m4/rewinddir.m4 \ - import/m4/string_h.m4 \ - import/m4/closedir.m4 \ - import/m4/canonicalize.m4 \ - import/m4/stdio_h.m4 \ - import/m4/fdopendir.m4 \ - import/m4/getcwd-abort-bug.m4 \ - import/m4/alloca.m4 \ - import/m4/strstr.m4 \ - import/m4/stat-time.m4 \ - import/m4/builtin-expect.m4 \ - import/m4/rawmemchr.m4 \ - import/m4/msvc-nothrow.m4 \ - import/m4/absolute-header.m4 \ - import/m4/isnanl.m4 \ - import/m4/stddef_h.m4 \ - import/m4/gnulib-tool.m4 \ - import/m4/realloc.m4 \ - import/m4/d-type.m4 \ - import/m4/frexp.m4 \ - import/m4/getcwd-path-max.m4 \ - import/m4/dup2.m4 \ - import/m4/strtok_r.m4 \ - import/m4/exponentd.m4 \ - import/m4/std-gnu11.m4 \ - import/m4/locale-ja.m4 \ - import/m4/gettimeofday.m4 \ - import/m4/time_h.m4 \ - import/m4/malloc.m4 \ - import/m4/fnmatch_h.m4 \ - import/m4/codeset.m4 \ - import/m4/getcwd.m4 \ - import/m4/readlink.m4 \ - import/m4/locale-zh.m4 \ - import/m4/stdint.m4 \ - import/m4/memrchr.m4 \ - import/m4/onceonly.m4 \ - import/m4/pathmax.m4 \ - import/m4/rename.m4 \ - import/m4/rmdir.m4 \ - import/m4/dup.m4 \ - import/m4/errno_h.m4 \ - import/m4/mbrtowc.m4 \ - import/m4/environ.m4 \ - import/m4/wchar_h.m4 \ - import/m4/strchrnul.m4 \ - import/m4/fcntl_h.m4 \ - import/m4/getpagesize.m4 \ - import/m4/largefile.m4 \ - import/m4/openat.m4 \ - import/m4/save-cwd.m4 \ - import/m4/stat.m4 \ - import/m4/include_next.m4 \ - import/m4/mmap-anon.m4 \ - import/m4/mode_t.m4 \ - import/m4/exponentl.m4 \ - import/m4/sys_types_h.m4 \ - import/m4/fcntl-o.m4 \ - import/m4/stdbool.m4 \ - import/m4/float_h.m4 \ - import/m4/msvc-inval.m4 \ - import/m4/wctype_h.m4 \ - import/m4/gnulib-cache.m4 \ - import/m4/mbsrtowcs.m4 \ - import/m4/limits-h.m4 \ - import/m4/locale-fr.m4 \ - import/m4/fstatat.m4 \ - import/m4/inttypes.m4 \ - import/m4/memchr.m4 \ - import/m4/glob.m4 \ - import/m4/fstat.m4 \ - import/m4/sys_stat_h.m4 \ - import/m4/off_t.m4 \ - import/m4/strdup.m4 \ - import/m4/ssize_t.m4 \ - import/m4/math_h.m4 \ - import/m4/unistd_h.m4 \ - import/m4/fpieee.m4 \ - import/m4/mempcpy.m4 \ - import/m4/wint_t.m4 \ - import/m4/d-ino.m4 \ - import/m4/setenv.m4 \ - import/m4/open-cloexec.m4 \ - import/m4/longlong.m4 \ - import/m4/multiarch.m4 \ - import/m4/filenamecat.m4 \ - import/m4/gnulib-comp.m4 \ - import/m4/mkstemp.m4 \ - import/m4/dirfd.m4 \ - import/m4/getlogin.m4 \ - import/m4/signal_h.m4 \ - import/m4/sys_socket_h.m4 \ - import/m4/dirname.m4 \ - import/m4/00gnulib.m4 \ - import/m4/dirent_h.m4 \ - import/m4/opendir.m4 \ - import/m4/error.m4 \ - import/m4/extensions.m4 \ - import/m4/fchdir.m4 \ - import/m4/mbsinit.m4 \ - import/m4/__inline.m4 \ - import/m4/extern-inline.m4 \ - import/m4/fnmatch.m4 \ - import/m4/lstat.m4 \ - import/m4/nocrash.m4 \ - import/m4/sys_time_h.m4 \ - import/m4/localcharset.m4 \ - import/m4/open.m4 \ - import/m4/localtime-buffer.m4 \ - import/m4/getprogname.m4 \ - import/m4/wchar_t.m4 \ - import/m4/isnand.m4 \ - import/m4/double-slash-root.m4 \ - import/m4/malloca.m4 \ - import/m4/fcntl.m4 \ - import/m4/frexpl.m4 \ - import/m4/strerror.m4 \ - import/m4/glob_h.m4 \ - import/m4/tempname.m4 \ - import/m4/memmem.m4 \ - import/m4/mbstate_t.m4 - -$(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ $(aclocal_m4_deps) + +include $(srcdir)/aclocal-m4-deps.mk + +$(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ configure.ac $(aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) AUTOCONF = autoconf diff --git a/gdb/gnulib/aclocal-m4-deps.mk b/gdb/gnulib/aclocal-m4-deps.mk new file mode 100644 index 0000000000..52d280db30 --- /dev/null +++ b/gdb/gnulib/aclocal-m4-deps.mk @@ -0,0 +1,136 @@ +# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: +aclocal_m4_deps = \ + import/m4/flexmember.m4 \ + import/m4/eealloc.m4 \ + import/m4/mkdir.m4 \ + import/m4/close.m4 \ + import/m4/unistd-safer.m4 \ + import/m4/inttypes-pri.m4 \ + import/m4/chdir-long.m4 \ + import/m4/gnulib-common.m4 \ + import/m4/readdir.m4 \ + import/m4/stdlib_h.m4 \ + import/m4/getlogin_r.m4 \ + import/m4/warn-on-use.m4 \ + import/m4/getdtablesize.m4 \ + import/m4/rewinddir.m4 \ + import/m4/string_h.m4 \ + import/m4/closedir.m4 \ + import/m4/canonicalize.m4 \ + import/m4/stdio_h.m4 \ + import/m4/fdopendir.m4 \ + import/m4/getcwd-abort-bug.m4 \ + import/m4/alloca.m4 \ + import/m4/strstr.m4 \ + import/m4/stat-time.m4 \ + import/m4/builtin-expect.m4 \ + import/m4/rawmemchr.m4 \ + import/m4/msvc-nothrow.m4 \ + import/m4/absolute-header.m4 \ + import/m4/isnanl.m4 \ + import/m4/stddef_h.m4 \ + import/m4/gnulib-tool.m4 \ + import/m4/realloc.m4 \ + import/m4/d-type.m4 \ + import/m4/frexp.m4 \ + import/m4/getcwd-path-max.m4 \ + import/m4/dup2.m4 \ + import/m4/strtok_r.m4 \ + import/m4/exponentd.m4 \ + import/m4/std-gnu11.m4 \ + import/m4/locale-ja.m4 \ + import/m4/gettimeofday.m4 \ + import/m4/time_h.m4 \ + import/m4/malloc.m4 \ + import/m4/fnmatch_h.m4 \ + import/m4/codeset.m4 \ + import/m4/getcwd.m4 \ + import/m4/readlink.m4 \ + import/m4/locale-zh.m4 \ + import/m4/stdint.m4 \ + import/m4/memrchr.m4 \ + import/m4/onceonly.m4 \ + import/m4/pathmax.m4 \ + import/m4/rename.m4 \ + import/m4/rmdir.m4 \ + import/m4/dup.m4 \ + import/m4/errno_h.m4 \ + import/m4/mbrtowc.m4 \ + import/m4/environ.m4 \ + import/m4/wchar_h.m4 \ + import/m4/strchrnul.m4 \ + import/m4/fcntl_h.m4 \ + import/m4/getpagesize.m4 \ + import/m4/largefile.m4 \ + import/m4/openat.m4 \ + import/m4/save-cwd.m4 \ + import/m4/stat.m4 \ + import/m4/include_next.m4 \ + import/m4/mmap-anon.m4 \ + import/m4/mode_t.m4 \ + import/m4/exponentl.m4 \ + import/m4/sys_types_h.m4 \ + import/m4/fcntl-o.m4 \ + import/m4/stdbool.m4 \ + import/m4/float_h.m4 \ + import/m4/msvc-inval.m4 \ + import/m4/wctype_h.m4 \ + import/m4/gnulib-cache.m4 \ + import/m4/mbsrtowcs.m4 \ + import/m4/limits-h.m4 \ + import/m4/locale-fr.m4 \ + import/m4/fstatat.m4 \ + import/m4/inttypes.m4 \ + import/m4/memchr.m4 \ + import/m4/glob.m4 \ + import/m4/fstat.m4 \ + import/m4/sys_stat_h.m4 \ + import/m4/off_t.m4 \ + import/m4/strdup.m4 \ + import/m4/ssize_t.m4 \ + import/m4/math_h.m4 \ + import/m4/unistd_h.m4 \ + import/m4/fpieee.m4 \ + import/m4/mempcpy.m4 \ + import/m4/wint_t.m4 \ + import/m4/d-ino.m4 \ + import/m4/setenv.m4 \ + import/m4/open-cloexec.m4 \ + import/m4/longlong.m4 \ + import/m4/multiarch.m4 \ + import/m4/filenamecat.m4 \ + import/m4/gnulib-comp.m4 \ + import/m4/mkstemp.m4 \ + import/m4/dirfd.m4 \ + import/m4/getlogin.m4 \ + import/m4/signal_h.m4 \ + import/m4/sys_socket_h.m4 \ + import/m4/dirname.m4 \ + import/m4/00gnulib.m4 \ + import/m4/dirent_h.m4 \ + import/m4/opendir.m4 \ + import/m4/error.m4 \ + import/m4/extensions.m4 \ + import/m4/fchdir.m4 \ + import/m4/mbsinit.m4 \ + import/m4/__inline.m4 \ + import/m4/extern-inline.m4 \ + import/m4/fnmatch.m4 \ + import/m4/lstat.m4 \ + import/m4/nocrash.m4 \ + import/m4/sys_time_h.m4 \ + import/m4/localcharset.m4 \ + import/m4/open.m4 \ + import/m4/localtime-buffer.m4 \ + import/m4/getprogname.m4 \ + import/m4/wchar_t.m4 \ + import/m4/isnand.m4 \ + import/m4/double-slash-root.m4 \ + import/m4/malloca.m4 \ + import/m4/fcntl.m4 \ + import/m4/frexpl.m4 \ + import/m4/strerror.m4 \ + import/m4/glob_h.m4 \ + import/m4/tempname.m4 \ + import/m4/memmem.m4 \ + import/m4/mbstate_t.m4 diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh index 3dcafeb3e6..5d29e287a4 100755 --- a/gdb/gnulib/update-gnulib.sh +++ b/gdb/gnulib/update-gnulib.sh @@ -167,3 +167,13 @@ if [ $? -ne 0 ]; then exit 1 fi +# Update aclocal-m4-deps.mk +ACLOCAL_M4_DEPS_FILE=aclocal-m4-deps.mk +cat > ${ACLOCAL_M4_DEPS_FILE}.tmp <<EOF +# THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: +aclocal_m4_deps = \\ +$(find import/m4 -type f -name "*.m4" | sed 's/^/\t/; s/$/ \\/; $s/ \\//g') +EOF + +../../move-if-change ${ACLOCAL_M4_DEPS_FILE}.tmp ${ACLOCAL_M4_DEPS_FILE} +rm -f ${ACLOCAL_M4_DEPS_FILE}.tmp -- 2.17.1 ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Automatically update "aclocal_m4_deps" when updating gnulib 2018-09-03 21:18 ` Sergio Durigan Junior @ 2018-09-04 11:10 ` Pedro Alves 2018-09-04 17:58 ` Sergio Durigan Junior 0 siblings, 1 reply; 20+ messages in thread From: Pedro Alves @ 2018-09-04 11:10 UTC (permalink / raw) To: Sergio Durigan Junior; +Cc: GDB Patches, Tom Tromey, Simon Marchi OK. Thanks, Pedro Alves On 09/03/2018 10:17 PM, Sergio Durigan Junior wrote: > On Monday, September 03 2018, Pedro Alves wrote: > >> On 09/02/2018 10:21 PM, Sergio Durigan Junior wrote: >>> When we update gnulib using our "update-gnulib.sh" tool, it doesn't >>> automatically update the list of M4 files present at >>> gnulib/Makefile.in:aclocal_m4_deps. This patch extends the tool to do >>> that. It also puts "aclocal_m4_deps" in its own file (a Makefile >>> fragment), so that it's easier to update it programatically. >>> >>> Tested by generating the file and diff'ing the results against the >>> current version of "aclocal_m4_deps". >> >> Thanks for doing this. > > Thanks for the review. > >> Three remarks below. >> >>> diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh >>> index 3dcafeb3e6..6c10c8a8c4 100755 >>> --- a/gdb/gnulib/update-gnulib.sh >>> +++ b/gdb/gnulib/update-gnulib.sh >>> @@ -167,3 +167,9 @@ if [ $? -ne 0 ]; then >>> exit 1 >>> fi >>> >>> +# Update aclocal-m4-deps.mk >>> +cat > aclocal-m4-deps.mk <<EOF >>> +aclocal_m4_deps = \\ >>> + configure.ac \\ >>> +$(find import/m4 -type f -name "*.m4" | sed 's/^/\t/; s/$/ \\/; $s/ \\//g') >>> +EOF >> >> #1 >> >> I'd find it a little better to make it so that the new file only includes >> the M4 files, and leave adding configure.ac to Makefile.in. I.e., put >> the m4 files list in a different variable here and them do something like: >> >> # Fill in $m4_files >> include $(srcdir)/m4-files.mk >> >> aclocal_m4_deps = configure.ac $m4_files >> >> in Makefile.in, or, tweak the rule to include configure.ac directly: >> >> $(srcdir)/aclocal.m4: @MAINTAINER_MODE_TRUE@ configure.ac $(m4_files) > > Done. > >> I think it'll be good practice to generate the file to a temporary >> name, and then use move-if-change to atomically update the destination, >> in case someone Ctrl-Cs just while the script is halfway generated. >> >> I.e.: >> >> cat > foo.mk.tmp <<EOF >> ..... >> $(srcdir)/..../move-if-change foo.mk.tmp foo.mk > > Done. > >> #3 >> >> Could you also make the script emit a header in the new file that >> reads: >> >> # THIS FILE IS GENERATED. -*- buffer-read-only: t -*- vi :set ro: >> >> That would make emacs and vi open the file in read-only mode. > > Done. > > Here's the updated version of the patch. > > Thanks, > ^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH] Automatically update "aclocal_m4_deps" when updating gnulib 2018-09-04 11:10 ` Pedro Alves @ 2018-09-04 17:58 ` Sergio Durigan Junior 0 siblings, 0 replies; 20+ messages in thread From: Sergio Durigan Junior @ 2018-09-04 17:58 UTC (permalink / raw) To: Pedro Alves; +Cc: GDB Patches, Tom Tromey, Simon Marchi On Tuesday, September 04 2018, Pedro Alves wrote: > OK. Thanks, pushed: fcc9b044b7f563023633a9964810e76f4cde40d4 -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/ ^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2018-09-04 17:58 UTC | newest] Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-08-28 19:59 [PATCH] Update gnulib to current upstream master Sergio Durigan Junior 2018-08-29 16:19 ` Tom Tromey 2018-08-29 16:29 ` Sergio Durigan Junior 2018-08-29 19:06 ` Pedro Alves 2018-08-29 19:34 ` Sergio Durigan Junior 2018-08-31 13:04 ` Pedro Alves 2018-08-30 0:04 ` Tom Tromey 2018-08-30 3:01 ` Sergio Durigan Junior 2018-08-30 15:57 ` [PATCH] Update gnulib/Makefile.in:aclocal_m4_deps Sergio Durigan Junior 2018-08-30 17:05 ` Simon Marchi 2018-08-30 20:00 ` Sergio Durigan Junior 2018-08-31 7:59 ` Joel Brobecker 2018-08-31 16:02 ` Sergio Durigan Junior 2018-08-31 11:21 ` Pedro Alves 2018-08-31 16:03 ` Sergio Durigan Junior 2018-09-02 21:21 ` [PATCH] Automatically update "aclocal_m4_deps" when updating gnulib Sergio Durigan Junior 2018-09-03 11:15 ` Pedro Alves 2018-09-03 21:18 ` Sergio Durigan Junior 2018-09-04 11:10 ` Pedro Alves 2018-09-04 17:58 ` Sergio Durigan Junior
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).