From 56fca24ad8c6433a6146128fd2c2eb64b4f0a1e5 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 12 Mar 2007 10:44:52 +0000 Subject: [PATCH] target-supports.exp (check_profiling_available): Return false for VxWorks. gcc/testsuite/ * lib/target-supports.exp (check_profiling_available): Return false for VxWorks. (check_effective_target_vxworks_kernel): New procedure. * gcc.dg/20040813-1.c: Extend list of stabless targets to include VxWorks. * gcc.dg/builtins-config.h: Do not define HAVE_C99_RUNTIME on VxWorks. * gcc.dg/intmax_t-1.c: Extend the list of targets without inttypes.h to include VxWorks. * gcc.dg/vxworks/initpri2.c: Require vxworks_kernel. From-SVN: r122838 --- gcc/testsuite/ChangeLog | 12 ++++++++++++ gcc/testsuite/gcc.dg/20040813-1.c | 2 +- gcc/testsuite/gcc.dg/builtins-config.h | 2 ++ gcc/testsuite/gcc.dg/intmax_t-1.c | 2 +- gcc/testsuite/gcc.dg/vxworks/initpri2.c | 2 +- gcc/testsuite/lib/target-supports.exp | 11 +++++++++++ 6 files changed, 28 insertions(+), 3 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 31bfa32..2c3f7d8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,17 @@ 2007-03-12 Richard Sandiford + * lib/target-supports.exp (check_profiling_available): Return false + for VxWorks. + (check_effective_target_vxworks_kernel): New procedure. + * gcc.dg/20040813-1.c: Extend list of stabless targets to include + VxWorks. + * gcc.dg/builtins-config.h: Do not define HAVE_C99_RUNTIME on VxWorks. + * gcc.dg/intmax_t-1.c: Extend the list of targets without inttypes.h + to include VxWorks. + * gcc.dg/vxworks/initpri2.c: Require vxworks_kernel. + +2007-03-12 Richard Sandiford + * gcc.c-torture/compile/981006-1.c: Use the non-PIC options if PIC is not supported. * gcc.dg/20020103-1.c: Add dg-require-effective-target fpic. diff --git a/gcc/testsuite/gcc.dg/20040813-1.c b/gcc/testsuite/gcc.dg/20040813-1.c index a983886..df36058 100644 --- a/gcc/testsuite/gcc.dg/20040813-1.c +++ b/gcc/testsuite/gcc.dg/20040813-1.c @@ -2,7 +2,7 @@ /* Contributed by Devang Patel */ /* { dg-do compile } */ -/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* *-*-netware* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-sysv5* } { "*" } { "" } } */ +/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* *-*-netware* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-sysv5* *-*-vxworks* } { "*" } { "" } } */ /* { dg-options "-gstabs" } */ int diff --git a/gcc/testsuite/gcc.dg/builtins-config.h b/gcc/testsuite/gcc.dg/builtins-config.h index e61d02a..060db4f 100644 --- a/gcc/testsuite/gcc.dg/builtins-config.h +++ b/gcc/testsuite/gcc.dg/builtins-config.h @@ -17,6 +17,8 @@ /* FreeBSD before version 5 doesn't have the entire C99 runtime. */ #elif defined(__netware__) /* NetWare doesn't have the entire C99 runtime. */ +#elif defined(__vxworks) +/* VxWorks doesn't have a full C99 time. (cabs is missing, for example.) */ #elif (defined(__APPLE__) && defined(__ppc__) \ && ! defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)) /* MacOS versions before 10.3 don't have many C99 functions. diff --git a/gcc/testsuite/gcc.dg/intmax_t-1.c b/gcc/testsuite/gcc.dg/intmax_t-1.c index 8089340..8357aa9 100644 --- a/gcc/testsuite/gcc.dg/intmax_t-1.c +++ b/gcc/testsuite/gcc.dg/intmax_t-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-Wall" } */ -/* { dg-error "" "" { target *-*-solaris2.5.1 *arm*-*-*elf* xscale*-*-elf* xtensa-*-elf* } 0 } */ +/* { dg-error "" "" { target *-*-solaris2.5.1 *arm*-*-*elf* xscale*-*-elf* xtensa-*-elf* *-*-vxworks* } 0 } */ /* Compile with -Wall to get a warning if built-in and system intmax_t don't match. */ diff --git a/gcc/testsuite/gcc.dg/vxworks/initpri2.c b/gcc/testsuite/gcc.dg/vxworks/initpri2.c index a2b2c77..7f483ef 100644 --- a/gcc/testsuite/gcc.dg/vxworks/initpri2.c +++ b/gcc/testsuite/gcc.dg/vxworks/initpri2.c @@ -1,7 +1,7 @@ /* On VxWorks, in kernel mode, there is no support for .ctors/.dtors. Instead, initialization is handled by munch. */ -/* { dg-do compile { target *-*-vxworks* } } */ +/* { dg-do compile { target vxworks_kernel } } */ /* { dg-final { scan-assembler-not "\.ctors" } } */ /* { dg-final { scan-assembler-not "\.dtors" } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 51a3258..e8efd58 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -350,6 +350,7 @@ proc check_profiling_available { test_what } { || [istarget m68k-*-elf] || [istarget mips*-*-elf] || [istarget xtensa-*-elf] + || [istarget *-*-vxworks*] || [istarget *-*-windiss] } { set profiling_available_saved 0 } else { @@ -2186,3 +2187,13 @@ proc check_effective_target_simulator { } { return 0 } + +# Return 1 if the target is a VxWorks RTP. + +proc check_effective_target_vxworks_kernel { } { + return [check_no_compiler_messages vxworks_kernel assembly { + #if !defined __vxworks || defined __RTP__ + #error NO + #endif + }] +} -- 2.7.4