OSDN Git Service

gcc/testsuite/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Feb 2007 13:51:23 +0000 (13:51 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Feb 2007 13:51:23 +0000 (13:51 +0000)
* gcc.c-torture/execute/20030125-1.x: Return 1 for uClibc targets.
* lib/target-supports.exp (check_effective_target_uclibc): New
function.

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

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/20030125-1.x
gcc/testsuite/lib/target-supports.exp

index 5591ecb..1c153c3 100644 (file)
@@ -1,5 +1,11 @@
 2007-02-09  Richard Sandiford  <richard@codesourcery.com>
 
+       * 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  <richard@codesourcery.com>
+
        * gcc.c-torture/execute/builtins/lib/chk.c: Include <sys/types.h>.
        (vsnprintf): Don't define for uClibc targets.
 
index ae66af7..3a5b135 100644 (file)
@@ -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
index 7c4d4b5..7027cb5 100644 (file)
@@ -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 <features.h>
+       #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