https://gcc.gnu.org/g:2612b60e5b66dbd75b43cfd19f260cc0410c1a4d
commit r17-5813-g2612b60e5b66dbd75b43cfd19f260cc0410c1a4d Author: Pietro Monteiro <[email protected]> Date: Sun Nov 1 16:48:09 2026 -0500 libiberty: Update Makefile dependencies Autoconf macros from config/hwcaps.m4, config/clang-plugin.m4, and config/mmap.m4 were added to configure.ac, in commits r14-5993-gf2c52c0dfde581, r16-4178-g6051a849aa1e8e, and r17-5270-gd58a2bf47606f0, respectively. But they weren't added to Makefile.in aclocal_deps. Add them so the files are tracked when maintainer mode is enabled. I also ran a build with maintainer mode enabled and the liibterty make targets maint-missing, maint-undoc, and maint-deps, which updated some Makefile targets dependencies and regenerated the documentation. libiberty/ChangeLog: * Makefile.in (aclocal_deps): Depend on ../config/clang-plugin.m4, ../config/hwcaps.m4, and ../config/mmap.m4. (./filedescriptor.$(objext)): Update dependencies. (./filename_cmp.$(objext)): Likewise. (./memrchr.$(objext)): Likewise. ( ./pex-unix.$(objext)): Likewise. (./setenv.$(objext)): Likewise. ( ./xmalloc.$(objext)): Likewise. * acinclude.m4: Stop including ../config/mmap.m4. * aclocal.m4: Regenerate. * functions.texi: Likewise. Signed-off-by: Pietro Monteiro <[email protected]> Diff: --- libiberty/Makefile.in | 37 ++++++++++++++----------- libiberty/acinclude.m4 | 2 -- libiberty/aclocal.m4 | 1 + libiberty/functions.texi | 70 ++++++++++++++++++++++++++++++++---------------- 4 files changed, 69 insertions(+), 41 deletions(-) diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in index 00af4acca66e..38d770d89d6a 100644 --- a/libiberty/Makefile.in +++ b/libiberty/Makefile.in @@ -508,8 +508,11 @@ ACLOCAL_AMFLAGS = -I ../config -I .. aclocal_deps = \ $(srcdir)/../config/acx.m4 \ $(srcdir)/../config/cet.m4 \ + $(srcdir)/../config/clang-plugin.m4 \ $(srcdir)/../config/enable.m4 \ $(srcdir)/../config/gcc-plugin.m4 \ + $(srcdir)/../config/hwcaps.m4 \ + $(srcdir)/../config/mmap.m4 \ $(srcdir)/../config/no-executables.m4 \ $(srcdir)/../config/override.m4 \ $(srcdir)/../config/picflag.m4 \ @@ -799,8 +802,8 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir else true; fi $(COMPILE.c) $(srcdir)/fibheap.c $(OUTPUT_OPTION) -./filedescriptor.$(objext): $(srcdir)/filedescriptor.c config.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/libiberty.h +./filedescriptor.$(objext): $(srcdir)/filedescriptor.c config.h \ + $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/filedescriptor.c -o pic/$@; \ else true; fi @@ -809,9 +812,8 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir else true; fi $(COMPILE.c) $(srcdir)/filedescriptor.c $(OUTPUT_OPTION) - ./filename_cmp.$(objext): $(srcdir)/filename_cmp.c config.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \ + $(INCDIR)/filenames.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h \ $(INCDIR)/safe-ctype.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/filename_cmp.c -o pic/$@; \ @@ -1026,15 +1028,6 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir else true; fi $(COMPILE.c) $(srcdir)/memchr.c $(OUTPUT_OPTION) -./memrchr.$(objext): $(srcdir)/memrchr.c $(INCDIR)/ansidecl.h - if [ x"$(PICFLAG)" != x ]; then \ - $(COMPILE.c) $(PICFLAG) $(srcdir)/memrchr.c -o pic/$@; \ - else true; fi - if [ x"$(NOASANFLAG)" != x ]; then \ - $(COMPILE.c) $(PICFLAG) $(NOASANFLAG) $(srcdir)/memrchr.c -o noasan/$@; \ - else true; fi - $(COMPILE.c) $(srcdir)/memrchr.c $(OUTPUT_OPTION) - ./memcmp.$(objext): $(srcdir)/memcmp.c $(INCDIR)/ansidecl.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/memcmp.c -o pic/$@; \ @@ -1080,6 +1073,15 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir else true; fi $(COMPILE.c) $(srcdir)/mempcpy.c $(OUTPUT_OPTION) +./memrchr.$(objext): $(srcdir)/memrchr.c $(INCDIR)/ansidecl.h + if [ x"$(PICFLAG)" != x ]; then \ + $(COMPILE.c) $(PICFLAG) $(srcdir)/memrchr.c -o pic/$@; \ + else true; fi + if [ x"$(NOASANFLAG)" != x ]; then \ + $(COMPILE.c) $(PICFLAG) $(NOASANFLAG) $(srcdir)/memrchr.c -o noasan/$@; \ + else true; fi + $(COMPILE.c) $(srcdir)/memrchr.c $(OUTPUT_OPTION) + ./memset.$(objext): $(srcdir)/memset.c $(INCDIR)/ansidecl.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/memset.c -o pic/$@; \ @@ -1178,7 +1180,8 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir $(COMPILE.c) $(srcdir)/pex-one.c $(OUTPUT_OPTION) ./pex-unix.$(objext): $(srcdir)/pex-unix.c config.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/libiberty.h $(srcdir)/pex-common.h + $(INCDIR)/environ.h $(INCDIR)/libiberty.h \ + $(srcdir)/pex-common.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/pex-unix.c -o pic/$@; \ else true; fi @@ -1284,7 +1287,8 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir else true; fi $(COMPILE.c) $(srcdir)/safe-ctype.c $(OUTPUT_OPTION) -./setenv.$(objext): $(srcdir)/setenv.c config.h $(INCDIR)/ansidecl.h +./setenv.$(objext): $(srcdir)/setenv.c config.h $(INCDIR)/ansidecl.h \ + $(INCDIR)/environ.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/setenv.c -o pic/$@; \ else true; fi @@ -1735,7 +1739,7 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir $(COMPILE.c) $(srcdir)/xexit.c $(OUTPUT_OPTION) ./xmalloc.$(objext): $(srcdir)/xmalloc.c config.h $(INCDIR)/ansidecl.h \ - $(INCDIR)/libiberty.h + $(INCDIR)/environ.h $(INCDIR)/libiberty.h if [ x"$(PICFLAG)" != x ]; then \ $(COMPILE.c) $(PICFLAG) $(srcdir)/xmalloc.c -o pic/$@; \ else true; fi @@ -1793,3 +1797,4 @@ $(CONFIGURED_OFILES): stamp-picdir stamp-noasandir $(COMPILE.c) $(PICFLAG) $(NOASANFLAG) $(srcdir)/xvasprintf.c -o noasan/$@; \ else true; fi $(COMPILE.c) $(srcdir)/xvasprintf.c $(OUTPUT_OPTION) + diff --git a/libiberty/acinclude.m4 b/libiberty/acinclude.m4 index b2dd0f1ba98a..41285c5bf080 100644 --- a/libiberty/acinclude.m4 +++ b/libiberty/acinclude.m4 @@ -192,5 +192,3 @@ AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction, STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown]) ]) - -m4_include([../config/mmap.m4]) diff --git a/libiberty/aclocal.m4 b/libiberty/aclocal.m4 index 5151f5fee189..46cefc36edc6 100644 --- a/libiberty/aclocal.m4 +++ b/libiberty/aclocal.m4 @@ -18,6 +18,7 @@ m4_include([../config/clang-plugin.m4]) m4_include([../config/enable.m4]) m4_include([../config/gcc-plugin.m4]) m4_include([../config/hwcaps.m4]) +m4_include([../config/mmap.m4]) m4_include([../config/no-executables.m4]) m4_include([../config/override.m4]) m4_include([../config/picflag.m4]) diff --git a/libiberty/functions.texi b/libiberty/functions.texi index 7c7da1ba2966..16a9d3ae4ac6 100644 --- a/libiberty/functions.texi +++ b/libiberty/functions.texi @@ -101,7 +101,7 @@ is respectively less than, matching, or greater than the array member. @end deftypefn -@c argv.c:138 +@c argv.c:129 @deftypefn Extension char** buildargv (char *@var{sp}) Given a pointer to a string, parse the string extracting fields @@ -165,7 +165,7 @@ not recommended. @end deftypefn -@c make-temp-file.c:95 +@c make-temp-file.c:108 @deftypefn Replacement const char* choose_tmpdir () Returns a pointer to a directory path suitable for creating temporary @@ -192,7 +192,7 @@ Concatenate zero or more of strings and return the result in freshly @end deftypefn -@c argv.c:495 +@c argv.c:474 @deftypefn Extension int countargv (char * const *@var{argv}) Return the number of elements in @var{argv}. @@ -257,7 +257,18 @@ symbolic name or message. @end deftypefn -@c argv.c:352 +@c argv.c:497 +@deftypefn Extension {char *} expandargstr @ + (const char *@var{progname}, const char *@var{val}) + +Expand @var{val} as a response file via @code{expandargv} if it begins +with @samp{@@}, using @var{progname} as @code{argv[0]}, and return the +expanded option list as a shell-quoted string. Returns a newly +allocated string. + +@end deftypefn + +@c argv.c:337 @deftypefn Extension void expandargv (int *@var{argcp}, char ***@var{argvp}) The @var{argcp} and @code{argvp} arguments are pointers to the usual @@ -690,6 +701,19 @@ and a path ending in @code{/} returns the empty string after it. @end deftypefn +@c ldirname.c:23 +@deftypefn Replacement {char*} ldirname (const char *@var{name}) + +Given a pointer to a string containing a typical pathname +(@samp{/usr/src/cmd/ls/ls.c} for example), returns a string containing the +passed string up to, but not including, the final directory separator. + +If the given pathname doesn't contain a directory separator then this function +returns the empty string; this includes an empty given pathname. @code{NULL} +is returned on memory allocation error. + +@end deftypefn + @c lrealpath.c:25 @deftypefn Replacement {const char*} lrealpath (const char *@var{name}) @@ -726,7 +750,7 @@ relative prefix can be found, return @code{NULL}. @end deftypefn -@c make-temp-file.c:173 +@c make-temp-file.c:185 @deftypefn Replacement char* make_temp_file (const char *@var{suffix}) Return a temporary file name (as a string) or @code{NULL} if unable to @@ -749,20 +773,6 @@ returned. @end deftypefn -@c memrchr.c:3 -@deftypefn Supplemental void* memrchr (const void *@var{s}, int @var{c}, @ - size_t @var{n}) - -This function searches memory for the character @var{c} in reverse order, -starting at @code{*@var{s}+@var{n}-1} . The search only ends with -the first occurrence of @var{c}, or when the start us reached; in particular, -a null character does not terminate the search. If the character @var{c} is -found within @var{length} characters of @code{*@var{s}}, a pointer -to the character is returned. If @var{c} is not found, then @code{NULL} is -returned. - -@end deftypefn - @c memcmp.c:6 @deftypefn Supplemental int memcmp (const void *@var{x}, const void *@var{y}, @ size_t @var{count}) @@ -812,6 +822,20 @@ Copies @var{length} bytes from memory region @var{in} to region @end deftypefn +@c memrchr.c:3 +@deftypefn Supplemental void* memrchr (const void *@var{s}, int @var{c}, @ + size_t @var{n}) + +This function searches memory for the character @var{c} in reverse order, +starting at @code{*@var{s}+@var{n}-1} . The search only ends with +the first occurrence of @var{c}, or when the start us reached; in particular, +a null character does not terminate the search. If the character @var{c} is +found within @var{length} characters of @code{*@var{s}}, a pointer +to the character is returned. If @var{c} is not found, then @code{NULL} is +returned. + +@end deftypefn + @c memset.c:6 @deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, @ size_t @var{count}) @@ -1761,7 +1785,7 @@ that the converted value is unsigned. @c strtoll.c:33 @deftypefn Supplemental {long long int} strtoll (const char *@var{string}, @ char **@var{endptr}, int @var{base}) -@deftypefnx Supplemental {unsigned long long int} strtoull (@ +@deftypefnx Supplemental {unsigned long long int} strtoul (@ const char *@var{string}, char **@var{endptr}, int @var{base}) The @code{strtoll} function converts the string in @var{string} to a @@ -1948,12 +1972,12 @@ does the return value. The third argument is unused in @libib{}. @end deftypefn -@c argv.c:289 +@c argv.c:287 @deftypefn Extension int writeargv (char * const *@var{argv}, FILE *@var{file}) Write each member of ARGV, handling all necessary quoting, to the file -named by FILE, separated by whitespace. Return 0 on success, non-zero -if an error occurred while writing to FILE. +associated with FILE, separated by whitespace. Return 0 on success, +non-zero if an error occurred while writing to FILE. @end deftypefn
