https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94069
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:39bdebf3725d7681e5e9ba06e3862f8facef3572 commit r9-8353-g39bdebf3725d7681e5e9ba06e3862f8facef3572 Author: Jonathan Wakely <jwak...@redhat.com> Date: Fri Mar 6 12:52:51 2020 +0000 libstdc++: Fix call to __glibcxx_rwlock_init (PR 94069) When the target doesn't define PTHREAD_RWLOCK_INITIALIZER we use a wrapper around pthread_wrlock_init, but the wrapper only takes one argument and we try to call it with two. This went unnnoticed on most targets because they do define the PTHREAD_RWLOCK_INITIALIZER macro, but it causes a bootstrap failure on darwin8. Backport from mainline 2020-03-06 Jonathan Wakely <jwak...@redhat.com> PR libstdc++/94069 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER] (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect second argument to __glibcxx_rwlock_init. * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.