Notice these two RedHat Linux system configuration settings:
$ getconf GNU_LIBC_VERSION
glibc 2.3.4
$ getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.4
I see they correspond to some of the TLS libraries:
/lib/tls/libc-2.3.4.so
/lib/tls/libm-2.3.4.so
/lib/tls/libpthread-2.3.4.so
/lib/tls/librt-2.3.4.so
I'd like to link against these libraries instead of the /usr/lib
equivalents. I have a few questions:
GNU_LIBC_VERSION
differs from GNU_LIBPTHREAD_VERSION
? /lib/tls
? I'd like to automate this in a Makefile, rather than hard-coding a magic glibc/pthread version number. The NPTL project which first implemented pThreads on Linux was a separate project initially adding kernel support and providing its own library.
When it was stable enough it was merged into glibc. I would assume that those two versions are identical on all reasonably up-to-date installations.
On Ubuntu 8.10 the output is like this:
$ getconf GNU_LIBC_VERSION glibc 2.8.90 $ getconf GNU_LIBPTHREAD_VERSION NPTL 2.8.90
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.