Fix libstdc++ testsuite to handle VxWorks gthreads implementation
diff mbox series

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

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,

Patch
diff mbox series

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.