Commit 2ff656f4 by John David Anglin Committed by John David Anglin

re PR libstdc++/89461 (FAIL: experimental/net/timer/waitable/cons.cc)

	PR libstdc++/89461
	* testsuite/lib/libstdc++.exp: Locate libatomic.
	* testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
	* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
	libatomic options.
	* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
	* testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
	* testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
	* testsuite/experimental/net/timer/waitable/ops.cc: Likewise.

From-SVN: r269628
parent b9da0278
2019-03-12 John David Anglin <dave.anglin@bell.net>
PR libstdc++/89461
* testsuite/lib/libstdc++.exp: Locate libatomic.
* testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
libatomic options.
* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
* testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
* testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
* testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2019-03-11 Jonathan Wakely <jwakely@redhat.com> 2019-03-11 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/89460 PR libstdc++/89460
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
// { dg-do run } // { dg-do run }
// { dg-options "-pthread" } // { dg-options "-pthread" }
// { dg-add-options libatomic }
// { dg-require-effective-target c++11 } // { dg-require-effective-target c++11 }
// { dg-require-effective-target pthread } // { dg-require-effective-target pthread }
// { dg-require-cstdint "" } // { dg-require-cstdint "" }
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
// { dg-do run } // { dg-do run }
// { dg-options "-pthread" } // { dg-options "-pthread" }
// { dg-add-options libatomic }
// { dg-require-effective-target c++11 } // { dg-require-effective-target c++11 }
// { dg-require-effective-target pthread } // { dg-require-effective-target pthread }
// { dg-require-cstdint "" } // { dg-require-cstdint "" }
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do run { target c++14 } } // { dg-do run { target c++14 } }
// { dg-add-options libatomic }
#include <experimental/timer> #include <experimental/timer>
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do run { target c++14 } } // { dg-do run { target c++14 } }
// { dg-add-options libatomic }
#include <experimental/timer> #include <experimental/timer>
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// { dg-do run { target c++14 } } // { dg-do run { target c++14 } }
// { dg-add-options libatomic }
#include <experimental/timer> #include <experimental/timer>
#include <testsuite_hooks.h> #include <testsuite_hooks.h>
......
...@@ -257,6 +257,15 @@ proc add_options_for_net_ts { flags } { ...@@ -257,6 +257,15 @@ proc add_options_for_net_ts { flags } {
return $flags return $flags
} }
# Add to FLAGS all the target-specific flags to link to libatomic, if required.
proc add_options_for_libatomic { flags } {
if { [istarget hppa*-*-hpux*] || [istarget riscv*-*-*] } {
return "$flags -L../../libatomic/.libs -latomic"
}
return $flags
}
# Like dg-options, but adds to the default options rather than replacing them. # Like dg-options, but adds to the default options rather than replacing them.
proc dg-additional-options { args } { proc dg-additional-options { args } {
......
...@@ -161,6 +161,17 @@ proc libstdc++_init { testfile } { ...@@ -161,6 +161,17 @@ proc libstdc++_init { testfile } {
} }
v3track gccdir 3 v3track gccdir 3
# Locate libatomic.
set v3-libatomic 0
set libatomicdir [lookfor_file $blddir/../libatomic .libs/libatomic.$shlib_ext]
if {$libatomicdir != ""} {
set v3-libatomic 1
set libatomicdir [file dirname $libatomicdir]
append ld_library_path_tmp ":${libatomicdir}"
verbose -log "libatomic support detected"
}
v3track libatomicdir 3
# Locate libgomp. This is only required for parallel mode. # Locate libgomp. This is only required for parallel mode.
set v3-libgomp 0 set v3-libgomp 0
set libgompdir [lookfor_file $blddir/../libgomp .libs/libgomp.$shlib_ext] set libgompdir [lookfor_file $blddir/../libgomp .libs/libgomp.$shlib_ext]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment