+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>
PR libstdc++/89460
// { dg-do run }
// { dg-options "-pthread" }
+// { dg-add-options libatomic }
// { dg-require-effective-target c++11 }
// { dg-require-effective-target pthread }
// { dg-require-cstdint "" }
// { dg-do run }
// { dg-options "-pthread" }
+// { dg-add-options libatomic }
// { dg-require-effective-target c++11 }
// { dg-require-effective-target pthread }
// { dg-require-cstdint "" }
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++14 } }
+// { dg-add-options libatomic }
#include <experimental/timer>
#include <testsuite_hooks.h>
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++14 } }
+// { dg-add-options libatomic }
#include <experimental/timer>
#include <testsuite_hooks.h>
// <http://www.gnu.org/licenses/>.
// { dg-do run { target c++14 } }
+// { dg-add-options libatomic }
#include <experimental/timer>
#include <testsuite_hooks.h>
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.
proc dg-additional-options { args } {
}
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.
set v3-libgomp 0
set libgompdir [lookfor_file $blddir/../libgomp .libs/libgomp.$shlib_ext]