We need to explicity link against libatomic on hppa. The attached changes add "dg-add-options libatomic" to the test setup where needed.
Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11. Committed to trunk. Dave -- John David Anglin dave.ang...@bell.net
2020-02-29 John David Anglin <dang...@gcc.gnu.org> * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc: Add libatomic option. * testsuite/30_threads/jthread/jthread.cc: Likewise. diff --git a/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc b/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc index cb1637c306d..0efda12708f 100644 --- a/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc +++ b/libstdc++-v3/testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc @@ -16,6 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-options "-std=gnu++2a -pthread" } +// { dg-add-options libatomic } // { dg-do run } // { dg-require-effective-target c++2a } // { dg-require-effective-target pthread } diff --git a/libstdc++-v3/testsuite/30_threads/jthread/jthread.cc b/libstdc++-v3/testsuite/30_threads/jthread/jthread.cc index c34958c25d9..746ff437c1d 100644 --- a/libstdc++-v3/testsuite/30_threads/jthread/jthread.cc +++ b/libstdc++-v3/testsuite/30_threads/jthread/jthread.cc @@ -16,6 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-options "-std=gnu++2a -pthread" } +// { dg-add-options libatomic } // { dg-do run { target c++2a } } // { dg-require-effective-target pthread } // { dg-require-gthreads "" }
2020-02-29 John David Anglin <dang...@gcc.gnu.org> * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic option. * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: Likewise. * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise. * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise. * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise. * testsuite/30_threads/stop_token/stop_source.cc: Likewise. * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise. * testsuite/30_threads/stop_token/stop_token.cc: Likewise. * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: Likewise. diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback.cc index da44f8ad8ed..b84d3af4f9b 100644 --- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback.cc +++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback.cc @@ -16,6 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-options "-std=gnu++2a" } +// { dg-add-options libatomic } // { dg-do run { target c++2a } } #include <stop_token> diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc index 12c54db554f..96f7197c3da 100644 --- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc +++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc @@ -16,6 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-options "-std=gnu++2a -pthread" } +// { dg-add-options libatomic } // { dg-require-effective-target c++2a } // { dg-require-effective-target pthread } // { dg-require-gthreads "" } diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock.cc index f9de6e02562..c59446cf1b0 100644 --- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock.cc +++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/deadlock.cc @@ -16,6 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-options "-std=gnu++2a" } +// { dg-add-options libatomic } // { dg-do run { target c++2a } } #include <stop_token> diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/destroy.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/destroy.cc index 3fa4d21c55c..b94743a884c 100644 --- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/destroy.cc +++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/destroy.cc @@ -16,6 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-options "-std=gnu++2a -pthread" } +// { dg-add-options libatomic } // { dg-require-effective-target c++2a } // { dg-require-effective-target pthread } // { dg-require-gthreads "" } diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/invoke.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/invoke.cc index 9b8137cc46d..dc121121a59 100644 --- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/invoke.cc +++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_callback/invoke.cc @@ -16,6 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-options "-std=gnu++2a" } +// { dg-add-options libatomic } // { dg-do run { target c++2a } } #include <stop_token> diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_source.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_source.cc index 9d15f0781ea..7b2ae70d3b5 100644 --- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_source.cc +++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_source.cc @@ -16,6 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-options "-std=gnu++2a" } +// { dg-add-options libatomic } // { dg-do run { target c++2a } } #include <stop_token> diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_source/assign.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_source/assign.cc index c822e8e398f..5aaaa05158f 100644 --- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_source/assign.cc +++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_source/assign.cc @@ -16,6 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-options "-std=gnu++2a" } +// { dg-add-options libatomic } // { dg-do run { target c++2a } } #include <stop_token> diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_token.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_token.cc index f8adc42b271..2ab16765bea 100644 --- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_token.cc +++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_token.cc @@ -16,6 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-options "-std=gnu++2a" } +// { dg-add-options libatomic } // { dg-do run { target c++2a } } #include <stop_token> diff --git a/libstdc++-v3/testsuite/30_threads/stop_token/stop_token/stop_possible.cc b/libstdc++-v3/testsuite/30_threads/stop_token/stop_token/stop_possible.cc index ee8de6889ed..4ac45b61f4a 100644 --- a/libstdc++-v3/testsuite/30_threads/stop_token/stop_token/stop_possible.cc +++ b/libstdc++-v3/testsuite/30_threads/stop_token/stop_token/stop_possible.cc @@ -16,6 +16,7 @@ // <http://www.gnu.org/licenses/>. // { dg-options "-std=gnu++2a" } +// { dg-add-options libatomic } // { dg-do run { target c++2a } } #include <stop_token>