Hello, This patch to libstdc++ configure ensures that pthread_rwlock_t is used only when pthread is used for gthreads implementation.
The original issue is that VxWorks comes with its native tasking layer and an optional pthread layer built above it. As pthread is an optional feature of the kernel it may not be available on the target board. Now, even being optional, the headers are present in the development environment, and are in particular partially available when including the main vxWorks.h header, and so are detected automatically as available by libstdc++. This patch will thus refine the check and will make configure try to use pthread_rwlock_t only when the gthr library already relies on pthread. This was of course tested with vxworks targets, and we also verified that this does not impact Linux (that uses pthread) or Windows (that does not use pthread). Best regards, - Jerome 2019-12-16 Jerome Lambourg <lambo...@adacore.com> libstdc++ * acinclude.m4 (_GLIBCXX_USE_PTHREAD_RWLOCK_T): Checks that _PTHREADS is defined after including gthr.h. * configure: Regenerate.
pthread_rwlock_libstdcxx_configure.patch
Description: Binary data