about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/Makefile
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-15 15:41:00 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-22 12:09:52 -0300
commitecf2661281c71a9752c7238ab93bc12b16cfff23 (patch)
tree4adb5c607a25b04e7e3aff43e1eba5f26823140f /sysdeps/unix/sysv/linux/Makefile
parent92f7b465101c23e45f66c6ad25ba243df49556a0 (diff)
downloadglibc-ecf2661281c71a9752c7238ab93bc12b16cfff23.tar.gz
glibc-ecf2661281c71a9752c7238ab93bc12b16cfff23.tar.xz
glibc-ecf2661281c71a9752c7238ab93bc12b16cfff23.zip
linux: Only use 64-bit syscall if required for ppoll
For !__ASSUME_TIME64_SYSCALLS there is no need to issue a 64-bit syscall
if the provided timeout fits in a 32-bit one.  The 64-bit usage should
be rare since the timeout is a relative one.  This also avoids the need
to use supports_time64() (which breaks the usage case of live migration
like CRIU or similar).

Checked on i686-linux-gnu on a 4.15 kernel and on a 5.11 kernel
(with and without --enable-kernel=5.1) and on x86_64-linux-gnu.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'sysdeps/unix/sysv/linux/Makefile')
-rw-r--r--sysdeps/unix/sysv/linux/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 294c366e3b..c36ea0e494 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -137,6 +137,15 @@ tests-time64 += \
 
 CFLAGS-tst-sigcontext-get_pc.c = -fasynchronous-unwind-tables
 
+ifeq (yes,$(build-shared))
+librt = $(common-objpfx)rt/librt.so
+else
+librt = $(common-objpfx)rt/librt.a
+endif
+
+$(objpfx)tst-ppoll: $(librt)
+$(objpfx)tst-ppoll-time64: $(librt)
+
 # Generate the list of SYS_* macros for the system calls (__NR_*
 # macros).  The file syscall-names.list contains all possible system
 # call names, and the generated header file produces SYS_* macros for