HomeFreeBSD

devel/gettext-runtime: Fix crash triggered by libgpg-error

Description

devel/gettext-runtime: Fix crash triggered by libgpg-error

Libgpg-error has an initialisation function with
attribute((constructor)) that calls a libintl function that
calls pthread_rwlock_wrlock that segfaults if libpthread wasn't
initialised yet. This can happen because libintl doesn't link to
libpthread to avoid the overhead for non-threaded programs. To
fix this, add an initialisation function to libintl that triggers
initialisation of libpthread.

RTLD_NOLOAD suggested by kib.

dlopen was fixed to work during initialisation in
https://cgit.FreeBSD.org/src/commit/?id=1005d3d05362

PR: 272472, 272517

Details

Provenance
tijlAuthored on Jul 17 2023, 1:06 PM
Parents
R11:70528428672c: devel/llvm16: backport upstream powerpc patch
Branches
Unknown
Tags
Unknown