[PATCH] Fix libstdc++ testsuite to handle VxWorks gthreads implementation

Alexandre Oliva oliva@adacore.com
Fri Aug 21 12:37:15 GMT 2020


On Dec 20, 2019, Jonathan Wakely <jwakely at redhat dot com> wrote:

> On 10/12/19 15:58 +0100, Corentin Gay wrote:
>> This patch was tested on x86_64-linux and is part of our nightly testing
>> on all platforms, including VxWorks.

> Was it tested on AIX?

> I think dg-require-gthreads will prevent the tests running for the
> single-threaded multilib on AIX, so it will work OK. But there's a
> chance it will need fixing. Let's wait and see (I'm currently unable
> to build GCC on AIX).

Sorry it took us so long to get back on this.  I've just refreshed the
patch at <https://gcc.gnu.org/legacy-ml/gcc-patches/2019-12/msg00690.html>:

- resolving some trivial conflicts within 30_threads/shared_mutex,

- updating some renamed test file names within 30_threads/this_thread, and

- dropping the obviated change to 30_threads/this_thread/yield.cc

and gave it a spin on gcc111 in the cfarm.

There weren't any changes to the libstdc++ results, according to
test_summary, not even in the unsupported (or any other) test counts.

> OK for trunk, thanks.

Given the approval and the lack of significant changes, I'll put this in
unless there are objections in the next 48 hours.  Thanks for the review!



Fix libstdc++ testsuite to handle VxWorks gthreads implementation

From: Corentin Gay <gay@adacore.com>

When implementing the support for gthreads in VxWorks, we stumbled on
a problem in the testsuite. In the libstdc++ testsuite, we
indiscriminately add the `-pthread` switch to the tests that require
linking against the pthread library. In certain cases, such as
VxWorks, the gthread interface relies on the system native threads
lilbrary and the `-pthread` switch does not exist.

This patch adds a condition for the use of the `-pthread` switch. It
adds it only if the target supports it. The patch also adds
`dg-require-gthreads` in tests that were lacking it.

libstc++/ChangeLog:
	* testsuite/20_util/shared_ptr/atomic/3.cc: Do not require POSIX
	threads and add -pthread only on targets supporting them.
	* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
	Likewise.
	* testsuite/30_threads/async/42819.cc: Likewise.
	* testsuite/30_threads/async/49668.cc: Likewise.
	* testsuite/30_threads/async/54297.cc: Likewise.
	* testsuite/30_threads/async/any.cc: Likewise.
	* testsuite/30_threads/async/async.cc: Likewise.
	* testsuite/30_threads/async/except.cc: Likewise.
	* testsuite/30_threads/async/launch.cc: Likewise.
	* testsuite/30_threads/async/lwg2021.cc: Likewise.
	* testsuite/30_threads/async/sync.cc: Likewise. : Likewise.
	* testsuite/30_threads/call_once/39909.cc: Likewise.
	* testsuite/30_threads/call_once/49668.cc: Likewise.
	* testsuite/30_threads/call_once/60497.cc: Likewise.
	* testsuite/30_threads/call_once/call_once1.cc: Likewise.
	* testsuite/30_threads/call_once/dr2442.cc: Likewise.
	* testsuite/30_threads/condition_variable/54185.cc: Likewise.
	* testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
	* testsuite/30_threads/condition_variable/members/1.cc: Likewise.
	* testsuite/30_threads/condition_variable/members/2.cc: Likewise.
	* testsuite/30_threads/condition_variable/members/3.cc: Likewise.
	* testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
	* testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
	* testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/cond.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
	* testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
	* testsuite/30_threads/future/cons/move.cc: Likewise.
	* testsuite/30_threads/future/members/45133.cc: Likewise.
	* testsuite/30_threads/future/members/get.cc: Likewise.
	* testsuite/30_threads/future/members/get2.cc: Likewise.
	* testsuite/30_threads/future/members/share.cc: Likewise.
	* testsuite/30_threads/future/members/valid.cc: Likewise.
	* testsuite/30_threads/future/members/wait.cc: Likewise.
	* testsuite/30_threads/future/members/wait_for.cc: Likewise.
	* testsuite/30_threads/future/members/wait_until.cc: Likewise.
	* testsuite/30_threads/lock/1.cc: Likewise.
	* testsuite/30_threads/lock/2.cc: Likewise.
	* testsuite/30_threads/lock/3.cc: Likewise.
	* testsuite/30_threads/lock/4.cc: Likewise.
	* testsuite/30_threads/mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
	* testsuite/30_threads/mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
	* testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
	* testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/mutex/unlock/2.cc: Likewise.
	* testsuite/30_threads/packaged_task/49668.cc: Likewise.
	* testsuite/30_threads/packaged_task/60564.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
	* testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
	Likewise.
	* testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
	* testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
	* testsuite/30_threads/promise/60966.cc: Likewise.
	* testsuite/30_threads/promise/cons/1.cc: Likewise.
	* testsuite/30_threads/promise/cons/alloc.cc: Likewise.
	* testsuite/30_threads/promise/cons/move.cc: Likewise.
	* testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
	* testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
	* testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
	* testsuite/30_threads/promise/members/get_future.cc: Likewise.
	* testsuite/30_threads/promise/members/get_future2.cc: Likewise.
	* testsuite/30_threads/promise/members/set_exception.cc: Likewise.
	* testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
	* testsuite/30_threads/promise/members/set_value.cc: Likewise.
	* testsuite/30_threads/promise/members/set_value2.cc: Likewise.
	* testsuite/30_threads/promise/members/set_value3.cc: Likewise.
	* testsuite/30_threads/promise/members/swap.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
	Likewise.
	* testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
	Likewise.
	* testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
	* testsuite/30_threads/shared_future/cons/move.cc: Likewise.
	* testsuite/30_threads/shared_future/members/45133.cc: Likewise.
	* testsuite/30_threads/shared_future/members/get.cc: Likewise.
	* testsuite/30_threads/shared_future/members/get2.cc: Likewise.
	* testsuite/30_threads/shared_future/members/valid.cc: Likewise.
	* testsuite/30_threads/shared_future/members/wait.cc: Likewise.
	* testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
	* testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
	* testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
	* testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
	* testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
	* testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
	* testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
	* testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
	* testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
	* testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
	* testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
	* testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
	* testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
	* testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
	* testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/this_thread/1.cc: Likewise.
	* testsuite/30_threads/this_thread/sleep_for-mt.cc: Likewise.
	* testsuite/30_threads/this_thread/sleep_until-mt.cc: Likewise.
	* testsuite/30_threads/thread/cons/1.cc: Likewise.
	* testsuite/30_threads/thread/cons/2.cc: Likewise.
	* testsuite/30_threads/thread/cons/3.cc: Likewise.
	* testsuite/30_threads/thread/cons/4.cc: Likewise.
	* testsuite/30_threads/thread/cons/49668.cc: Likewise.
	* testsuite/30_threads/thread/cons/5.cc: Likewise.
	* testsuite/30_threads/thread/cons/6.cc: Likewise.
	* testsuite/30_threads/thread/cons/7.cc: Likewise.
	* testsuite/30_threads/thread/cons/8.cc: Likewise.
	* testsuite/30_threads/thread/cons/9.cc: Likewise.
	* testsuite/30_threads/thread/cons/moveable.cc: Likewise.
	* testsuite/30_threads/thread/cons/terminate.cc: Likewise.
	* testsuite/30_threads/thread/members/1.cc: Likewise.
	* testsuite/30_threads/thread/members/2.cc: Likewise.
	* testsuite/30_threads/thread/members/3.cc: Likewise.
	* testsuite/30_threads/thread/members/4.cc: Likewise.
	* testsuite/30_threads/thread/members/5.cc: Likewise.
	* testsuite/30_threads/thread/members/hardware_concurrency.cc:
	Likewise.
	* testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise.
	* testsuite/30_threads/thread/swap/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
	Likewise.
	* testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
	Likewise.
	* testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
	* testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
	* testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
	* testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
	* testsuite/30_threads/try_lock/1.cc: Likewise.
	* testsuite/30_threads/try_lock/2.cc: Likewise.
	* testsuite/30_threads/try_lock/3.cc: Likewise.
	* testsuite/30_threads/try_lock/4.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
	* testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
	* testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
	* testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
