RFR: 8368273: LIBPTHREAD dependency is not needed for some jdk libs
Magnus Ihse Bursie
ihse at openjdk.org
Tue Sep 23 14:04:17 UTC 2025
On Mon, 22 Sep 2025 12:38:45 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> A couple of JDK native libs link to $(LIBPTHREAD) but the dependency is not needed.
>
> libsctp has no `pthread*` calls so most likely we can omit $(LIBPTHREAD).
> libawt_xawt only uses `pthread_self()` ; so on Linux it links without adding $(LIBPTHREAD) because it then uses `pthread_self() `from glibc; however it might still be better to link $(LIBPTHREAD) in this special case.
Looks good!
I agree that it is better to keep libpthread for libawt_xawt.
-------------
Marked as reviewed by ihse (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/27426#pullrequestreview-3258186230
More information about the net-dev
mailing list