OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / config / arm / vxworks.h
1 /* Definitions of target machine for GCC,
2    for ARM with targetting the VXWorks run time environment. 
3    Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
4
5    Contributed by: Mike Stump <mrs@wrs.com>
6    Brought up to date by CodeSourcery, LLC.
7    
8 This file is part of GCC.
9
10 GCC is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
13 any later version.
14
15 GCC is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with GCC; see the file COPYING.  If not, write to
22 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
23 Boston, MA 02110-1301, USA.  */
24
25
26 #define TARGET_OS_CPP_BUILTINS()                \
27   do {                                          \
28     if (TARGET_BIG_END)                         \
29       builtin_define ("ARMEB");                 \
30     else                                        \
31       builtin_define ("ARMEL");                 \
32                                                 \
33     if (arm_arch_xscale)                        \
34       builtin_define ("CPU=XSCALE");            \
35     else if (arm_arch5)                         \
36       builtin_define ("CPU=ARMARCH5");          \
37     else if (arm_arch4)                         \
38       {                                         \
39         if (thumb_code)                         \
40           builtin_define ("CPU=ARMARCH4_T");    \
41         else                                    \
42           builtin_define ("CPU=ARMARCH4");      \
43       }                                         \
44     VXWORKS_OS_CPP_BUILTINS ();                 \
45   } while (0)
46
47 #undef OVERRIDE_OPTIONS
48 #define OVERRIDE_OPTIONS                        \
49   do                                            \
50     {                                           \
51       VXWORKS_OVERRIDE_OPTIONS;                 \
52       arm_override_options ();                  \
53     }                                           \
54   while (0)
55
56 /* Subsume the arm/elf.h definition, and add RTP hooks.  */
57 #undef SUBTARGET_CPP_SPEC
58 #define SUBTARGET_CPP_SPEC "-D__ELF__" VXWORKS_ADDITIONAL_CPP_SPEC
59
60 #undef  CC1_SPEC
61 #define CC1_SPEC                                                        \
62 "%{tstrongarm:-mlittle-endian -mcpu=strongarm ;                         \
63    t4:        -mlittle-endian -march=armv4 ;                            \
64    t4be:      -mbig-endian -march=armv4 ;                               \
65    t4t:       -mthumb -mthumb-interwork -mlittle-endian -march=armv4t ; \
66    t4tbe:     -mthumb -mthumb-interwork -mbig-endian -march=armv4t ;    \
67    t5:        -mlittle-endian -march=armv5 ;                            \
68    t5be:      -mbig-endian -march=armv5 ;                               \
69    t5t:       -mthumb -mthumb-interwork -mlittle-endian -march=armv5 ;  \
70    t5tbe:     -mthumb -mthumb-interwork -mbig-endian -march=armv5 ;     \
71    txscale:   -mlittle-endian -mcpu=xscale ;                            \
72    txscalebe: -mbig-endian -mcpu=xscale ;                               \
73             : -march=armv4}"
74
75 /* Pass -EB for big-endian targets.  */
76 #define VXWORKS_ENDIAN_SPEC \
77   "%{mbig-endian|t4be|t4tbe|t5be|t5tbe|txscalebe:-EB}"
78
79 /* The -Q options from svr4.h aren't understood and must be removed.  */
80 #undef  ASM_SPEC
81 #define ASM_SPEC \
82   "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} " VXWORKS_ENDIAN_SPEC
83
84 #undef LINK_SPEC
85 #define LINK_SPEC VXWORKS_LINK_SPEC " " VXWORKS_ENDIAN_SPEC
86
87 #undef LIB_SPEC
88 #define LIB_SPEC VXWORKS_LIB_SPEC
89
90 #undef STARTFILE_SPEC
91 #define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC
92
93 #undef ENDFILE_SPEC
94 #define ENDFILE_SPEC VXWORKS_ENDFILE_SPEC
95
96 #undef TARGET_VERSION
97 #define TARGET_VERSION fputs (" (ARM/VxWorks)", stderr);
98
99 /* There is no default multilib.  */
100 #undef MULTILIB_DEFAULTS
101
102 #define FPUTYPE_DEFAULT FPUTYPE_VFP
103
104 #undef FUNCTION_PROFILER
105 #define FUNCTION_PROFILER VXWORKS_FUNCTION_PROFILER
106
107 /* We want to be compatible with a version of "2.96" at one point in
108    the past before this macro was changed.  */
109 #undef DEFAULT_STRUCTURE_SIZE_BOUNDARY
110 #define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8