---
 .../testsuite/20_util/shared_ptr/atomic/3.cc       |    3 +--
 .../shared_ptr/thread/default_weaktoshared.cc      |    4 ++--
 .../shared_ptr/thread/mutex_weaktoshared.cc        |    4 ++--
 libstdc++-v3/testsuite/30_threads/async/42819.cc   |    3 +--
 libstdc++-v3/testsuite/30_threads/async/49668.cc   |    3 +--
 libstdc++-v3/testsuite/30_threads/async/54297.cc   |    3 +--
 libstdc++-v3/testsuite/30_threads/async/any.cc     |    3 +--
 libstdc++-v3/testsuite/30_threads/async/async.cc   |    3 +--
 libstdc++-v3/testsuite/30_threads/async/except.cc  |    3 +--
 libstdc++-v3/testsuite/30_threads/async/launch.cc  |    3 +--
 libstdc++-v3/testsuite/30_threads/async/lwg2021.cc |    3 +--
 libstdc++-v3/testsuite/30_threads/async/sync.cc    |    3 +--
 .../testsuite/30_threads/call_once/39909.cc        |    3 +--
 .../testsuite/30_threads/call_once/49668.cc        |    3 +--
 .../testsuite/30_threads/call_once/60497.cc        |    3 +--
 .../testsuite/30_threads/call_once/call_once1.cc   |    3 +--
 .../testsuite/30_threads/call_once/dr2442.cc       |    3 +--
 .../30_threads/condition_variable/54185.cc         |    3 +--
 .../30_threads/condition_variable/cons/1.cc        |    3 +--
 .../30_threads/condition_variable/members/1.cc     |    3 +--
 .../30_threads/condition_variable/members/2.cc     |    3 +--
 .../30_threads/condition_variable/members/3.cc     |    3 +--
 .../30_threads/condition_variable/members/53841.cc |    3 +--
 .../30_threads/condition_variable/members/68519.cc |    3 +--
 .../condition_variable/native_handle/typesizes.cc  |    3 +--
 .../30_threads/condition_variable_any/50862.cc     |    3 +--
 .../30_threads/condition_variable_any/53830.cc     |    3 +--
 .../30_threads/condition_variable_any/cond.cc      |    3 +--
 .../30_threads/condition_variable_any/cons/1.cc    |    3 +--
 .../30_threads/condition_variable_any/members/1.cc |    3 +--
 .../30_threads/condition_variable_any/members/2.cc |    3 +--
 .../testsuite/30_threads/future/cons/move.cc       |    3 +--
 .../testsuite/30_threads/future/members/45133.cc   |    3 +--
 .../testsuite/30_threads/future/members/get.cc     |    3 +--
 .../testsuite/30_threads/future/members/get2.cc    |    3 +--
 .../testsuite/30_threads/future/members/share.cc   |    3 +--
 .../testsuite/30_threads/future/members/valid.cc   |    3 +--
 .../testsuite/30_threads/future/members/wait.cc    |    3 +--
 .../30_threads/future/members/wait_for.cc          |    3 +--
 .../30_threads/future/members/wait_until.cc        |    3 +--
 libstdc++-v3/testsuite/30_threads/lock/1.cc        |    3 +--
 libstdc++-v3/testsuite/30_threads/lock/2.cc        |    3 +--
 libstdc++-v3/testsuite/30_threads/lock/3.cc        |    3 +--
 libstdc++-v3/testsuite/30_threads/lock/4.cc        |    3 +--
 libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc  |    3 +--
 .../30_threads/mutex/dest/destructor_locked.cc     |    3 +--
 libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc  |    3 +--
 .../testsuite/30_threads/mutex/native_handle/1.cc  |    3 +--
 .../30_threads/mutex/native_handle/typesizes.cc    |    3 +--
 .../testsuite/30_threads/mutex/try_lock/1.cc       |    3 +--
 .../testsuite/30_threads/mutex/try_lock/2.cc       |    3 +--
 .../testsuite/30_threads/mutex/unlock/1.cc         |    3 +--
 .../testsuite/30_threads/mutex/unlock/2.cc         |    3 +--
 .../testsuite/30_threads/packaged_task/49668.cc    |    3 +--
 .../testsuite/30_threads/packaged_task/60564.cc    |    3 +--
 .../testsuite/30_threads/packaged_task/cons/1.cc   |    3 +--
 .../testsuite/30_threads/packaged_task/cons/2.cc   |    3 +--
 .../testsuite/30_threads/packaged_task/cons/3.cc   |    3 +--
 .../30_threads/packaged_task/cons/56492.cc         |    3 +--
 .../30_threads/packaged_task/cons/alloc.cc         |    6 +++---
 .../30_threads/packaged_task/cons/move.cc          |    3 +--
 .../30_threads/packaged_task/cons/move_assign.cc   |    3 +--
 .../packaged_task/members/at_thread_exit.cc        |    3 +--
 .../30_threads/packaged_task/members/get_future.cc |    3 +--
 .../packaged_task/members/get_future2.cc           |    3 +--
 .../30_threads/packaged_task/members/invoke.cc     |    3 +--
 .../30_threads/packaged_task/members/invoke2.cc    |    3 +--
 .../30_threads/packaged_task/members/invoke3.cc    |    3 +--
 .../30_threads/packaged_task/members/invoke4.cc    |    3 +--
 .../30_threads/packaged_task/members/invoke5.cc    |    3 +--
 .../30_threads/packaged_task/members/reset.cc      |    3 +--
 .../30_threads/packaged_task/members/reset2.cc     |    3 +--
 .../30_threads/packaged_task/members/swap.cc       |    3 +--
 .../30_threads/packaged_task/members/valid.cc      |    3 +--
 libstdc++-v3/testsuite/30_threads/promise/60966.cc |    3 +--
 .../testsuite/30_threads/promise/cons/1.cc         |    3 +--
 .../testsuite/30_threads/promise/cons/alloc.cc     |    3 +--
 .../testsuite/30_threads/promise/cons/move.cc      |    3 +--
 .../30_threads/promise/cons/move_assign.cc         |    3 +--
 .../30_threads/promise/members/at_thread_exit.cc   |    3 +--
 .../30_threads/promise/members/at_thread_exit2.cc  |    3 +--
 .../30_threads/promise/members/get_future.cc       |    3 +--
 .../30_threads/promise/members/get_future2.cc      |    3 +--
 .../30_threads/promise/members/set_exception.cc    |    3 +--
 .../30_threads/promise/members/set_exception2.cc   |    3 +--
 .../30_threads/promise/members/set_value.cc        |    3 +--
 .../30_threads/promise/members/set_value2.cc       |    3 +--
 .../30_threads/promise/members/set_value3.cc       |    3 +--
 .../testsuite/30_threads/promise/members/swap.cc   |    3 +--
 .../testsuite/30_threads/recursive_mutex/cons/1.cc |    3 +--
 .../recursive_mutex/dest/destructor_locked.cc      |    3 +--
 .../testsuite/30_threads/recursive_mutex/lock/1.cc |    3 +--
 .../30_threads/recursive_mutex/native_handle/1.cc  |    3 +--
 .../recursive_mutex/native_handle/typesizes.cc     |    3 +--
 .../30_threads/recursive_mutex/try_lock/1.cc       |    3 +--
 .../30_threads/recursive_mutex/try_lock/2.cc       |    3 +--
 .../30_threads/recursive_mutex/unlock/1.cc         |    3 +--
 .../30_threads/recursive_mutex/unlock/2.cc         |    3 +--
 .../30_threads/recursive_timed_mutex/cons/1.cc     |    4 ++--
 .../dest/destructor_locked.cc                      |    4 ++--
 .../30_threads/recursive_timed_mutex/lock/1.cc     |    4 ++--
 .../30_threads/recursive_timed_mutex/lock/2.cc     |    4 ++--
 .../recursive_timed_mutex/native_handle/1.cc       |    3 +--
 .../native_handle/typesizes.cc                     |    3 +--
 .../30_threads/recursive_timed_mutex/try_lock/1.cc |    4 ++--
 .../30_threads/recursive_timed_mutex/try_lock/2.cc |    4 ++--
 .../recursive_timed_mutex/try_lock_for/1.cc        |    4 ++--
 .../recursive_timed_mutex/try_lock_for/2.cc        |    4 ++--
 .../recursive_timed_mutex/try_lock_for/3.cc        |    4 ++--
 .../recursive_timed_mutex/try_lock_until/1.cc      |    4 ++--
 .../recursive_timed_mutex/try_lock_until/2.cc      |    4 ++--
 .../30_threads/recursive_timed_mutex/unlock/1.cc   |    4 ++--
 .../30_threads/recursive_timed_mutex/unlock/2.cc   |    3 +--
 .../30_threads/shared_future/cons/move.cc          |    3 +--
 .../30_threads/shared_future/members/45133.cc      |    3 +--
 .../30_threads/shared_future/members/get.cc        |    3 +--
 .../30_threads/shared_future/members/get2.cc       |    3 +--
 .../30_threads/shared_future/members/valid.cc      |    3 +--
 .../30_threads/shared_future/members/wait.cc       |    3 +--
 .../30_threads/shared_future/members/wait_for.cc   |    3 +--
 .../30_threads/shared_future/members/wait_until.cc |    3 +--
 .../testsuite/30_threads/shared_lock/cons/1.cc     |    3 +--
 .../testsuite/30_threads/shared_lock/cons/2.cc     |    3 +--
 .../testsuite/30_threads/shared_lock/cons/3.cc     |    3 +--
 .../testsuite/30_threads/shared_lock/cons/4.cc     |    3 +--
 .../testsuite/30_threads/shared_lock/cons/5.cc     |    4 ++--
 .../testsuite/30_threads/shared_lock/cons/6.cc     |    4 ++--
 .../testsuite/30_threads/shared_lock/locking/1.cc  |    3 +--
 .../testsuite/30_threads/shared_lock/locking/2.cc  |    3 +--
 .../testsuite/30_threads/shared_lock/locking/3.cc  |    4 ++--
 .../testsuite/30_threads/shared_lock/locking/4.cc  |    4 ++--
 .../30_threads/shared_lock/modifiers/1.cc          |    3 +--
 .../testsuite/30_threads/shared_mutex/cons/1.cc    |    4 ++--
 .../30_threads/shared_mutex/try_lock/1.cc          |    4 ++--
 .../30_threads/shared_mutex/try_lock/2.cc          |    4 ++--
 .../testsuite/30_threads/shared_mutex/unlock/1.cc  |    4 ++--
 .../30_threads/shared_timed_mutex/cons/1.cc        |    3 +--
 .../30_threads/shared_timed_mutex/try_lock/1.cc    |    3 +--
 .../30_threads/shared_timed_mutex/try_lock/2.cc    |    3 +--
 .../30_threads/shared_timed_mutex/try_lock/3.cc    |    3 +--
 .../30_threads/shared_timed_mutex/unlock/1.cc      |    3 +--
 libstdc++-v3/testsuite/30_threads/this_thread/1.cc |    3 +--
 .../30_threads/this_thread/sleep_for-mt.cc         |    3 +--
 .../30_threads/this_thread/sleep_until-mt.cc       |    3 +--
 libstdc++-v3/testsuite/30_threads/thread/cons/1.cc |    3 +--
 libstdc++-v3/testsuite/30_threads/thread/cons/2.cc |    3 +--
 libstdc++-v3/testsuite/30_threads/thread/cons/3.cc |    3 +--
 libstdc++-v3/testsuite/30_threads/thread/cons/4.cc |    3 +--
 .../testsuite/30_threads/thread/cons/49668.cc      |    3 +--
 libstdc++-v3/testsuite/30_threads/thread/cons/5.cc |    3 +--
 libstdc++-v3/testsuite/30_threads/thread/cons/6.cc |    3 +--
 libstdc++-v3/testsuite/30_threads/thread/cons/7.cc |    3 +--
 libstdc++-v3/testsuite/30_threads/thread/cons/8.cc |    3 +--
 libstdc++-v3/testsuite/30_threads/thread/cons/9.cc |    3 +--
 .../testsuite/30_threads/thread/cons/moveable.cc   |    3 +--
 .../testsuite/30_threads/thread/cons/terminate.cc  |    3 +--
 .../testsuite/30_threads/thread/members/1.cc       |    3 +--
 .../testsuite/30_threads/thread/members/2.cc       |    3 +--
 .../testsuite/30_threads/thread/members/3.cc       |    3 +--
 .../testsuite/30_threads/thread/members/4.cc       |    3 +--
 .../testsuite/30_threads/thread/members/5.cc       |    3 +--
 .../thread/members/hardware_concurrency.cc         |    3 +--
 .../30_threads/thread/native_handle/typesizes.cc   |    3 +--
 libstdc++-v3/testsuite/30_threads/thread/swap/1.cc |    3 +--
 .../testsuite/30_threads/timed_mutex/cons/1.cc     |    4 ++--
 .../timed_mutex/dest/destructor_locked.cc          |    4 ++--
 .../testsuite/30_threads/timed_mutex/lock/1.cc     |    4 ++--
 .../30_threads/timed_mutex/native_handle/1.cc      |    3 +--
 .../timed_mutex/native_handle/typesizes.cc         |    3 +--
 .../testsuite/30_threads/timed_mutex/try_lock/1.cc |    4 ++--
 .../testsuite/30_threads/timed_mutex/try_lock/2.cc |    4 ++--
 .../30_threads/timed_mutex/try_lock_for/1.cc       |    4 ++--
 .../30_threads/timed_mutex/try_lock_for/2.cc       |    4 ++--
 .../30_threads/timed_mutex/try_lock_for/3.cc       |    4 ++--
 .../30_threads/timed_mutex/try_lock_until/1.cc     |    4 ++--
 .../30_threads/timed_mutex/try_lock_until/2.cc     |    4 ++--
 .../30_threads/timed_mutex/try_lock_until/57641.cc |    4 ++--
 .../testsuite/30_threads/timed_mutex/unlock/1.cc   |    4 ++--
 .../testsuite/30_threads/timed_mutex/unlock/2.cc   |    3 +--
 libstdc++-v3/testsuite/30_threads/try_lock/1.cc    |    3 +--
 libstdc++-v3/testsuite/30_threads/try_lock/2.cc    |    3 +--
 libstdc++-v3/testsuite/30_threads/try_lock/3.cc    |    3 +--
 libstdc++-v3/testsuite/30_threads/try_lock/4.cc    |    3 +--
 .../testsuite/30_threads/unique_lock/cons/1.cc     |    3 +--
 .../testsuite/30_threads/unique_lock/cons/2.cc     |    3 +--
 .../testsuite/30_threads/unique_lock/cons/3.cc     |    3 +--
 .../testsuite/30_threads/unique_lock/cons/4.cc     |    3 +--
 .../testsuite/30_threads/unique_lock/cons/5.cc     |    4 ++--
 .../testsuite/30_threads/unique_lock/cons/6.cc     |    4 ++--
 .../testsuite/30_threads/unique_lock/locking/1.cc  |    3 +--
 .../testsuite/30_threads/unique_lock/locking/2.cc  |    3 +--
 .../testsuite/30_threads/unique_lock/locking/3.cc  |    4 ++--
 .../testsuite/30_threads/unique_lock/locking/4.cc  |    4 ++--
 .../30_threads/unique_lock/modifiers/1.cc          |    3 +--
 194 files changed, 234 insertions(+), 389 deletions(-)

diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc
index 144060c..c256239 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/atomic/3.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2014-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
index 7f324c6..a085a40 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc
@@ -18,10 +18,10 @@
 // 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
 
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-add-options libatomic }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 // { dg-require-cstdint "" }
 
 #include <memory>
diff --git a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
index bdc60c6..71a7b15 100644
--- a/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
+++ b/libstdc++-v3/testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc
@@ -18,10 +18,10 @@
 // 20.6.6.2 Template class shared_ptr [util.smartptr.shared]
 
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-add-options libatomic }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 // { dg-require-cstdint "" }
 
 #include <memory>
diff --git a/libstdc++-v3/testsuite/30_threads/async/42819.cc b/libstdc++-v3/testsuite/30_threads/async/42819.cc
index 8f9db3b..15ac4da 100644
--- a/libstdc++-v3/testsuite/30_threads/async/42819.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/42819.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/async/49668.cc b/libstdc++-v3/testsuite/30_threads/async/49668.cc
index ae11ca4..ba402c0 100644
--- a/libstdc++-v3/testsuite/30_threads/async/49668.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/49668.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2011-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/async/54297.cc b/libstdc++-v3/testsuite/30_threads/async/54297.cc
index c904829..9ef3c73 100644
--- a/libstdc++-v3/testsuite/30_threads/async/54297.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/54297.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 // { dg-require-sleep "" }
 
