According to https://docs.oracle.com/cd/E36784_01/html/E36873/librt-3lib.html
Historically, functions in this library provided many of the interfaces specified by the POSIX.1b Realtime Extension. See standards(5). This functionality now resides in libc(3LIB).
This library is maintained to provide backward compatibility for both runtime and compilation environments. The shared object is implemented as a filter on libc.so.1. New application development need not specify –lrt.
So currently it should link only to libc which should have everything contained in librt. The same is for libdl dependency which is contained in libc.
This was raised (two years ago!) in Trac #8713, which includes a patch ghc-libs.patch
that removes the librt
requirement from the GHC runtime system. (The runtime system is what is pulling in librt
.) Unfortunately, at the time the discussion was going it seemed that the patch broke GHC on Solaris 10 or 11. And then people just drifted away from the ticket as it often so happens on open-source projects. Maybe someone with a bunch of free time and virtual machines on her hands will come along and fix up those patches.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With