1 /* Definitions of target machine for GCC,
2 for ARM with targeting the VXWorks run time environment.
3 Copyright (C) 1999-2016 Free Software Foundation, Inc.
5 Contributed by: Mike Stump <mrs@wrs.com>
6 Brought up to date by CodeSourcery, LLC.
8 This file is part of GCC.
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 3, or (at your option)
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.
20 Under Section 7 of GPL version 3, you are granted additional
21 permissions described in the GCC Runtime Library Exception, version
22 3.1, as published by the Free Software Foundation.
24 You should have received a copy of the GNU General Public License and
25 a copy of the GCC Runtime Library Exception along with this program;
26 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
27 <http://www.gnu.org/licenses/>. */
30 #define TARGET_OS_CPP_BUILTINS() \
33 builtin_define ("ARMEB"); \
35 builtin_define ("ARMEL"); \
37 if (arm_arch_xscale) \
38 builtin_define ("CPU=XSCALE"); \
40 builtin_define ("CPU=ARMARCH5"); \
44 builtin_define ("CPU=ARMARCH4_T"); \
46 builtin_define ("CPU=ARMARCH4"); \
48 VXWORKS_OS_CPP_BUILTINS (); \
51 #undef SUBTARGET_OVERRIDE_OPTIONS
52 #define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
54 /* Subsume the arm/elf.h definition, and add RTP hooks. */
55 #undef SUBTARGET_CPP_SPEC
56 #define SUBTARGET_CPP_SPEC "-D__ELF__" VXWORKS_ADDITIONAL_CPP_SPEC
60 "%{tstrongarm:-mlittle-endian -mcpu=strongarm ; \
61 t4: -mlittle-endian -march=armv4 ; \
62 t4be: -mbig-endian -march=armv4 ; \
63 t4t: -mthumb -mthumb-interwork -mlittle-endian -march=armv4t ; \
64 t4tbe: -mthumb -mthumb-interwork -mbig-endian -march=armv4t ; \
65 t5: -mlittle-endian -march=armv5 ; \
66 t5be: -mbig-endian -march=armv5 ; \
67 t5t: -mthumb -mthumb-interwork -mlittle-endian -march=armv5 ; \
68 t5tbe: -mthumb -mthumb-interwork -mbig-endian -march=armv5 ; \
69 txscale: -mlittle-endian -mcpu=xscale ; \
70 txscalebe: -mbig-endian -mcpu=xscale ; \
73 /* Pass -EB for big-endian targets. */
74 #define VXWORKS_ENDIAN_SPEC \
75 "%{mbig-endian|t4be|t4tbe|t5be|t5tbe|txscalebe:-EB}"
77 #undef SUBTARGET_EXTRA_ASM_SPEC
78 #define SUBTARGET_EXTRA_ASM_SPEC VXWORKS_ENDIAN_SPEC
81 #define LINK_SPEC VXWORKS_LINK_SPEC " " VXWORKS_ENDIAN_SPEC
84 #define LIB_SPEC VXWORKS_LIB_SPEC
87 #define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC
90 #define ENDFILE_SPEC VXWORKS_ENDFILE_SPEC
92 /* There is no default multilib. */
93 #undef MULTILIB_DEFAULTS
95 #define FPUTYPE_DEFAULT "vfp"
97 #undef FUNCTION_PROFILER
98 #define FUNCTION_PROFILER VXWORKS_FUNCTION_PROFILER
100 /* We want to be compatible with a version of "2.96" at one point in
101 the past before this macro was changed. */
102 #undef DEFAULT_STRUCTURE_SIZE_BOUNDARY
103 #define DEFAULT_STRUCTURE_SIZE_BOUNDARY 8
105 /* The kernel loader does not allow relocations to overflow, so we
106 cannot allow arbitrary relocation addends in kernel modules or RTP
107 executables. Also, the dynamic loader uses the resolved relocation
108 value to distinguish references to the text and data segments, so we
109 cannot allow arbitrary offsets for shared libraries either. */
110 #undef ARM_OFFSETS_MUST_BE_WITHIN_SECTIONS_P
111 #define ARM_OFFSETS_MUST_BE_WITHIN_SECTIONS_P 1
113 #undef TARGET_DEFAULT_WORD_RELOCATIONS
114 #define TARGET_DEFAULT_WORD_RELOCATIONS 1
116 /* Define this to be nonzero if static stack checking is supported. */
117 #define STACK_CHECK_STATIC_BUILTIN 1
119 /* This platform supports the probing method of stack checking (RTP mode).
120 8K is reserved in the stack to propagate exceptions in case of overflow. */
121 #define STACK_CHECK_PROTECT 8192