projects
/
platform
/
upstream
/
binutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
gdb/testsuite/gdb.threads: Ensure TLS tests link against pthreads.
[platform/upstream/binutils.git]
/
gdb
/
testsuite
/
gdb.threads
/
tls-shared.c
diff --git
a/gdb/testsuite/gdb.threads/tls-shared.c
b/gdb/testsuite/gdb.threads/tls-shared.c
index
d4f8e5c
..
02b1308
100644
(file)
--- a/
gdb/testsuite/gdb.threads/tls-shared.c
+++ b/
gdb/testsuite/gdb.threads/tls-shared.c
@@
-1,6
+1,11
@@
+
+#include <pthread.h>
+
__thread int i_tls = 1;
int foo ()
{
+ /* Ensure we link against pthreads even with --as-needed. */
+ pthread_testcancel();
return i_tls;
}