diff --git a/libstdc++-v3/testsuite/30_threads/async/any.cc b/libstdc++-v3/testsuite/30_threads/async/any.cc
index 7fec2db..7651b2c 100644
--- a/libstdc++-v3/testsuite/30_threads/async/any.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/any.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/async/async.cc b/libstdc++-v3/testsuite/30_threads/async/async.cc
index 7fa9b03..8c3a0c1 100644
--- a/libstdc++-v3/testsuite/30_threads/async/async.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/async.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/async/except.cc b/libstdc++-v3/testsuite/30_threads/async/except.cc
index 9b68c42..faddc88 100644
--- a/libstdc++-v3/testsuite/30_threads/async/except.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/except.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/async/launch.cc b/libstdc++-v3/testsuite/30_threads/async/launch.cc
index 13c9bdf..77b6dc9 100644
--- a/libstdc++-v3/testsuite/30_threads/async/launch.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/launch.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2011-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc b/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
index 55968af..b6e8820 100644
--- a/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/lwg2021.cc
@@ -16,9 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do compile }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // LWG 2021. Further incorrect usages of result_of
diff --git a/libstdc++-v3/testsuite/30_threads/async/sync.cc b/libstdc++-v3/testsuite/30_threads/async/sync.cc
index eb0fde3..572134a 100644
--- a/libstdc++-v3/testsuite/30_threads/async/sync.cc
+++ b/libstdc++-v3/testsuite/30_threads/async/sync.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/call_once/39909.cc b/libstdc++-v3/testsuite/30_threads/call_once/39909.cc
index 01bcb1d..1f35d7f 100644
--- a/libstdc++-v3/testsuite/30_threads/call_once/39909.cc
+++ b/libstdc++-v3/testsuite/30_threads/call_once/39909.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/call_once/49668.cc b/libstdc++-v3/testsuite/30_threads/call_once/49668.cc
index 67ef6cb..7eb5426 100644
--- a/libstdc++-v3/testsuite/30_threads/call_once/49668.cc
+++ b/libstdc++-v3/testsuite/30_threads/call_once/49668.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2011-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/call_once/60497.cc b/libstdc++-v3/testsuite/30_threads/call_once/60497.cc
index 129a2bc..9955a9ee 100644
--- a/libstdc++-v3/testsuite/30_threads/call_once/60497.cc
+++ b/libstdc++-v3/testsuite/30_threads/call_once/60497.cc
@@ -1,7 +1,6 @@
 // { dg-do compile }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2014-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc b/libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc
