1
0
mirror of https://git.savannah.gnu.org/git/coreutils.git synced 2026-10-24 02:08:57 +03:00

build: fix logname systemd linkage

Note there was worry about redundant linking with -lsystemd
when getlogin() is not replaced, however that is mitigated
in general with the --as-needed linker option (the lib-ignore
gnulib module). Tested with:

  ./configure --with-systemd gl_cv_func_getlogin_works=no

* NEWS: Mention the Build-related fix.
Reported at https://bugs.debian.org/1129960
This commit is contained in:
Pádraig Brady
2026-08-18 17:57:42 +01:00
parent b98f6d8c53
commit 224673eba8
2 changed files with 4 additions and 0 deletions

3
NEWS
View File

@@ -142,6 +142,9 @@ GNU coreutils NEWS -*- outline -*-
** Build-related
'logname' now builds, where getlogin() is replaced (e.g. with musl),
and systemd libs are being used, by linking the required libraries.
The multi-call binary built with configure --enable-single-binary is reduced
in size by around 10KB through the more efficient reuse of the 'test' code
by '[', and the 'true' code by 'false'.

View File

@@ -344,6 +344,7 @@ src_pinky_LDADD += $(READUTMP_LIB)
src_uptime_LDADD += $(READUTMP_LIB)
src_users_LDADD += $(READUTMP_LIB)
src_who_LDADD += $(READUTMP_LIB)
src_logname_LDADD += $(READUTMP_LIB)
# for strsignal
src_kill_LDADD += $(LIBTHREAD)