comparison gcc/config/sol2.h @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents 77e2b8dfacca
children f6334be47118
comparison
equal deleted inserted replaced
56:3c8a44c06a95 63:b7f97abdc517
1 /* Operating system specific defines to be used when targeting GCC for any 1 /* Operating system specific defines to be used when targeting GCC for any
2 Solaris 2 system. 2 Solaris 2 system.
3 Copyright 2002, 2003, 2004, 2007, 2008, 2009 Free Software Foundation, Inc. 3 Copyright 2002, 2003, 2004, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc.
4 5
5 This file is part of GCC. 6 This file is part of GCC.
6 7
7 GCC is free software; you can redistribute it and/or modify 8 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 it under the terms of the GNU General Public License as published by
171 /* This should be the same as in svr4.h, except with -R added. */ 172 /* This should be the same as in svr4.h, except with -R added. */
172 #undef LINK_SPEC 173 #undef LINK_SPEC
173 #define LINK_SPEC \ 174 #define LINK_SPEC \
174 "%{h*} %{v:-V} \ 175 "%{h*} %{v:-V} \
175 %{b} \ 176 %{b} \
177 %{!shared:%{!static:%{rdynamic: " RDYNAMIC_SPEC "}}} \
176 %{static:-dn -Bstatic} \ 178 %{static:-dn -Bstatic} \
177 %{shared:-G -dy %{!mimpure-text:-z text}} \ 179 %{shared:-G -dy %{!mimpure-text:-z text}} \
178 %{symbolic:-Bsymbolic -G -dy -z text} \ 180 %{symbolic:-Bsymbolic -G -dy -z text} \
179 %(link_arch) \ 181 %(link_arch) \
180 %{Qy:} %{!Qn:-Qy}" 182 %{Qy:} %{!Qn:-Qy}"
183
184 /* With Sun ld, -rdynamic is a no-op. */
185 #define RDYNAMIC_SPEC ""
181 186
182 /* The Solaris linker doesn't understand constructor priorities. (The 187 /* The Solaris linker doesn't understand constructor priorities. (The
183 GNU linker does support constructor priorities, so GNU ld 188 GNU linker does support constructor priorities, so GNU ld
184 configuration files for Solaris override this setting.) */ 189 configuration files for Solaris override this setting.) */
185 #undef SUPPORTS_INIT_PRIORITY 190 #undef SUPPORTS_INIT_PRIORITY
251 fini attributes. */ 256 fini attributes. */
252 #define SOLARIS_ATTRIBUTE_TABLE \ 257 #define SOLARIS_ATTRIBUTE_TABLE \
253 { "init", 0, 0, true, false, false, NULL }, \ 258 { "init", 0, 0, true, false, false, NULL }, \
254 { "fini", 0, 0, true, false, false, NULL } 259 { "fini", 0, 0, true, false, false, NULL }
255 260
261 /* Solaris/x86 as and gas support the common ELF .section/.pushsection
262 syntax. */
263 #define PUSHSECTION_FORMAT "\t.pushsection\t%s\n"
264
256 /* This is how to declare the size of a function. For Solaris, we output 265 /* This is how to declare the size of a function. For Solaris, we output
257 any .init or .fini entries here. */ 266 any .init or .fini entries here. */
258 #undef ASM_DECLARE_FUNCTION_SIZE 267 #undef ASM_DECLARE_FUNCTION_SIZE
259 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \ 268 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
260 do \ 269 do \
263 ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \ 272 ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME); \
264 solaris_output_init_fini (FILE, DECL); \ 273 solaris_output_init_fini (FILE, DECL); \
265 } \ 274 } \
266 while (0) 275 while (0)
267 276
277 /* Solaris 'as' has a bug: a .common directive in .tbss section
278 behaves as .tls_common rather than normal non-TLS .common. */
279 #undef ASM_OUTPUT_ALIGNED_COMMON
280 #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \
281 do \
282 { \
283 if (TARGET_SUN_TLS \
284 && in_section \
285 && ((in_section->common.flags & (SECTION_TLS | SECTION_BSS)) \
286 == (SECTION_TLS | SECTION_BSS))) \
287 switch_to_section (bss_section); \
288 fprintf ((FILE), "%s", COMMON_ASM_OP); \
289 assemble_name ((FILE), (NAME)); \
290 fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
291 (SIZE), (ALIGN) / BITS_PER_UNIT); \
292 } \
293 while (0)
294
295 #ifndef USE_GAS
296 #undef TARGET_ASM_ASSEMBLE_VISIBILITY
297 #define TARGET_ASM_ASSEMBLE_VISIBILITY solaris_assemble_visibility
298 #endif
299
268 extern GTY(()) tree solaris_pending_aligns; 300 extern GTY(()) tree solaris_pending_aligns;
269 extern GTY(()) tree solaris_pending_inits; 301 extern GTY(()) tree solaris_pending_inits;
270 extern GTY(()) tree solaris_pending_finis; 302 extern GTY(()) tree solaris_pending_finis;
271 303
272 /* Allow macro expansion in #pragma pack. */ 304 /* Allow macro expansion in #pragma pack. */