For now, libpthread is not compiled at the same time as glibc, so that pthread_* stubs call forwarding can not work. --- elf/dl-support.c | 6 ++++++ elf/rtld.c | 5 +++++ 2 files changed, 11 insertions(+) --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -43,7 +43,13 @@ int _dl_debug_mask; int _dl_lazy; ElfW(Addr) _dl_use_load_bias = -2; +#ifdef __GNU__ +/* GNU/Hurd needs this because otherwise libpthread's pthread_mutex_lock gets + * overridden by libX11's stubs. */ +int _dl_dynamic_weak = 1; +#else int _dl_dynamic_weak; +#endif /* If nonzero print warnings about problematic situations. */ int _dl_verbose; --- a/elf/rtld.c +++ b/elf/rtld.c @@ -146,6 +146,11 @@ #ifdef NEED_DL_SYSINFO ._dl_sysinfo = DL_SYSINFO_DEFAULT, #endif +#ifdef __GNU__ +/* GNU/Hurd needs this because otherwise libpthread's pthread_mutex_lock gets + * * overridden by libX11's stubs. */ + ._dl_dynamic_weak = 1, +#endif ._dl_debug_fd = STDERR_FILENO, ._dl_use_load_bias = -2, ._dl_correct_cache_id = _DL_CACHE_DEFAULT_ID,