]>
Commit | Line | Data |
---|---|---|
2eab15c9 | 1 | /* Target-independent configuration for VxWorks and VxWorks AE. |
aeee4812 | 2 | Copyright (C) 2005-2023 Free Software Foundation, Inc. |
f46ff798 | 3 | Contributed by CodeSourcery, LLC. |
2eab15c9 PE |
4 | |
5 | This file is part of GCC. | |
6 | ||
7 | GCC is free software; you can redistribute it and/or modify it under | |
8 | the terms of the GNU General Public License as published by the Free | |
2f83c7d6 | 9 | Software Foundation; either version 3, or (at your option) any later |
2eab15c9 PE |
10 | version. |
11 | ||
12 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
13 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 | for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
2f83c7d6 NC |
18 | along with GCC; see the file COPYING3. If not see |
19 | <http://www.gnu.org/licenses/>. */ | |
2eab15c9 | 20 | |
4e6bcaa6 OH |
21 | /* ------------------------- Common SPEC strings ------------------------- */ |
22 | ||
2eab15c9 PE |
23 | /* Most of these will probably be overridden by subsequent headers. We |
24 | undefine them here just in case, and define VXWORKS_ versions of each, | |
25 | to be used in port-specific vxworks.h. */ | |
0515c95d FK |
26 | |
27 | /* REAL_LIBGCC_SPEC needs to be used since the non-static option is not | |
e53b6e56 | 28 | handled in gcc.cc. */ |
0515c95d FK |
29 | #undef REAL_LIBGCC_SPEC |
30 | #define REAL_LIBGCC_SPEC VXWORKS_LIBGCC_SPEC | |
2eab15c9 PE |
31 | #undef STARTFILE_SPEC |
32 | #undef ENDFILE_SPEC | |
33 | ||
34 | /* Most of these macros are overridden in "config/vxworks.h" or | |
35 | "config/vxworksae.h" and are here merely for documentation | |
36 | purposes. */ | |
37 | #define VXWORKS_ADDITIONAL_CPP_SPEC "" | |
38 | #define VXWORKS_LIB_SPEC "" | |
39 | #define VXWORKS_LINK_SPEC "" | |
40 | #define VXWORKS_LIBGCC_SPEC "" | |
41 | #define VXWORKS_STARTFILE_SPEC "" | |
42 | #define VXWORKS_ENDFILE_SPEC "" | |
ebcdba9c | 43 | #define VXWORKS_CC1_SPEC "" |
2eab15c9 | 44 | |
4e6bcaa6 | 45 | /* ----------------------- Common type descriptions ----------------------- */ |
2eab15c9 | 46 | |
1361ae0e AO |
47 | /* Regardless of the target architecture, VxWorks uses a signed 32bit |
48 | integer for wchar_t starting with vx7 SR06xx. An unsigned short | |
49 | otherwise. */ | |
50 | #if TARGET_VXWORKS7 | |
51 | ||
52 | #undef WCHAR_TYPE_SIZE | |
53 | #define WCHAR_TYPE_SIZE 32 | |
2eab15c9 | 54 | #undef WCHAR_TYPE |
1361ae0e AO |
55 | #define WCHAR_TYPE (TARGET_VXWORKS64 ? "int" : "long int") |
56 | ||
57 | #else | |
58 | ||
2eab15c9 PE |
59 | #undef WCHAR_TYPE_SIZE |
60 | #define WCHAR_TYPE_SIZE 16 | |
1361ae0e AO |
61 | #undef WCHAR_TYPE |
62 | #define WCHAR_TYPE "short unsigned int" | |
2eab15c9 | 63 | |
1361ae0e AO |
64 | #endif |
65 | ||
66 | /* The VxWorks headers base wint_t on the definitions used for wchar_t. | |
67 | Do the same here to make sure they remain in sync, in case WCHAR_TYPE | |
68 | gets redefined for a specific CPU architecture. */ | |
d95d45fd | 69 | #undef WINT_TYPE_SIZE |
1361ae0e AO |
70 | #define WINT_TYPE_SIZE WCHAR_TYPE_SIZE |
71 | #undef WINT_TYPE | |
72 | #define WINT_TYPE WCHAR_TYPE | |
d95d45fd | 73 | |
4e6bcaa6 OH |
74 | /* ---------------------- Debug and unwind info formats ------------------ */ |
75 | ||
78e49fb1 | 76 | /* Dwarf2 unwind info is supported, unless overriden by a request for a target |
2813f529 OH |
77 | specific format. Always #define DWARF2_UNWIND_INFO to prevent defaults.h |
78 | from picking a possibly different value. | |
78e49fb1 JL |
79 | |
80 | Taking care of this here allows using DWARF2_UNWIND_INFO in #if conditions | |
81 | from the common config/vxworks.h files, included before the cpu | |
82 | specializations. Unlike with conditions used in C expressions, where the | |
83 | definitions which matter are those at the expression expansion point, use | |
84 | in #if constructs requires an accurate definition of the operands at the | |
85 | #if point. Since <cpu>/vxworks.h. is typically included after | |
86 | config/vxworks.h, #if expressions in the latter can't rely on possible | |
87 | redefinitions in the former. */ | |
9403b7f7 | 88 | #undef DWARF2_UNWIND_INFO |
2813f529 OH |
89 | #if ARM_UNWIND_INFO |
90 | #define DWARF2_UNWIND_INFO 0 | |
91 | #else | |
a9945ae2 | 92 | #define DWARF2_UNWIND_INFO 1 |
78e49fb1 | 93 | #endif |
2eab15c9 | 94 | |
ebcdba9c | 95 | /* VxWorks uses DWARF2 debugging info. */ |
2eab15c9 PE |
96 | #define DWARF2_DEBUGGING_INFO 1 |
97 | #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG | |
98 | ||
99 | /* None of these other formats is supported. */ | |
2eab15c9 PE |
100 | #undef VMS_DEBUGGING_INFO |
101 | ||
4e6bcaa6 OH |
102 | /* ------------------------ Misc configuration bits ---------------------- */ |
103 | ||
44d0243a | 104 | #if !TARGET_VXWORKS7 |
aca124df AO |
105 | /* VxWorks, prior to version 7, could not have dots in constructor |
106 | labels, because it used a mutant variation of collect2 that | |
107 | generates C code instead of assembly. Thus each constructor label | |
108 | had to be a legitimate C symbol. */ | |
109 | # undef NO_DOLLAR_IN_LABEL | |
110 | # define NO_DOT_IN_LABEL | |
111 | #endif | |
4e6bcaa6 | 112 | |
2eab15c9 PE |
113 | /* Kernel mode doesn't have ctors/dtors, but RTP mode does. */ |
114 | #define TARGET_HAVE_CTORS_DTORS false | |
115 | #define VXWORKS_OVERRIDE_OPTIONS /* empty */ | |
116 | ||
117 | /* No math library needed. */ | |
118 | #define MATH_LIBRARY "" | |
119 | ||
120 | /* No profiling. */ | |
121 | #define VXWORKS_FUNCTION_PROFILER(FILE, LABELNO) do \ | |
122 | { \ | |
123 | sorry ("profiler support for VxWorks"); \ | |
124 | } while (0) | |
125 | ||
2eab15c9 PE |
126 | /* We occasionally need to distinguish between the VxWorks variants. */ |
127 | #define VXWORKS_KIND_NORMAL 1 | |
128 | #define VXWORKS_KIND_AE 2 |