target-supports.exp (check_effective_target_pthread): Add #include <pthread.h> direct...
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 1 Sep 2019 12:55:58 +0000 (12:55 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 1 Sep 2019 12:55:58 +0000 (12:55 +0000)
* lib/target-supports.exp (check_effective_target_pthread): Add
#include <pthread.h> directive to the test.

From-SVN: r275271

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index 72c0abb5d3d6131dbfa0ac2ac6186f3b91bc5868..a84a8b983aec76856159f2b23d2ba7bc4db9ef9a 100644 (file)
@@ -2,6 +2,9 @@
 
        * gcc.c-torture/execute/20190901-1.c: New test.
 
+       * lib/target-supports.exp (check_effective_target_pthread): Add
+       #include <pthread.h> directive to the test.
+
 2019-09-01  Paul Thomas  <pault@gcc.gnu.org>
 
        * gfortran.dg/select_rank_1.f90 : New test.
index 300d22a2d650b8f556b51b3e12d612855bbbfa73..739321abe3eb7e293827b81701cdaa57dfcb030b 100644 (file)
@@ -1052,11 +1052,10 @@ proc check_effective_target_swapcontext {} {
     }]
 }
 
-# Return 1 if compilation with -pthread is error-free for trivial
-# code, 0 otherwise.
-
+# Return 1 if the target supports POSIX threads, 0 otherwise.
 proc check_effective_target_pthread {} {
     return [check_no_compiler_messages pthread object {
+       #include <pthread.h>
        void foo (void) { }
     } "-pthread"]
 }