]>
Commit | Line | Data |
---|---|---|
0b85d816 | 1 | /* Definitions for GCC. Part of the machine description for CRIS. |
7bd85ce0 | 2 | Copyright (C) 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc. |
0b85d816 HPN |
3 | Contributed by Axis Communications. Written by Hans-Peter Nilsson. |
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 2, 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 COPYING. If not, write to | |
39d14dda KC |
19 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
20 | Boston, MA 02110-1301, USA. */ | |
0b85d816 HPN |
21 | |
22 | ||
23 | /* After the first "Node:" comment comes all preprocessor directives and | |
24 | attached declarations described in the info files, the "Using and | |
25 | Porting GCC" manual (uapgcc), in the same order as found in the "Target | |
26 | macros" section in the gcc-2.9x CVS edition of 2000-03-17. FIXME: Not | |
27 | really, but needs an update anyway. | |
28 | ||
29 | There is no generic copy-of-uapgcc comment, you'll have to see uapgcc | |
30 | for that. If applicable, there is a CRIS-specific comment. The order | |
31 | of macro definitions follow the order in the manual. Every section in | |
32 | the manual (node in the info pages) has an introductory `Node: | |
33 | <subchapter>' comment. If no macros are defined for a section, only | |
34 | the section-comment is present. */ | |
35 | ||
36 | /* This file defines the macros for cris-axis-linux-gnu that are not | |
37 | covered by cris.h, elfos.h and (config/)linux.h. */ | |
38 | ||
39 | ||
40 | /* Node: Instruction Output */ | |
41 | ||
42 | #undef USER_LABEL_PREFIX | |
43 | #define USER_LABEL_PREFIX "" | |
44 | ||
45 | /* Node: Driver */ | |
46 | /* These macros are CRIS-specific, but used in target driver macros. */ | |
47 | ||
48 | #undef CRIS_CPP_SUBTARGET_SPEC | |
49 | #define CRIS_CPP_SUBTARGET_SPEC \ | |
a6e464ae | 50 | "%{pthread:-D_REENTRANT}\ |
26b0ad13 | 51 | %{!march=*:%{!cpu=*:-D__arch_v10 -D__CRIS_arch_version=10}}" |
0b85d816 HPN |
52 | |
53 | #undef CRIS_CC1_SUBTARGET_SPEC | |
54 | #define CRIS_CC1_SUBTARGET_SPEC \ | |
55 | "%{!march=*:%{!cpu=*:-march=v10}}" | |
56 | ||
57 | #undef CRIS_ASM_SUBTARGET_SPEC | |
58 | #define CRIS_ASM_SUBTARGET_SPEC \ | |
59 | "--em=criself\ | |
60 | %{!fleading-underscore:--no-underscore}\ | |
24a4dd31 | 61 | %{fPIC|fpic|fPIE|fpie: --pic}" |
0b85d816 | 62 | |
2a186d97 HPN |
63 | /* Previously controlled by target_flags. */ |
64 | #undef TARGET_LINUX | |
65 | #define TARGET_LINUX 1 | |
0b85d816 HPN |
66 | |
67 | #undef CRIS_SUBTARGET_DEFAULT | |
68 | #define CRIS_SUBTARGET_DEFAULT \ | |
2a186d97 HPN |
69 | (MASK_SVINTO \ |
70 | + MASK_ETRAX4_ADD \ | |
71 | + MASK_ALIGN_BY_32) | |
0b85d816 HPN |
72 | |
73 | #undef CRIS_DEFAULT_CPU_VERSION | |
74 | #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG | |
75 | ||
76 | #undef CRIS_SUBTARGET_VERSION | |
77 | #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" | |
78 | ||
7bd85ce0 JM |
79 | #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" |
80 | ||
0b85d816 HPN |
81 | /* We need an -rpath-link to ld.so.1, and presumably to each directory |
82 | specified with -B. */ | |
83 | #undef CRIS_LINK_SUBTARGET_SPEC | |
84 | #define CRIS_LINK_SUBTARGET_SPEC \ | |
85 | "-mcrislinux\ | |
86 | -rpath-link include/asm/../..%s\ | |
87 | %{shared} %{static}\ | |
88 | %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\ | |
7bd85ce0 JM |
89 | %{!shared:%{!static:\ |
90 | %{rdynamic:-export-dynamic}\ | |
91 | %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}\ | |
349ccf2e | 92 | %{!r:%{O2|O3: --gc-sections}}" |
0b85d816 | 93 | |
0b85d816 | 94 | |
a6e464ae HPN |
95 | /* Node: Run-time Target */ |
96 | ||
97 | /* For the cris-*-linux* subtarget. */ | |
98 | #undef TARGET_OS_CPP_BUILTINS | |
99 | #define TARGET_OS_CPP_BUILTINS() \ | |
100 | do \ | |
101 | { \ | |
26b0ad13 | 102 | LINUX_TARGET_OS_CPP_BUILTINS(); \ |
a6e464ae HPN |
103 | if (flag_leading_underscore <= 0) \ |
104 | builtin_define ("__NO_UNDERSCORES__"); \ | |
105 | } \ | |
106 | while (0) | |
107 | ||
108 | ||
0b85d816 HPN |
109 | /* Node: Sections */ |
110 | ||
111 | /* GNU/Linux has crti and crtn and does not need the | |
cea3bd3e RH |
112 | CRT_CALL_STATIC_FUNCTION trick in cris.h. */ |
113 | #undef CRT_CALL_STATIC_FUNCTION | |
0b85d816 HPN |
114 | |
115 | /* | |
116 | * Local variables: | |
117 | * eval: (c-set-style "gnu") | |
118 | * indent-tabs-mode: t | |
119 | * End: | |
120 | */ |