index 9f85670..26cfa57 100644
--- a/libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc
+++ b/libstdc++-v3/testsuite/30_threads/call_once/call_once1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/call_once/dr2442.cc b/libstdc++-v3/testsuite/30_threads/call_once/dr2442.cc
index 4126c54..2894710 100644
--- a/libstdc++-v3/testsuite/30_threads/call_once/dr2442.cc
+++ b/libstdc++-v3/testsuite/30_threads/call_once/dr2442.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2016-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/54185.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/54185.cc
index ea0d5bb..3d044c1 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable/54185.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/54185.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2012-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc
index a8b41dd..79104e1 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/cons/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc
index 98b1dad..6cf336f 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/members/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc
index c671804..744e0b8 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/members/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/members/3.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/members/3.cc
index 4cd0fb8..079b024 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable/members/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/members/3.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2014-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc
index 12b9d12..096a0da 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/members/53841.cc
@@ -1,7 +1,6 @@
 // { dg-do compile }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2012-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/members/68519.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/members/68519.cc
index 9a70713..2a6ecb9 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable/members/68519.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/members/68519.cc
@@ -16,9 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 #include <condition_variable>
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc
index be1923a..deac681 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable/native_handle/typesizes.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc
index fef0ce8..9278114 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/50862.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 // { dg-require-sched-yield "" }
  
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/53830.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/53830.cc
index 53b1d20..8b0c87b 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/53830.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/53830.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 // { dg-require-sched-yield "" }
 // { dg-require-sleep "" }
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/cond.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/cond.cc
index 122bb13..6b994d0 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/cond.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/cond.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2018-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc
index d3e1cf4..5db804a 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/cons/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc
index bc254c3..c21fc5a 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc
index 9d75a76..5d822d7 100644
--- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/members/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/future/cons/move.cc b/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
index 77c551e..26a59d2 100644
--- a/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/cons/move.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/45133.cc b/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
index 54e7cb9..d27bbd5 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/45133.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/get.cc b/libstdc++-v3/testsuite/30_threads/future/members/get.cc
index a884008..537f176c 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/get.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/get.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/get2.cc b/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
index 27dbb18..8550fe4 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/get2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/share.cc b/libstdc++-v3/testsuite/30_threads/future/members/share.cc
index c0ea49f..1eff6ac 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/share.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/share.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2011-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/valid.cc b/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
index 3f540ecc..bc000bd 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/valid.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
index e6a8af8..f3d6666 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
index aa0ac33..4bd603f 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait_for.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc b/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
index 4137bc0..1742fe6 100644
--- a/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
+++ b/libstdc++-v3/testsuite/30_threads/future/members/wait_until.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/lock/1.cc b/libstdc++-v3/testsuite/30_threads/lock/1.cc
index 285e3c1..8c5cc9a 100644
--- a/libstdc++-v3/testsuite/30_threads/lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/lock/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/lock/2.cc b/libstdc++-v3/testsuite/30_threads/lock/2.cc
index b4e1e1c..977ffba 100644
--- a/libstdc++-v3/testsuite/30_threads/lock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/lock/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/lock/3.cc b/libstdc++-v3/testsuite/30_threads/lock/3.cc
index 18fd009c..6185ffe 100644
--- a/libstdc++-v3/testsuite/30_threads/lock/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/lock/3.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/lock/4.cc b/libstdc++-v3/testsuite/30_threads/lock/4.cc
index 01b3c177..f31b2dd 100644
--- a/libstdc++-v3/testsuite/30_threads/lock/4.cc
+++ b/libstdc++-v3/testsuite/30_threads/lock/4.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc b/libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc
index 7f6cbed..ddd7d5d 100644
--- a/libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/mutex/cons/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc b/libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc
index 25bce6b..ee1b3a8 100644
--- a/libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc
+++ b/libstdc++-v3/testsuite/30_threads/mutex/dest/destructor_locked.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc b/libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc
index d08acf8..3e9d24fb 100644
--- a/libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/mutex/lock/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc b/libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc
index 9bc64b3..af7d994 100644
--- a/libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/mutex/native_handle/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc
index 87ab41f..5ddf652 100644
--- a/libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/mutex/native_handle/typesizes.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc
index 56340bc..cc66799 100644
--- a/libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/mutex/try_lock/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc
index 527c010..afeb553 100644
--- a/libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/mutex/try_lock/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc b/libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc
index fb0da36..5777e2b 100644
--- a/libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/mutex/unlock/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/mutex/unlock/2.cc b/libstdc++-v3/testsuite/30_threads/mutex/unlock/2.cc
index bbe04c6..b9a8116 100644
--- a/libstdc++-v3/testsuite/30_threads/mutex/unlock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/mutex/unlock/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2015-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
index 2f84cea..aa13368 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/49668.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2011-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
index 66aff7c..a8dd60e 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/60564.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2014-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
index d8c2dfc..3131758 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
index 2090224..1d305ad9 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
index dad645c..e354b98 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/3.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2011-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
index 10fa622..e199a46 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/56492.cc
@@ -1,7 +1,6 @@
 // { dg-do compile }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
