[patch] libstdc++/configure: strengthen the check for availability of pthread_rwlock_t

Jonathan Wakely jwakely@redhat.com
Thu Dec 19 11:14:00 GMT 2019


On 17/12/19 10:04 +0100, Jérôme Lambourg wrote:
>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).

OK for trunk, thanks.




More information about the Libstdc++ mailing list