Index: gdb/testsuite/gdb.threads/tls-nodebug.c |
diff --git a/gdb/testsuite/gdb.threads/tls-nodebug.c b/gdb/testsuite/gdb.threads/tls-nodebug.c |
index 73d96f0f3cdc15c9dd012533b457f71e4b031cdd..d3b31b7609c717cd1aaeb2f1576cfbe5e5551748 100644 |
--- a/gdb/testsuite/gdb.threads/tls-nodebug.c |
+++ b/gdb/testsuite/gdb.threads/tls-nodebug.c |
@@ -6,5 +6,7 @@ __thread int thread_local = 42; |
int main(void) |
{ |
+ /* Ensure we link against pthreads even with --as-needed. */ |
+ pthread_testcancel(); |
return 0; |
} |