index 4e0ca33..dbe477a 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/alloc.cc
@@ -1,6 +1,6 @@
-// { dg-do run { target { c++11_only || c++14_only } } }
-// { dg-options "-pthread"  }
-// { dg-require-effective-target pthread }
+// { dg-do run }
+// { dg-additional-options "-pthread" { target pthread } }
+// { dg-require-effective-target c++11 }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
index 2ccc89c..d7b1ce7 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
index db55da7..38a0e8c 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/cons/move_assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
index 6b6aca9..725f9b0b 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/at_thread_exit.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2014-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
index 0127873..9a98e21 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
index 0a9c100..9899583 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/get_future2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
index 58815326..b178e91 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
index 436ba70..13d6a37 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
index 6416786..08759c2 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke3.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
index 5f39012..5da2a79 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke4.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
index 84c0ac3..984bf4f 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/invoke5.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
index 8eea7f5..f746e23 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
index 35811e26..0bcaf9b 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/reset2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
index 601f423..e79be75a 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/swap.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc b/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
index 5b599b5..5a08c09 100644
--- a/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/packaged_task/members/valid.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2011-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/60966.cc b/libstdc++-v3/testsuite/30_threads/promise/60966.cc
index 6de0e35..445422f 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/60966.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/60966.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2014-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
index 1d9e943..4c3f25a 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
index ca75230..6d3d859 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/alloc.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
index 1458b13..ca67d30 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/move.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc b/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
index f5719b4..848b9a8 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/cons/move_assign.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc b/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
index 7bdfcdc..29c5156 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2014-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc
index 59eeae8..53e87c8 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/at_thread_exit2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2014-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc b/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
index 5985166..fd94655 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/get_future.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
index 016f918..246074a 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/get_future2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
index 282e1f1e6..94df89e 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
index 25850d0..7a925f0 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_exception2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
index b4b4771..b523c6b 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
index 86492aa..f4cba4a 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc b/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
index f778b36..5fb10e9 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/set_value3.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc b/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
index 81bab94..b5f7580 100644
--- a/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
+++ b/libstdc++-v3/testsuite/30_threads/promise/members/swap.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc
index 84d0cb6..84813c2 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/cons/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc
index 20041b0..22ad041 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc
index ff84950..e430098 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/lock/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc
index b4fe115..ddaae57 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc
index 2c15fee..5ad76a4 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc
index a797d77..81b95ed 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc
index e6ed947..0be6b0d 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/try_lock/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc
index 79ee408..c98345a2 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/2.cc b/libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/2.cc
index eec5174..64ffe55 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_mutex/unlock/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2015-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc
index 1f16d1a..997c851 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/cons/1.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc
index 974c6ab..62f03ed1 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc
index 5db96bc..4cee87a 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/1.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc
index 56b2073..180e3cd 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/lock/2.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc
index 4131489..2067b1d 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads-timed "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc
index 2a1d727..df98205 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads-timed "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc
index 79780d6..dec1c59 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc
index fd3bccf..12b42a14 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc
index 802c8df..dc3aa59 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc
index eaf57e8..d18ff07 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc
index 8d5131f..c785b85 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc
index 79780d6..dec1c59 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc
index ff6a35b..a5ccbb5 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc
index 56225c5..fc432ae 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/1.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/2.cc b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/2.cc
index 4a1b62a..cf04174 100644
--- a/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/recursive_timed_mutex/unlock/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2015-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
index d1d7b1a..cbf19d9 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/cons/move.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
index 0771dcc..ce44036 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/45133.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
index 621c79b..a89864b 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/get.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
index dbbeae1..0ff6618 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/get2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
index 937f67e..69a4a3b 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/valid.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
index 55e5b96..c01e429 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
index 50e7da0..62cf358 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_for.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
index 93c09ef..e126cd4 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_future/members/wait_until.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/1.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/1.cc
index 8b11982..f30058e 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/2.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/2.cc
index 020e127..1f8cca2 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/3.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/3.cc
index b55774f..ec3dc47 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/3.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/4.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/4.cc
index d7efb38..929b836 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/4.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/4.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/5.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/5.cc
index 4d4bab3..ff866b5 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/5.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/5.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/6.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/6.cc
index f531266..92b4a18 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_lock/cons/6.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_lock/cons/6.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/1.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/1.cc
index 3775fc9..2eef391 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/2.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/2.cc
index 95c6d0c..8e59820 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/3.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/3.cc
index 1d04da6..90e73e8 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/3.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/4.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/4.cc
index 46e060b..0574995 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_lock/locking/4.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_lock/locking/4.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/1.cc b/libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/1.cc
index cf08302..ca5a1f12 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_lock/modifiers/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc
index ea177c0..635452b 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/cons/1.cc
@@ -1,6 +1,6 @@
-// { dg-options "-std=gnu++17 -pthread" }
+// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
-// { dg-require-effective-target pthread }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2015-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc
index c1a3cd6..eb41bf2 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/1.cc
@@ -1,6 +1,6 @@
-// { dg-options "-std=gnu++17 -pthread" }
+// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
-// { dg-require-effective-target pthread }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2015-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc
index d5d5e10..b4b96b3 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/try_lock/2.cc
@@ -1,6 +1,6 @@
-// { dg-options "-std=gnu++17 -pthread" }
+// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
-// { dg-require-effective-target pthread }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2015-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_mutex/unlock/1.cc b/libstdc++-v3/testsuite/30_threads/shared_mutex/unlock/1.cc
index 146d8c2..939c0f03 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_mutex/unlock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_mutex/unlock/1.cc
@@ -1,6 +1,6 @@
-// { dg-options "-std=gnu++17 -pthread" }
+// { dg-options "-std=gnu++17" }
 // { dg-do run { target c++17 } }
