about summary refs log tree commit diff
path: root/login/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'login/Makefile')
-rw-r--r--login/Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/login/Makefile b/login/Makefile
index bc72e6e5b4..4e6b97734d 100644
--- a/login/Makefile
+++ b/login/Makefile
@@ -28,7 +28,7 @@ headers	:= utmp.h bits/utmp.h lastlog.h pty.h
 routines := getlogin getlogin_r setlogin getlogin_r_chk \
 	    getutent getutent_r getutid getutline getutid_r getutline_r \
 	    utmp_file utmpname updwtmp getpt grantpt unlockpt ptsname \
-	    ptsname_r_chk
+	    ptsname_r_chk login login_tty logout logwtmp openpty forkpty
 
 CFLAGS-grantpt.c += -DLIBEXECDIR='"$(libexecdir)"'
 
@@ -46,11 +46,18 @@ vpath %.c programs
 tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname tst-getlogin tst-updwtmpx \
   tst-pututxline-lockfail tst-pututxline-cache
 
-# Build the -lutil library with these extra functions.
+ifeq ($(have-GLIBC_2.33),yes)
+# Empty compatibility library for old binaries.
 extra-libs      := libutil
 extra-libs-others := $(extra-libs)
-
-libutil-routines:= login login_tty logout logwtmp openpty forkpty
+libutil-routines := libutil-compat
+libutil-shared-only-routines := libutil-compat
+
+# Pretend that libutil.so is a linker script, so that the symbolic
+# link is not installed.
+install-lib-ldscripts = libutil.so
+$(inst_libdir)/libutil.so:
+endif # $(have-GLIBC_2.33)
 
 include ../Rules