Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/sparc/linux64.h @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | 77e2b8dfacca |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
1 /* Definitions for 64-bit SPARC running Linux-based GNU systems with ELF. | 1 /* Definitions for 64-bit SPARC running Linux-based GNU systems with ELF. |
2 Copyright 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, | 2 Copyright 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2005, 2006, 2007, 2008, |
3 2009 Free Software Foundation, Inc. | 3 2009, 2010, 2011 Free Software Foundation, Inc. |
4 Contributed by David S. Miller (davem@caip.rutgers.edu) | 4 Contributed by David S. Miller (davem@caip.rutgers.edu) |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
8 GCC is free software; you can redistribute it and/or modify | 8 GCC is free software; you can redistribute it and/or modify |
94 " | 94 " |
95 | 95 |
96 /* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support | 96 /* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support |
97 for the special GCC options -static and -shared, which allow us to | 97 for the special GCC options -static and -shared, which allow us to |
98 link things in one of these three modes by applying the appropriate | 98 link things in one of these three modes by applying the appropriate |
99 combinations of options at link-time. We like to support here for | 99 combinations of options at link-time. |
100 as many of the other GNU linker options as possible. But I don't | |
101 have the time to search for those flags. I am sure how to add | |
102 support for -soname shared_object_name. H.J. | |
103 | |
104 I took out %{v:%{!V:-V}}. It is too much :-(. They can use | |
105 -Wl,-V. | |
106 | 100 |
107 When the -shared link option is used a final link is not being | 101 When the -shared link option is used a final link is not being |
108 done. */ | 102 done. */ |
109 | |
110 /* If ELF is the default format, we should not use /lib/elf. */ | |
111 | 103 |
112 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" | 104 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" |
113 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" | 105 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2" |
114 | 106 |
115 #ifdef SPARC_BI_ARCH | 107 #ifdef SPARC_BI_ARCH |
121 { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ | 113 { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ |
122 { "link_arch", LINK_ARCH_SPEC }, | 114 { "link_arch", LINK_ARCH_SPEC }, |
123 | 115 |
124 #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,%R/usr/lib %{shared:-shared} \ | 116 #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,%R/usr/lib %{shared:-shared} \ |
125 %{!shared: \ | 117 %{!shared: \ |
126 %{!ibcs: \ | 118 %{!static: \ |
127 %{!static: \ | 119 %{rdynamic:-export-dynamic} \ |
128 %{rdynamic:-export-dynamic} \ | 120 -dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \ |
129 %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \ | 121 %{static:-static}} \ |
130 %{static:-static}}} \ | |
131 " | 122 " |
132 | 123 |
133 #define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ | 124 #define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ |
134 %{!shared: \ | 125 %{!shared: \ |
135 %{!ibcs: \ | 126 %{!static: \ |
136 %{!static: \ | 127 %{rdynamic:-export-dynamic} \ |
137 %{rdynamic:-export-dynamic} \ | 128 -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ |
138 %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}} \ | 129 %{static:-static}} \ |
139 %{static:-static}}} \ | |
140 " | 130 " |
141 | 131 |
142 #define LINK_ARCH_SPEC "\ | 132 #define LINK_ARCH_SPEC "\ |
143 %{m32:%(link_arch32)} \ | 133 %{m32:%(link_arch32)} \ |
144 %{m64:%(link_arch64)} \ | 134 %{m64:%(link_arch64)} \ |
156 " | 146 " |
157 | 147 |
158 #undef CC1_SPEC | 148 #undef CC1_SPEC |
159 #if DEFAULT_ARCH32_P | 149 #if DEFAULT_ARCH32_P |
160 #define CC1_SPEC "%{profile:-p} \ | 150 #define CC1_SPEC "%{profile:-p} \ |
161 %{sun4:} %{target:} \ | |
162 %{mcypress:-mcpu=cypress} \ | |
163 %{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \ | |
164 %{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \ | |
165 %{m32:%{m64:%emay not use both -m32 and -m64}} \ | 151 %{m32:%{m64:%emay not use both -m32 and -m64}} \ |
166 %{m64:-mptr64 -mstack-bias -mlong-double-128 \ | 152 %{m64:-mptr64 -mstack-bias -mlong-double-128 \ |
167 %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=ultrasparc}}}}}}} \ | 153 %{!mcpu*:-mcpu=ultrasparc} \ |
168 %{!mno-vis:%{!mcpu=v9:-mvis}}} \ | 154 %{!mno-vis:%{!mcpu=v9:-mvis}}} \ |
169 " | 155 " |
170 #else | 156 #else |
171 #define CC1_SPEC "%{profile:-p} \ | 157 #define CC1_SPEC "%{profile:-p} \ |
172 %{sun4:} %{target:} \ | |
173 %{mcypress:-mcpu=cypress} \ | |
174 %{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \ | |
175 %{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \ | |
176 %{m32:%{m64:%emay not use both -m32 and -m64}} \ | 158 %{m32:%{m64:%emay not use both -m32 and -m64}} \ |
177 %{m32:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \ | 159 %{m32:-mptr32 -mno-stack-bias %{!mlong-double-128:-mlong-double-64} \ |
178 %{!mcpu*:%{!mcypress:%{!msparclite:%{!mf930:%{!mf934:%{!mv8:%{!msupersparc:-mcpu=cypress}}}}}}}} \ | 160 %{!mcpu*:-mcpu=cypress}} \ |
179 %{!m32:%{!mcpu*:-mcpu=ultrasparc}} \ | 161 %{!m32:%{!mcpu*:-mcpu=ultrasparc}} \ |
180 %{!mno-vis:%{!m32:%{!mcpu=v9:-mvis}}} \ | 162 %{!mno-vis:%{!m32:%{!mcpu=v9:-mvis}}} \ |
181 " | 163 " |
182 #endif | 164 #endif |
183 | 165 |
192 #undef OPTION_DEFAULT_SPECS | 174 #undef OPTION_DEFAULT_SPECS |
193 #if DEFAULT_ARCH32_P | 175 #if DEFAULT_ARCH32_P |
194 #define OPTION_DEFAULT_SPECS \ | 176 #define OPTION_DEFAULT_SPECS \ |
195 {"cpu", "%{!m64:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \ | 177 {"cpu", "%{!m64:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \ |
196 {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \ | 178 {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \ |
197 {"float", "%{!msoft-float:%{!mhard-float:%{!fpu:%{!no-fpu:-m%(VALUE)-float}}}}" } | 179 {"float", "%{!msoft-float:%{!mhard-float:%{!mfpu:%{!mno-fpu:-m%(VALUE)-float}}}}" } |
198 #else | 180 #else |
199 #define OPTION_DEFAULT_SPECS \ | 181 #define OPTION_DEFAULT_SPECS \ |
200 {"cpu", "%{!m32:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \ | 182 {"cpu", "%{!m32:%{!mcpu=*:-mcpu=%(VALUE)}}" }, \ |
201 {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \ | 183 {"tune", "%{!mtune=*:-mtune=%(VALUE)}" }, \ |
202 {"float", "%{!msoft-float:%{!mhard-float:%{!fpu:%{!no-fpu:-m%(VALUE)-float}}}}" } | 184 {"float", "%{!msoft-float:%{!mhard-float:%{!mfpu:%{!mno-fpu:-m%(VALUE)-float}}}}" } |
203 #endif | 185 #endif |
204 | 186 |
205 #if DEFAULT_ARCH32_P | 187 #if DEFAULT_ARCH32_P |
206 #define MULTILIB_DEFAULTS { "m32" } | 188 #define MULTILIB_DEFAULTS { "m32" } |
207 #else | 189 #else |
211 #else /* !SPARC_BI_ARCH */ | 193 #else /* !SPARC_BI_ARCH */ |
212 | 194 |
213 #undef LINK_SPEC | 195 #undef LINK_SPEC |
214 #define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ | 196 #define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ |
215 %{!shared: \ | 197 %{!shared: \ |
216 %{!ibcs: \ | 198 %{!static: \ |
217 %{!static: \ | 199 %{rdynamic:-export-dynamic} \ |
218 %{rdynamic:-export-dynamic} \ | 200 -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \ |
219 %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}} \ | 201 %{static:-static}} \ |
220 %{static:-static}}} \ | |
221 %{mlittle-endian:-EL} \ | 202 %{mlittle-endian:-EL} \ |
222 %{!mno-relax:%{!r:-relax}} \ | 203 %{!mno-relax:%{!r:-relax}} \ |
223 " | 204 " |
224 | 205 |
225 #endif /* !SPARC_BI_ARCH */ | 206 #endif /* !SPARC_BI_ARCH */ |
226 | 207 |
227 /* The sun bundled assembler doesn't accept -Yd, (and neither does gas). | 208 /* It's safe to pass -s always, even if -g is not used. */ |
228 It's safe to pass -s always, even if -g is not used. */ | |
229 #undef ASM_SPEC | 209 #undef ASM_SPEC |
230 #define ASM_SPEC "\ | 210 #define ASM_SPEC "\ |
231 %{V} \ | |
232 %{v:%{!V:-V}} \ | |
233 %{!Qn:-Qy} \ | |
234 %{n} \ | |
235 %{T} \ | |
236 %{Ym,*} \ | |
237 %{Wa,*:%*} \ | |
238 -s \ | 211 -s \ |
239 %{fpic|fPIC|fpie|fPIE|findirect-dispatch:-K PIC} \ | 212 %{fpic|fPIC|fpie|fPIE:-K PIC} \ |
213 %{!.c:%{findirect-dispatch:-K PIC}} \ | |
240 %{mlittle-endian:-EL} \ | 214 %{mlittle-endian:-EL} \ |
241 %(asm_cpu) %(asm_arch) %(asm_relax)" | 215 %(asm_cpu) %(asm_arch) %(asm_relax)" |
242 | 216 |
243 #undef ASM_OUTPUT_ALIGNED_LOCAL | 217 #undef ASM_OUTPUT_ALIGNED_LOCAL |
244 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ | 218 #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ |
285 | 259 |
286 /* We use GNU ld so undefine this so that attribute((init_priority)) works. */ | 260 /* We use GNU ld so undefine this so that attribute((init_priority)) works. */ |
287 #undef CTORS_SECTION_ASM_OP | 261 #undef CTORS_SECTION_ASM_OP |
288 #undef DTORS_SECTION_ASM_OP | 262 #undef DTORS_SECTION_ASM_OP |
289 | 263 |
264 /* Static stack checking is supported by means of probes. */ | |
265 #define STACK_CHECK_STATIC_BUILTIN 1 | |
266 | |
290 #define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h" | 267 #define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h" |
291 | 268 |
292 /* Linux currently uses RMO in uniprocessor mode, which is equivalent to | 269 /* Linux currently uses RMO in uniprocessor mode, which is equivalent to |
293 TMO, and TMO in multiprocessor mode. But they reserve the right to | 270 TMO, and TMO in multiprocessor mode. But they reserve the right to |
294 change their minds. */ | 271 change their minds. */ |