This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[VxWorks] Various testsuite patches
- From: Richard Sandiford <richard at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: nathan at codesourcery dot com
- Date: Mon, 12 Mar 2007 09:15:23 +0000
- Subject: [VxWorks] Various testsuite patches
This patch fixes a few spurious failures in the test results for
i586-wrs-vxworks. Specifically:
- The VxWorks port doesn't support profiilng. From config/vx-common.h:
#define VXWORKS_FUNCTION_PROFILER(FILE, LABELNO) do \
{ \
sorry ("profiler support for VxWorks"); \
} while (0)
- VxWorks doesn't support stabs.
- VxWorks doesn't have a full C99 runtime.
- VxWorks doesn't have inttypes.h.
- vxworks/initpri2.c is specifically for kernel mode. I've added a new
effective-target procedure to test for that.
Tested on i586-wrs-vxworks. OK to install?
Richard
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 list of targets with inttypes.h to
include VxWorks.
* gcc.dg/vxworks/initpri2.c: Require vxworks_kernel.
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp (revision 122834)
+++ gcc/testsuite/lib/target-supports.exp (working copy)
@@ -350,6 +350,7 @@ proc check_profiling_available { test_wh
|| [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
+ }]
+}
Index: gcc/testsuite/gcc.dg/20040813-1.c
===================================================================
--- gcc/testsuite/gcc.dg/20040813-1.c (revision 122834)
+++ gcc/testsuite/gcc.dg/20040813-1.c (working copy)
@@ -2,7 +2,7 @@
/* Contributed by Devang Patel <dpatel@apple.com> */
/* { 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
Index: gcc/testsuite/gcc.dg/builtins-config.h
===================================================================
--- gcc/testsuite/gcc.dg/builtins-config.h (revision 122834)
+++ gcc/testsuite/gcc.dg/builtins-config.h (working copy)
@@ -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.
Index: gcc/testsuite/gcc.dg/intmax_t-1.c
===================================================================
--- gcc/testsuite/gcc.dg/intmax_t-1.c (revision 122834)
+++ gcc/testsuite/gcc.dg/intmax_t-1.c (working copy)
@@ -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. */
Index: gcc/testsuite/gcc.dg/vxworks/initpri2.c
===================================================================
--- gcc/testsuite/gcc.dg/vxworks/initpri2.c (revision 122834)
+++ gcc/testsuite/gcc.dg/vxworks/initpri2.c (working copy)
@@ -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" } } */