libstdc++: Link test with libatomic if needed [PR 98003]
authorJonathan Wakely <jwakely@redhat.com>
Tue, 1 Dec 2020 10:36:09 +0000 (10:36 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 1 Dec 2020 10:37:38 +0000 (10:37 +0000)
libstdc++-v3/ChangeLog:

PR libstdc++/98003
* testsuite/27_io/basic_syncbuf/sync_ops/1.cc: Add options for
libatomic.

libstdc++-v3/testsuite/27_io/basic_syncbuf/sync_ops/1.cc

index 90d20f1..a224e0c 100644 (file)
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-options "-std=gnu++2a -pthread" }
+// { dg-options "-std=gnu++2a" }
 // { dg-do run { target c++2a } }
-// { dg-require-effective-target pthread }
 // { dg-require-effective-target cxx11-abi }
 // { dg-require-gthreads "" }
+// { dg-add-options libatomic }
+// { dg-additional-options "-pthread" { target pthread } }
 
 #include <algorithm>
 #include <atomic>