-// { dg-require-effective-target pthread }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2015-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/cons/1.cc b/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/cons/1.cc
index 987c01e..abfb979 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/cons/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/1.cc
index 566d405..29ffdee 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/2.cc
index 5b85d3c..3123630 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/3.cc b/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/3.cc
index 82cd113..ca8f1dd 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/try_lock/3.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/unlock/1.cc b/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/unlock/1.cc
index 1c5dc31..4a7b5fe 100644
--- a/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/unlock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/shared_timed_mutex/unlock/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++14 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2015-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/1.cc b/libstdc++-v3/testsuite/30_threads/this_thread/1.cc
index 2d99b8b..5ee8092 100644
--- a/libstdc++-v3/testsuite/30_threads/this_thread/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/this_thread/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/sleep_for-mt.cc b/libstdc++-v3/testsuite/30_threads/this_thread/sleep_for-mt.cc
index 4599381..6eb4ca8 100644
--- a/libstdc++-v3/testsuite/30_threads/this_thread/sleep_for-mt.cc
+++ b/libstdc++-v3/testsuite/30_threads/this_thread/sleep_for-mt.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 // { dg-require-sleep "" }
 
diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/sleep_until-mt.cc b/libstdc++-v3/testsuite/30_threads/this_thread/sleep_until-mt.cc
index fc8d10d8..95165b9 100644
--- a/libstdc++-v3/testsuite/30_threads/this_thread/sleep_until-mt.cc
+++ b/libstdc++-v3/testsuite/30_threads/this_thread/sleep_until-mt.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 // { dg-require-sleep "" }
 
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/1.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/1.cc
index a7e91b1d..0062e0d 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/2.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/2.cc
index 1b2cf859..5d11097 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/3.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/3.cc
index 1d86423..9387738 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/3.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/4.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/4.cc
index f77b3c5..443eb53 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/4.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/4.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc
index 057aa65..f5fdbbc 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/49668.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2011-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/5.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/5.cc
index 9d6921a..2c7b0a0 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/5.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/5.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/6.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/6.cc
index e215ed1..2c36e7b 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/6.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/6.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/7.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/7.cc
index e83fba3..50b14ae 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/7.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/7.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/8.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/8.cc
index 3ff6ac9..2da704a 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/8.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/8.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/9.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/9.cc
index de79618..46bb7c9 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/9.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/9.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc
index a3401cd..a94e599 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/moveable.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/cons/terminate.cc b/libstdc++-v3/testsuite/30_threads/thread/cons/terminate.cc
index 6e71e95..c402e45 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/cons/terminate.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/cons/terminate.cc
@@ -16,9 +16,8 @@
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 #include <thread>
diff --git a/libstdc++-v3/testsuite/30_threads/thread/members/1.cc b/libstdc++-v3/testsuite/30_threads/thread/members/1.cc
index 9197d53..e08c89b 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/members/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/members/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/members/2.cc b/libstdc++-v3/testsuite/30_threads/thread/members/2.cc
index 72f3c14..5735398 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/members/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/members/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/members/3.cc b/libstdc++-v3/testsuite/30_threads/thread/members/3.cc
index 8390f99..1ca3787 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/members/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/members/3.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/members/4.cc b/libstdc++-v3/testsuite/30_threads/thread/members/4.cc
index 1c7a642..e2445ab 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/members/4.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/members/4.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/members/5.cc b/libstdc++-v3/testsuite/30_threads/thread/members/5.cc
index f2c9243..a23c58b 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/members/5.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/members/5.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc b/libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc
index bf3fc6d..e8ae5ac 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/members/hardware_concurrency.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 // { dg-require-nprocs "" }
 
