diff mbox series

libstdc++/testsuite/experimental/algorithm link errors

Message ID CAGWvnykn2z6dSdjU+kWzNOw+qBefMqcxiadAyhO4_SjMTmJy-g@mail.gmail.com
State New
Headers show
Series libstdc++/testsuite/experimental/algorithm link errors | expand

Commit Message

David Edelsohn June 26, 2018, 7:09 p.m. UTC
The recent addition of

testsuite/experimental/algorithm/sample-2.cc
testsuite/experimental/algorithm/shuffle.cc

introduced link errors on AIX.  AIX (and Solaris) require additional
options for TLS in some situations.

This patch adds the dejagnu TLS directives.

Was this dependency intended?  Is this patch okay?

Thanks, David

* testsuite/experimental/algorithm/sample-2.cc: Add TLS directives.
* testsuite/experimental/algorithm/shuffle.cc: Likewise.

Comments

Jonathan Wakely June 26, 2018, 7:13 p.m. UTC | #1
On 26/06/18 15:09 -0400, David Edelsohn wrote:
>The recent addition of
>
>testsuite/experimental/algorithm/sample-2.cc
>testsuite/experimental/algorithm/shuffle.cc
>
>introduced link errors on AIX.  AIX (and Solaris) require additional
>options for TLS in some situations.
>
>This patch adds the dejagnu TLS directives.
>
>Was this dependency intended?  Is this patch okay?

Yes, it's intended: those two tests depend on the per-thread random
number engine in <experimental/random>, and so the tests need the same
directives as testsuite/experimental/random/randint.cc

OK for trunk, thanks.
diff mbox series

Patch

Index: experimental/algorithm/sample-2.cc
===================================================================
--- experimental/algorithm/sample-2.cc  (revision 262161)
+++ experimental/algorithm/sample-2.cc  (working copy)
@@ -16,6 +16,8 @@ 
 // <http://www.gnu.org/licenses/>.

 // { dg-do run { target c++14 } }
+// { dg-require-effective-target tls_runtime }
+// { dg-add-options tls }

 #include <experimental/algorithm>
 #include <algorithm>

Index: experimental/algorithm/shuffle.cc
===================================================================
--- experimental/algorithm/shuffle.cc   (revision 262161)
+++ experimental/algorithm/shuffle.cc   (working copy)
@@ -1,4 +1,6 @@ 
 // { dg-do run { target c++14 } }
+// { dg-require-effective-target tls_runtime }
+// { dg-add-options tls }

 // Derived from: 2010-03-19  Paolo Carlini  <paolo.carlini@oracle.com>