diff mbox series

Fix libstdc++ testsuite to handle VxWorks gthreads implementation

Message ID ada6ff22-9203-772b-f223-4c4c677af13f@adacore.com
State New
Headers show
Series Fix libstdc++ testsuite to handle VxWorks gthreads implementation | expand

Commit Message

Corentin Gay Dec. 10, 2019, 2:58 p.m. UTC
Hello there ! 

 

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.

This patch was tested on x86_64-linux and is part of our nightly testing
on all platforms, including VxWorks.

As this is my first submission, please tell me if I missed anything.

Below you will find the diff and the Changelog.

Cheers,
Corentin Gay

Comments

Jonathan Wakely Dec. 20, 2019, 10:33 a.m. UTC | #1
On 10/12/19 15:58 +0100, Corentin Gay wrote:
>Hello there !
>
>
>
>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.
>
>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).

OK for trunk, thanks.
Corentin Gay Jan. 23, 2020, 11:14 a.m. UTC | #2
On 20/12/2019 11:33, Jonathan Wakely wrote:
> 
> 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).
> 
> OK for trunk, thanks.
> 

Thank you for the input Jonathan, it hasn't been tested on AIX.
We are in the process of doing so.

Cheers,
Alexandre Oliva Aug. 21, 2020, 12:37 p.m. UTC | #3
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.
Jonathan Wakely Aug. 24, 2020, 3:09 p.m. UTC | #4
On 21/08/20 09:37 -0300, Alexandre Oliva wrote:
>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!


Thanks. There's a new FAIL due to a bad merge.

That test needs to be restricted to C++11 and C++14, which I did
recently on master. However, since the default became -std=gnu++17
that means it stopped running on master. Since your patch it runs
again, but now fails.

This fixes it to use an explicit -std=gnu++11 and not run for C++17.

Pushed to master.
Alexandre Oliva Aug. 25, 2020, 2:19 a.m. UTC | #5
On Aug 24, 2020, Jonathan Wakely <jwakely@redhat.com> wrote:

>>> 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!

> Thanks. There's a new FAIL due to a bad merge.

Erhm...  Weird, I don't recall any manual adjustments to
packaged_task/cons/alloc.cc.  Indeed, the changes look exactly the same
that Corentin had proposed before.  Maybe the constraints were already
there, but hte unintended effects were not noticeable before the change
to the default?

Anyway, thanks for fixing the failure.  That said, I confess I don't get
how this test will (or should) ever be run in C++14 mode, being given an
explicit -std=gnu++11.  Is this really the right way to go about it?
Jonathan Wakely Aug. 25, 2020, 7:48 a.m. UTC | #6
On 24/08/20 23:19 -0300, Alexandre Oliva wrote:
>On Aug 24, 2020, Jonathan Wakely <jwakely@redhat.com> wrote:
>
>>>> 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!
>
>> Thanks. There's a new FAIL due to a bad merge.
>
>Erhm...  Weird, I don't recall any manual adjustments to
>packaged_task/cons/alloc.cc.  Indeed, the changes look exactly the same
>that Corentin had proposed before.  Maybe the constraints were already
>there, but hte unintended effects were not noticeable before the change
>to the default?

You're right, it's not a bad merge (just a bad change I should have
noticed in the review :-)

My change to prevent it running for C++17 was done May 2019 with
9a0af7e3fb425ae2c0e044d044feb81ef493ce2c so that was already there
before Corentin's original patch.

>Anyway, thanks for fixing the failure.  That said, I confess I don't get
>how this test will (or should) ever be run in C++14 mode, being given an
>explicit -std=gnu++11.  Is this really the right way to go about it?

The medium term plan is to run libstdc++ tests with several different
-std options, as is done for g++ tests. At that point we can drop most
(but not all) explicit -std options in the tests. But until then, this
test won't run at all if we don't put an explicit -std there, because
it gets skipped with the default -std=gnu++17.

Testing with -std=gnu++11 is better than not testing at all, and the
code being tested is identical for C++11 and C++14 so it's not a
problem that it isn't tested for C++14.

Now and then I manually remove all -std options from the tests and run
them with multiple -std permutations, so it does get tested with C++14
mode, just not automatically.
diff mbox series

