xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/config/i386/vxworks.h (revision 413d532bcc3f62d122e56d92e13ac64825a40baf)
1 /* IA32 VxWorks target definitions for GNU compiler.
2    Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
3    Updated by CodeSourcery, LLC.
4 
5 This file is part of GCC.
6 
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
11 
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3.  If not see
19 <http://www.gnu.org/licenses/>.  */
20 
21 #define HANDLE_SYSV_PRAGMA 1
22 
23 #undef  TARGET_VERSION
24 #define TARGET_VERSION fprintf (stderr, " (80586, VxWorks syntax)");
25 
26 #undef  ASM_SPEC
27 #define ASM_SPEC "%{v:-v} %{Qy:} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
28 
29 #define TARGET_OS_CPP_BUILTINS()			\
30   do							\
31     {							\
32       VXWORKS_OS_CPP_BUILTINS ();			\
33       if (TARGET_386)					\
34         builtin_define ("CPU=I80386");			\
35       else if (TARGET_486)				\
36         builtin_define ("CPU=I80486");			\
37       else if (TARGET_PENTIUM)				\
38         {						\
39           builtin_define ("CPU=PENTIUM");		\
40           builtin_define ("CPU_VARIANT=PENTIUM");	\
41         }						\
42       else if (TARGET_PENTIUMPRO)			\
43         {						\
44           builtin_define ("CPU=PENTIUM2");		\
45           builtin_define ("CPU_VARIANT=PENTIUMPRO");	\
46         }						\
47       else if (TARGET_PENTIUM4)				\
48         {						\
49           builtin_define ("CPU=PENTIUM4");		\
50           builtin_define ("CPU_VARIANT=PENTIUM4");	\
51         }						\
52     }							\
53   while (0)
54 
55 #undef  CPP_SPEC
56 #define CPP_SPEC VXWORKS_ADDITIONAL_CPP_SPEC
57 #undef  LIB_SPEC
58 #define LIB_SPEC VXWORKS_LIB_SPEC
59 #undef  STARTFILE_SPEC
60 #define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC
61 #undef  ENDFILE_SPEC
62 #define ENDFILE_SPEC VXWORKS_ENDFILE_SPEC
63 #undef  LINK_SPEC
64 #define LINK_SPEC VXWORKS_LINK_SPEC
65 
66 #undef  SUBTARGET_SWITCHES
67 #define SUBTARGET_SWITCHES EXTRA_SUBTARGET_SWITCHES
68 
69 #undef SUBTARGET_OVERRIDE_OPTIONS
70 #define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
71 
72 /* No _mcount profiling on VxWorks.  */
73 #undef FUNCTION_PROFILER
74 #define FUNCTION_PROFILER(FILE,LABELNO) VXWORKS_FUNCTION_PROFILER(FILE,LABELNO)
75 
76 /* We cannot use PC-relative accesses for VxWorks PIC because there is no
77    fixed gap between segments.  */
78 #undef ASM_PREFERRED_EH_DATA_FORMAT
79