diff --git a/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
index c3ed938..403f298 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/native_handle/typesizes.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc b/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc
index 22f501d..881de00 100644
--- a/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/thread/swap/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc
index d26dea8..6442c2c 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/cons/1.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc
index 5c7cde1..27e8bc5 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/dest/destructor_locked.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc
index 25fb2f3..dbe3c89 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/lock/1.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc
index 446b9c3..c4b94dc 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads-timed "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc
index 07e95ae..3850183 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/native_handle/typesizes.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads-timed "" }
 
 // Copyright (C) 2009-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc
index f857815..7fe759e 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/1.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc
index 1e77179..04ffeb0 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock/2.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc
index e0ab8b7..e798ac77 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/1.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc
index 186951b..4e37045 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/2.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 // { dg-require-cstdint "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc
index 40b4ed0..dd6174a 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_for/3.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc
index f857815..7fe759e 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/1.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc
index 1e77179..04ffeb0 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/2.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc
index fbdfb82..9ea5607 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/try_lock_until/57641.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2013-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc
index ae41c40..baf72b7 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/1.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/2.cc b/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/2.cc
index 74a833a..2aad347 100644
--- a/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/timed_mutex/unlock/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2015-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/try_lock/1.cc b/libstdc++-v3/testsuite/30_threads/try_lock/1.cc
index 67df1f7..212dbd9 100644
--- a/libstdc++-v3/testsuite/30_threads/try_lock/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/try_lock/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/try_lock/2.cc b/libstdc++-v3/testsuite/30_threads/try_lock/2.cc
index 5459e23..9cbfe64 100644
--- a/libstdc++-v3/testsuite/30_threads/try_lock/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/try_lock/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/try_lock/3.cc b/libstdc++-v3/testsuite/30_threads/try_lock/3.cc
index f31bff8..cd0a30e 100644
--- a/libstdc++-v3/testsuite/30_threads/try_lock/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/try_lock/3.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/try_lock/4.cc b/libstdc++-v3/testsuite/30_threads/try_lock/4.cc
index 1ed7888..3427a0d 100644
--- a/libstdc++-v3/testsuite/30_threads/try_lock/4.cc
+++ b/libstdc++-v3/testsuite/30_threads/try_lock/4.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2010-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc
index cebeb6b..458de09 100644
--- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc
index 5b969c6..26b97db 100644
--- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc
index d8d025d..5623ee0 100644
--- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/3.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc
index 5d9ac20..c77d3b5 100644
--- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc
+++ b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/4.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc
index 32625cf..801bbbe 100644
--- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc
+++ b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/5.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc
index 50f4fc8..cb51e72 100644
--- a/libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc
+++ b/libstdc++-v3/testsuite/30_threads/unique_lock/cons/6.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc
index ba901d6..b3edb29 100644
--- a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc
index 3b4c6e7..c443a02 100644
--- a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/2.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc
index 135b6ff..1a94365 100644
--- a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/3.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc
index f526d9a..9867d93 100644
--- a/libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc
+++ b/libstdc++-v3/testsuite/30_threads/unique_lock/locking/4.cc
@@ -1,7 +1,7 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
+// { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.
 //
diff --git a/libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc b/libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc
index adee63c..e0c65ed 100644
--- a/libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc
+++ b/libstdc++-v3/testsuite/30_threads/unique_lock/modifiers/1.cc
@@ -1,7 +1,6 @@
 // { dg-do run }
-// { dg-options "-pthread"  }
+// { dg-additional-options "-pthread" { target pthread } }
 // { dg-require-effective-target c++11 }
-// { dg-require-effective-target pthread }
 // { dg-require-gthreads "" }
 
 // Copyright (C) 2008-2020 Free Software Foundation, Inc.


-- 
Alexandre Oliva, happy hacker
https://FSFLA.org/blogs/lxo/
Free Software Activist
GNU Toolchain Engineer


More information about the Gcc-patches mailing list