From: Adhemerval Zanella Date: Wed, 25 Feb 2026 18:31:15 +0000 (-0300) Subject: nptl: Only issues __libc_unwind_link_get for SHARED X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=dafe64e2eeeb24f96bd3165a3890898fac75ad2b;p=thirdparty%2Fglibc.git nptl: Only issues __libc_unwind_link_get for SHARED The compiler already optimizes it away for static builds. Reviewed-by: Collin Funk --- diff --git a/nptl/pthread_exit.c b/nptl/pthread_exit.c index 4d320e608f..4c15171992 100644 --- a/nptl/pthread_exit.c +++ b/nptl/pthread_exit.c @@ -24,12 +24,14 @@ void __pthread_exit (void *value) { +#ifdef SHARED { struct unwind_link *unwind_link = __libc_unwind_link_get (); if (unwind_link == NULL) __libc_fatal (LIBGCC_S_SO " must be installed for pthread_exit to work\n"); } +#endif __do_cancel (value); }