From eb587f4f71b81ae9eb0951799ce22a21773a3c3b Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 26 Feb 2008 00:11:06 +0000 Subject: [PATCH] target-supports.exp (check_effective_target_pthread_h): New. * 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. From-SVN: r132650 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.dg/pthread-init-1.c | 1 + gcc/testsuite/gcc.dg/pthread-init-2.c | 1 + gcc/testsuite/lib/target-supports.exp | 8 ++++++++ 4 files changed, 16 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 074e43621b6..db11e64a8a1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-02-25 Joseph Myers + + * 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 * gcc.dg/Wswitch-enum-error.c: New. diff --git a/gcc/testsuite/gcc.dg/pthread-init-1.c b/gcc/testsuite/gcc.dg/pthread-init-1.c index 9cf4fa3d35b..2f78844fe1f 100644 --- a/gcc/testsuite/gcc.dg/pthread-init-1.c +++ b/gcc/testsuite/gcc.dg/pthread-init-1.c @@ -5,6 +5,7 @@ */ /* { dg-do compile } */ +/* { dg-require-effective-target pthread_h } */ /* { dg-options "-Wextra -Wall" } */ #include "pthread-init-common.h" diff --git a/gcc/testsuite/gcc.dg/pthread-init-2.c b/gcc/testsuite/gcc.dg/pthread-init-2.c index 6fc427fe2eb..2e1b93aecbf 100644 --- a/gcc/testsuite/gcc.dg/pthread-init-2.c +++ b/gcc/testsuite/gcc.dg/pthread-init-2.c @@ -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 } } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ba1454eaab8..c43a37180c9 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2214,6 +2214,14 @@ proc check_effective_target_wchar { } { }] } +# Return 1 if the target has . + +proc check_effective_target_pthread_h { } { + return [check_no_compiler_messages pthread_h assembly { + #include + }] +} + # Add to FLAGS all the target-specific flags needed to access the c99 runtime. proc add_options_for_c99_runtime { flags } { -- 2.30.2