From 2755c05623ee21f19a16c6d0af8d188629e26375 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 9 Feb 2007 13:51:23 +0000 Subject: [PATCH] 20030125-1.x: Return 1 for uClibc targets. gcc/testsuite/ * gcc.c-torture/execute/20030125-1.x: Return 1 for uClibc targets. * lib/target-supports.exp (check_effective_target_uclibc): New function. From-SVN: r121748 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.c-torture/execute/20030125-1.x | 5 +++-- gcc/testsuite/lib/target-supports.exp | 11 +++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5591ecb9639..1c153c324db 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2007-02-09 Richard Sandiford + + * gcc.c-torture/execute/20030125-1.x: Return 1 for uClibc targets. + * lib/target-supports.exp (check_effective_target_uclibc): New + function. + 2007-02-09 Richard Sandiford * gcc.c-torture/execute/builtins/lib/chk.c: Include . diff --git a/gcc/testsuite/gcc.c-torture/execute/20030125-1.x b/gcc/testsuite/gcc.c-torture/execute/20030125-1.x index ae66af762eb..3a5b1355613 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20030125-1.x +++ b/gcc/testsuite/gcc.c-torture/execute/20030125-1.x @@ -1,3 +1,4 @@ -# Only Linux does inlclude all c99 functions at the moment. -if { ! [istarget "*linux*"] } { return 1 } +# Only glibc includes all c99 functions at the moment. +if { ! [istarget "*-linux*"] } { return 1 } +if { [check_effective_target_uclibc] } { return 1 } return 0 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 7c4d4b58aee..7027cb5a95f 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2034,6 +2034,17 @@ proc check_effective_target_coldfire_fpu { } { }] } +# Return true if this is a uClibc target. + +proc check_effective_target_uclibc {} { + return [check_no_compiler_messages uclibc object { + #include + #if !defined (__UCLIBC__) + #error FOO + #endif + }] +} + # Return 1 if the target matches the effective target 'arg', 0 otherwise. # This can be used with any check_* proc that takes no argument and # returns only 1 or 0. It could be used with check_* procs that take