* lib/target-supports.exp (check_effective_target_pthread_h): New.
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Feb 2008 00:11:06 +0000 (00:11 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Feb 2008 00:11:06 +0000 (00:11 +0000)
* gcc.dg/pthread-init-1.c, gcc.dg/pthread-init-2.c: Use
dg-require-effective-target pthread_h.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132650 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pthread-init-1.c
gcc/testsuite/gcc.dg/pthread-init-2.c
gcc/testsuite/lib/target-supports.exp

index 074e436..db11e64 100644 (file)
@@ -1,3 +1,9 @@
+2008-02-25  Joseph Myers  <joseph@codesourcery.com>
+
+       * lib/target-supports.exp (check_effective_target_pthread_h): New.
+       * gcc.dg/pthread-init-1.c, gcc.dg/pthread-init-2.c: Use
+       dg-require-effective-target pthread_h.
+
 2008-02-26  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 
        * gcc.dg/Wswitch-enum-error.c: New.
index 9cf4fa3..2f78844 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 /* { dg-do compile } */
+/* { dg-require-effective-target pthread_h } */
 /* { dg-options "-Wextra -Wall" } */
 
 #include "pthread-init-common.h"
index 6fc427f..2e1b93a 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 /* { dg-do compile } */
+/* { dg-require-effective-target pthread_h } */
 /* { dg-options "-Wextra -Wall -ansi" } */
 /* { dg-options "-Wextra -Wall -ansi -D_POSIX_C_SOURCE=199506L" { target { *-*-hpux* *-*-solaris2.5.1 } } } */
 
index ba1454e..c43a371 100644 (file)
@@ -2214,6 +2214,14 @@ proc check_effective_target_wchar { } {
     }]
 }
 
+# Return 1 if the target has <pthread.h>.
+
+proc check_effective_target_pthread_h { } {
+    return [check_no_compiler_messages pthread_h assembly {
+       #include <pthread.h>
+    }]
+}
+
 # Add to FLAGS all the target-specific flags needed to access the c99 runtime.
 
 proc add_options_for_c99_runtime { flags } {