]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/arm/vxworks.h
Update copyright years.
[thirdparty/gcc.git] / gcc / config / arm / vxworks.h
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.
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 3, 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 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.
23
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/>. */
28
29
30 #define TARGET_OS_CPP_BUILTINS() \
31 do { \
32 if (TARGET_BIG_END) \
33 builtin_define ("ARMEB"); \
34 else \
35 builtin_define ("ARMEL"); \
36 \
37 if (arm_arch_xscale) \
38 builtin_define ("CPU=XSCALE"); \
39 else if (arm_arch5) \
40 builtin_define ("CPU=ARMARCH5"); \
41 else if (arm_arch4) \
42 { \
43 if (TARGET_THUMB) \
44 builtin_define ("CPU=ARMARCH4_T"); \
45 else \
46 builtin_define ("CPU=ARMARCH4"); \
47 } \
48 VXWORKS_OS_CPP_BUILTINS (); \
49 } while (0)
50
51 #undef SUBTARGET_OVERRIDE_OPTIONS
52 #define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS
53
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
57
58 #undef CC1_SPEC
59 #define CC1_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 ; \
71 : -march=armv4}"
72
73 /* Pass -EB for big-endian targets. */
74 #define VXWORKS_ENDIAN_SPEC \
75 "%{mbig-endian|t4be|t4tbe|t5be|t5tbe|txscalebe:-EB}"
76
77 #undef SUBTARGET_EXTRA_ASM_SPEC
78 #define SUBTARGET_EXTRA_ASM_SPEC VXWORKS_ENDIAN_SPEC
79
80 #undef LINK_SPEC
81 #define LINK_SPEC VXWORKS_LINK_SPEC " " VXWORKS_ENDIAN_SPEC
82
83 #undef LIB_SPEC
84 #define LIB_SPEC VXWORKS_LIB_SPEC
85
86 #undef STARTFILE_SPEC
87 #define STARTFILE_SPEC VXWORKS_STARTFILE_SPEC
88
89 #undef ENDFILE_SPEC
90 #define ENDFILE_SPEC VXWORKS_ENDFILE_SPEC
91
92 /* There is no default multilib. */
93 #undef MULTILIB_DEFAULTS
94
95 #define FPUTYPE_DEFAULT "vfp"
96
97 #undef FUNCTION_PROFILER
98 #define FUNCTION_PROFILER VXWORKS_FUNCTION_PROFILER
99
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
104
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
112
113 #undef TARGET_DEFAULT_WORD_RELOCATIONS
114 #define TARGET_DEFAULT_WORD_RELOCATIONS 1