meson: drop libdl, threads, and librt dependencies

Our baseline glibc is 2.34, which merged libdl, libpthread (the
dependency('threads') target), and librt into libc. Empty .so/.a stubs
remain for backward compatibility with old binaries, but new builds
resolve dl_*, pthread_*, mq_*, timer_*, etc. directly from libc.
On musl the same libraries are likewise empty stubs.

Drop the libdl, threads, and librt entries from every meson.build, and
remove the now-stale 'Libs.private: -lrt -pthread' from libudev.pc.in
since both flags resolve to empty link-time stubs on glibc 2.34+ and
musl.

Verified with readelf -d that libsystemd.so, libudev.so, and systemd no
longer carry DT_NEEDED entries for libdl/libpthread/librt.
This commit is contained in:
Daan De Meyer
2026-05-18 21:17:38 +00:00
parent 5a1644de34
commit a14adac423
30 changed files with 15 additions and 130 deletions
-2
View File
@@ -30,7 +30,6 @@ executables += [
'dependencies' : [
libfdisk_cflags,
libopenssl_cflags,
threads,
],
},
libexec_template + {
@@ -38,7 +37,6 @@ executables += [
'dbus' : true,
'conditions' : ['ENABLE_SYSUPDATED'],
'sources' : files('sysupdated.c'),
'dependencies' : threads,
},
executable_template + {
'name' : 'updatectl',