Patch

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 962afff..3b3d163 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-2019 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 251e937..4c773cb 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 b348569..3fe5f728 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 bd0c013..f69e0d3 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-2019 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 b9649ac..2cd1b1e 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-2019 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 654ce40..e2f8583 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 ac1157b..6a42002 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-2019 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 851925b..badeef8 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-2019 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 81b56f9..1880428 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-2019 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 9dbaee1..8616dd7 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-2019 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 8e6c26e..b2bbaa4 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 d67cfd1..55ca50b 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-2019 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 f59aa35..ae6c135 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-2019 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 88c0947..a9e1489 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-2019 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 bf286b2..43d835a 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-2019 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 544b564..9a5b645 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-2019 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 3a397a5..dfb1849 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-2019 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 0cb5948..e3babbd 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-2019 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 7476bd5..bf809ea 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-2019 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 02808cf..2db4ea3 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-2019 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 f821d3f..abe717e 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-2019 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 168e278..b8ea4b5 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-2019 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 2aebca8..f8be6d1 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-2019 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 bdbd35b..cc52270 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 80d4edb..154e1e4 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-2019 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 3efdfe3..d8af07f 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 780c89a..08d02da 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 05843c7..6dc4b23 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-2019 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 d11a603..aaf60b6 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-2019 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 8983f8f..3aff998 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-2019 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 897fa86..4e23d62 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-2019 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 a002f7f..6e12d04 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-2019 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 b88d393..726f3d9 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-2019 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 3de961f..488856d 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-2019 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 7767d29..69e9963 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-2019 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 90d667d..452034e 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-2019 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 2e431df..7c84773 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-2019 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 fa46fa3..1cb477a 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-2019 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 b0d2f02..ddfdc20 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-2019 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 1430ac3..6989396 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-2019 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 a6ba649..e2c4425 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-2019 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 957dc05..99569c8 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-2019 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 428f3be..5bd53a1 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-2019 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 f8aaa40..2b6ef81 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-2019 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 68c526a..6f8b605 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-2019 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 657fd7b..3dae017 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-2019 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 4896b8a..cbec502 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-2019 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 d69c830..c4f3c07 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-2019 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 a3ddf5d..e720b27 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-2019 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 c89d84b..98d2593 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-2019 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 20aa388..6e7fd59 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-2019 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 9bf09d8..be436fb 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-2019 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 cff2b3e..86c105d 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-2019 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 aa7c1db..a808169 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-2019 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 004ae90..660b0e3 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-2019 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 9c06a22..4c5ece4 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-2019 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 a54ca3e..2b9d5fb 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-2019 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 1d2de04..8f3f786 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-2019 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 708b74a..bf8264d 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-2019 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 815ae0d..fc22e42 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-2019 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 f964e8d..099c453 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-2019 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 60f9f38..965bd10 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-2019 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 20411d2..d79acb8 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-2019 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 5be97f8..469b0a7 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-2019 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 b0fc675..7889c85 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-2019 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 5c000ea..1f09445 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-2019 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 c3c724e..b070639 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-2019 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 5c66b2d..0967e04 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-2019 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 19467e2..80be7b3 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-2019 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 f84d1cb..107d267 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-2019 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 cf6ab71..4b26a67 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-2019 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 a7416c4..760324c 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-2019 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 e1ee541..31ac035 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-2019 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 a227015..efe81e8 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-2019 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 d26c349..ba3202a 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-2019 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 89bf503..249082e 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-2019 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 2ad41bf..3805727 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-2019 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 c5f2cdb..d79035b 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-2019 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 05fb6bf..1c46bf2 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-2019 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 9a9aa76..5f9c1f5 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-2019 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 deb7759..5de67ff 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-2019 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 b4a7f33..3ccdb1c 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-2019 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 4e4fa19..a54614f 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-2019 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 2d29727..7a58161 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-2019 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 7b71b54..1f74f8e 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-2019 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 ec4c423..c729a36 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-2019 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 546c6af..ed614aa 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-2019 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 5e46580..577424c 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-2019 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 4cf8113..8be8201 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-2019 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 6a24d61..ebffb10 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-2019 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 34fcb6d..578119b 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-2019 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 9d7555f..ff7b951 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-2019 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 f2e61dd..d9a9412 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-2019 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 7bd49cd..495ed97 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-2019 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 d586a1a..41b2c73 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-2019 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 051c932..dd22c4f 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-2019 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 1dd343d..e70e52f 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-2019 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 b38abdd..8f42641 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-2019 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 37baa56..d0ce8d9 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-2019 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 69a5d15..82d0167 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-2019 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 03332f7..b524fef 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-2019 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 680847b..826a475 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-2019 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 3133cac..8d636e8 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-2019 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 ba6ffca..2604cc3 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-2019 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 d6cabef..6c6e90c 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-2019 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 206f29d..3ee140e 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-2019 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 1ddca2a..111ec49 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-2019 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 e53190b..17a21cf 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-2019 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 d295012..1cd46c7 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-2019 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 d6cabef..6c6e90c 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-2019 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 ecf00ba..eb35077 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-2019 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 0112155..ce03dd6 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-2019 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 f416984..dbdc531 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-2019 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 d02b9bb..e785663 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-2019 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 006b75b..0a69a94 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-2019 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 e734cc1..2f5e48b 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-2019 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 ff4f355..7258924 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-2019 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 2847349..5d970d1 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-2019 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 35d95c2..d4f4433 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-2019 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 2828b66..1574c54 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-2019 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 cd5ef66..0c8d545 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-2019 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 0c1c21a..8a81aed 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-2019 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 d0176f4..4f85625 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-2019 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 4f8404b..1d750e7 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-2019 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 cbcfbd2..3ccbb24 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-2019 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 976a494..49c9e94 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-2019 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 038faef..ba24880 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-2019 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 292878d..1724c3a 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-2019 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 3f71d9d..b5f7414 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-2019 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 5bc5ccb..5bfbb1b 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-2019 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 c209011..ef1dd7b 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-2019 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 ea0fda7..2d2e15d 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-2019 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 c934ffa..20dca12 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-do run }
-// { dg-options "-std=gnu++17 -pthread" }
-// { dg-require-effective-target pthread }
+// { dg-options "-std=gnu++17" }
+// { dg-additional-options "-pthread" { target pthread } }
  // { dg-require-gthreads "" }

  // Copyright (C) 2015-2019 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 3313323..b55f0a9 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-do run }
-// { dg-options "-std=gnu++17 -pthread" }
-// { dg-require-effective-target pthread }
+// { dg-options "-std=gnu++17" }
+// { dg-additional-options "-pthread" { target pthread } }
  // { dg-require-gthreads "" }

  // Copyright (C) 2015-2019 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 579ce5a..7ba4f4f 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-do run }
-// { dg-options "-std=gnu++17 -pthread" }
-// { dg-require-effective-target pthread }
+// { dg-options "-std=gnu++17" }
+// { dg-additional-options "-pthread" { target pthread } }
  // { dg-require-gthreads "" }

  // Copyright (C) 2015-2019 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 2103855..f8033e9 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-do run }
-// { dg-options "-std=gnu++17 -pthread" }
-// { dg-require-effective-target pthread }
+// { dg-options "-std=gnu++17" }
+// { dg-additional-options "-pthread" { target pthread } }
  // { dg-require-gthreads "" }

  // Copyright (C) 2015-2019 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 d37ee7a..df9bf8c 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-2019 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 e4c5d4c..f69d9bb 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-2019 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 3fc3a42..de0b5eb 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-2019 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 1cf191c..3dc9fce 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-2019 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 993b2df..e914e39 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-2019 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 5d36c0e..3e9c032cb 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-2019 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/2.cc 
b/libstdc++-v3/testsuite/30_threads/this_thread/2.cc
index 59193d4..ddfbf86 100644
--- a/libstdc++-v3/testsuite/30_threads/this_thread/2.cc
+++ b/libstdc++-v3/testsuite/30_threads/this_thread/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-2019 Free Software Foundation, Inc.
diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/3.cc 
b/libstdc++-v3/testsuite/30_threads/this_thread/3.cc
index 26ebb1f..f9ce06d 100644
--- a/libstdc++-v3/testsuite/30_threads/this_thread/3.cc
+++ b/libstdc++-v3/testsuite/30_threads/this_thread/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 "" }
  // { dg-require-sleep "" }

diff --git a/libstdc++-v3/testsuite/30_threads/this_thread/4.cc 
b/libstdc++-v3/testsuite/30_threads/this_thread/4.cc
index 02c86fb..e53358d 100644
--- a/libstdc++-v3/testsuite/30_threads/this_thread/4.cc
+++ b/libstdc++-v3/testsuite/30_threads/this_thread/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 "" }
  // { 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 34d8a45..0e3d90d 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-2019 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 74e1723..b52452a 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-2019 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 611242d..5715aa7 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-2019 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 b861736..897e20c 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-2019 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 1e98e1a..d5cebf9 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-2019 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 9655b3f..a799f53 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-2019 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 e66ab8e..153b304 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-2019 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 1b1c7f9..67e29a0 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-2019 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 df245cc..99deadb 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-2019 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 ac6a8a9..09ba1d4 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-2019 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 86a7a2e..54e5e96 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-2019 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 8fc9fae..5172c3a 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 2e9d565..d24e37c 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-2019 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 054ac72..228f3f8 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-2019 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 f67e410..e4860de 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-2019 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 501fe24..e537d75 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-2019 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 ed27351..58a5187 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-2019 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 3fca6ae..60499f3 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 d636588..a8e7900 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-2019 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 1cf8254..931bb35 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-2019 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 9a5f9b0..3e5e906 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-2019 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 031bbe7..6ad6a6d 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-2019 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 58217a1..d9a35ab 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-2019 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 c27c8fa..fbad4ed 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-2019 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 077b26b..4d2ad63 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-2019 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 463c802..f123a7a 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-2019 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 8a170e7..54885d8 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-2019 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 2b108d5..dcc4a07 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-2019 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 4d23f11..7482ef7 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-2019 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 77de304..0ca89c3 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-2019 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 463c802..f123a7a 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-2019 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 8a170e7..54885d8 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-2019 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 6355d8f..9bea5b0 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-2019 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 470b29e..ab1fd27 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-2019 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 cc96f45..b090dc9 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-2019 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 e309149..6ee41b2 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-2019 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 d98f59a..1423eea 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-2019 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 94eedea..205286a 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-2019 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 fd9c79e..10ade87 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-2019 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 d127bb9..d31cc94 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-2019 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 f1cff08..d6f19a5 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-2019 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 fdb43bf..8155ed3 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-2019 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 73de723..f763569 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-2019 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 6c9584d..2c52ad2 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-2019 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 eabc2e5..fb2b80c 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-2019 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 c9f3940..a253790 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-2019 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 1fc760a..09f421c 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-2019 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 ac764ea..caca0c0 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-2019 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 2c46a86..3b9d1fb 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-2019 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 e244179..8660e9d 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-2019 Free Software Foundation, Inc.