Collin Funk <[email protected]> writes:
> Also, in the process of checking LDADD for this change I noticed a minor
> bug. The find program was missing this change in Gnulib:
>
> 2023-01-07 clock_time Link with $(CLOCK_TIME_LIB) instead of
> $(LIB_CLOCK_GETTIME).
I realized I should probably double check the other LDADD variables too.
Here are two snippets from Gnulib's NEWS that needed fixing in
findutils:
2023-01-07 euidaccess Link with $(EUIDACCESS_LIBGEN) instead of
$(LIB_EACCESS).
2009-03-20 close The substituted variable LIB_CLOSE is removed.
Patch attached.
Also, if you ever decide to investigate these in the future this command
might help you:
$ gnulib-tool --extract-recursive-link-directive faccessat
$(EUIDACCESS_LIBGEN)
Collin
>From e7cfa1c54833945cebeef5e92344062ce3f2ccae Mon Sep 17 00:00:00 2001
From: Collin Funk <[email protected]>
Date: Thu, 1 Aug 2024 21:32:15 -0700
Subject: [PATCH] maint: update Makefile variables used by Gnulib
* locate/Makefile.am (LDADD): Remove $(LIB_CLOSE) as it is no longer
required per Gnulib NEWS 2009-03-20.
* xargs/Makefile.am (LADD): Likewise.
* find/Makefile.am (LDADD): Likewise. Change $(LIB_EACCESS) to
$(EUIDACCESS_LIBGEN) per Gnulib NEWS 2023-01-07.
---
find/Makefile.am | 4 ++--
locate/Makefile.am | 2 +-
xargs/Makefile.am | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/find/Makefile.am b/find/Makefile.am
index 67802225..83f38d8d 100644
--- a/find/Makefile.am
+++ b/find/Makefile.am
@@ -28,11 +28,11 @@ man_MANS = find.1
EXTRA_DIST = defs.h sharefile.h print.h $(man_MANS)
AM_CPPFLAGS = -I../gl/lib -I$(top_srcdir)/lib -I$(top_srcdir)/gl/lib -DLOCALEDIR=\"$(localedir)\"
-LDADD = libfindtools.a ../lib/libfind.a ../gl/lib/libgnulib.a $(LIBINTL) $(CLOCK_TIME_LIB) $(LIB_EACCESS) $(LIB_SELINUX) $(LIB_CLOSE) $(MODF_LIBM) $(FINDLIBS) $(GETHOSTNAME_LIB) $(LIB_EACCESS) $(LIB_SETLOCALE_NULL) $(LIB_MBRTOWC)
+LDADD = libfindtools.a ../lib/libfind.a ../gl/lib/libgnulib.a $(LIBINTL) $(CLOCK_TIME_LIB) $(EUIDACCESS_LIBGEN) $(LIB_SELINUX) $(MODF_LIBM) $(FINDLIBS) $(GETHOSTNAME_LIB) $(LIB_EACCESS) $(LIB_SETLOCALE_NULL) $(LIB_MBRTOWC)
# gnulib advises we link against <first> because we use <second>:
# $(GETHOSTNAME_LIB) uname
# $(CLOCK_TIME_LIB) gettime
-# $(LIB_EACCESS) faccessat
+# $(EUIDACCESS_LIBGEN) faccessat
# $(LIB_SELINUX) selinux-h
# $(MODF_LIBM) modf
diff --git a/locate/Makefile.am b/locate/Makefile.am
index d4abb919..dbe5b230 100644
--- a/locate/Makefile.am
+++ b/locate/Makefile.am
@@ -35,7 +35,7 @@ nodist_locate_TEXINFOS = dblocation.texi
AM_CPPFLAGS = -I$(top_srcdir)/lib -I../gl/lib -I$(top_srcdir)/gl/lib -DLOCATE_DB=\"$(LOCATE_DB)\" -DLOCALEDIR=\"$(localedir)\"
-LDADD = ../lib/libfind.a ../gl/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL) $(LIB_SETLOCALE_NULL) $(LIB_MBRTOWC)
+LDADD = ../lib/libfind.a ../gl/lib/libgnulib.a $(LIBINTL) $(LIB_SETLOCALE_NULL) $(LIB_MBRTOWC)
$(PROGRAMS) $(LIBPROGRAMS): ../lib/libfind.a ../gl/lib/libgnulib.a
diff --git a/xargs/Makefile.am b/xargs/Makefile.am
index 0ab73205..2f073484 100644
--- a/xargs/Makefile.am
+++ b/xargs/Makefile.am
@@ -19,7 +19,7 @@ localedir = $(datadir)/locale
bin_PROGRAMS = xargs
man_MANS = xargs.1
AM_CPPFLAGS = -I.. -I../gl/lib -I$(top_srcdir)/gl/lib -I$(top_srcdir)/lib -DLOCALEDIR=\"$(localedir)\"
-LDADD = ../lib/libfind.a ../gl/lib/libgnulib.a $(LIB_CLOSE) $(LIBINTL) $(LIB_SETLOCALE_NULL) $(LIB_MBRTOWC)
+LDADD = ../lib/libfind.a ../gl/lib/libgnulib.a $(LIBINTL) $(LIB_SETLOCALE_NULL) $(LIB_MBRTOWC)
EXTRA_DIST = $(man_MANS)
SUBDIRS = . testsuite
--
2.45.2