Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / config / rs6000 / linux64.h
blob20bd257975c747bcf53e65a54993ede1e58a675b
1 /* Definitions of target machine for GNU compiler,
2 for 64 bit PowerPC linux.
3 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
4 2009, 2010 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published
10 by the Free Software Foundation; either version 3, or (at your
11 option) any later version.
13 GCC is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
18 Under Section 7 of GPL version 3, you are granted additional
19 permissions described in the GCC Runtime Library Exception, version
20 3.1, as published by the Free Software Foundation.
22 You should have received a copy of the GNU General Public License and
23 a copy of the GCC Runtime Library Exception along with this program;
24 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
25 <http://www.gnu.org/licenses/>. */
27 #ifndef RS6000_BI_ARCH
29 #undef DEFAULT_ABI
30 #define DEFAULT_ABI ABI_AIX
32 #undef TARGET_64BIT
33 #define TARGET_64BIT 1
35 #define DEFAULT_ARCH64_P 1
36 #define RS6000_BI_ARCH_P 0
38 #else
40 #define DEFAULT_ARCH64_P (TARGET_DEFAULT & MASK_64BIT)
41 #define RS6000_BI_ARCH_P 1
43 #endif
45 #ifdef IN_LIBGCC2
46 #undef TARGET_64BIT
47 #ifdef __powerpc64__
48 #define TARGET_64BIT 1
49 #else
50 #define TARGET_64BIT 0
51 #endif
52 #endif
54 #undef TARGET_AIX
55 #define TARGET_AIX TARGET_64BIT
57 #ifdef HAVE_LD_NO_DOT_SYMS
58 /* New ABI uses a local sym for the function entry point. */
59 extern int dot_symbols;
60 #undef DOT_SYMBOLS
61 #define DOT_SYMBOLS dot_symbols
62 #endif
64 #define TARGET_PROFILE_KERNEL profile_kernel
66 #define TARGET_USES_LINUX64_OPT 1
67 #ifdef HAVE_LD_LARGE_TOC
68 #undef TARGET_CMODEL
69 #define TARGET_CMODEL rs6000_current_cmodel
70 #define SET_CMODEL(opt) rs6000_current_cmodel = opt
71 #else
72 #define SET_CMODEL(opt) do {} while (0)
73 #endif
75 #undef PROCESSOR_DEFAULT
76 #define PROCESSOR_DEFAULT PROCESSOR_POWER6
77 #undef PROCESSOR_DEFAULT64
78 #define PROCESSOR_DEFAULT64 PROCESSOR_POWER6
80 /* We don't need to generate entries in .fixup, except when
81 -mrelocatable or -mrelocatable-lib is given. */
82 #undef RELOCATABLE_NEEDS_FIXUP
83 #define RELOCATABLE_NEEDS_FIXUP \
84 (target_flags & target_flags_explicit & MASK_RELOCATABLE)
86 #undef RS6000_ABI_NAME
87 #define RS6000_ABI_NAME "linux"
89 #define INVALID_64BIT "-m%s not supported in this configuration"
90 #define INVALID_32BIT INVALID_64BIT
92 #undef SUBSUBTARGET_OVERRIDE_OPTIONS
93 #define SUBSUBTARGET_OVERRIDE_OPTIONS \
94 do \
95 { \
96 if (!rs6000_explicit_options.alignment) \
97 rs6000_alignment_flags = MASK_ALIGN_NATURAL; \
98 if (TARGET_64BIT) \
99 { \
100 if (DEFAULT_ABI != ABI_AIX) \
102 rs6000_current_abi = ABI_AIX; \
103 error (INVALID_64BIT, "call"); \
105 dot_symbols = !strcmp (rs6000_abi_name, "aixdesc"); \
106 if (target_flags & MASK_RELOCATABLE) \
108 target_flags &= ~MASK_RELOCATABLE; \
109 error (INVALID_64BIT, "relocatable"); \
111 if (target_flags & MASK_EABI) \
113 target_flags &= ~MASK_EABI; \
114 error (INVALID_64BIT, "eabi"); \
116 if (TARGET_PROTOTYPE) \
118 target_prototype = 0; \
119 error (INVALID_64BIT, "prototype"); \
121 if ((target_flags & MASK_POWERPC64) == 0) \
123 target_flags |= MASK_POWERPC64; \
124 error ("-m64 requires a PowerPC64 cpu"); \
126 if ((target_flags_explicit & MASK_MINIMAL_TOC) != 0) \
128 if (rs6000_explicit_options.cmodel \
129 && rs6000_current_cmodel != CMODEL_SMALL) \
130 error ("-mcmodel incompatible with other toc options"); \
131 SET_CMODEL (CMODEL_SMALL); \
133 else \
135 if (!rs6000_explicit_options.cmodel) \
136 SET_CMODEL (CMODEL_MEDIUM); \
137 if (rs6000_current_cmodel != CMODEL_SMALL) \
139 TARGET_NO_FP_IN_TOC = 0; \
140 TARGET_NO_SUM_IN_TOC = 0; \
144 else \
146 if (!RS6000_BI_ARCH_P) \
147 error (INVALID_32BIT, "32"); \
148 if (TARGET_PROFILE_KERNEL) \
150 TARGET_PROFILE_KERNEL = 0; \
151 error (INVALID_32BIT, "profile-kernel"); \
153 if (rs6000_explicit_options.cmodel) \
155 SET_CMODEL (CMODEL_SMALL); \
156 error (INVALID_32BIT, "cmodel"); \
160 while (0)
162 #ifdef RS6000_BI_ARCH
164 #undef OPTION_TARGET_CPU_DEFAULT
165 #define OPTION_TARGET_CPU_DEFAULT \
166 (((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
167 ? (char *) 0 : TARGET_CPU_DEFAULT)
169 #endif
171 #undef ASM_DEFAULT_SPEC
172 #undef ASM_SPEC
173 #undef LINK_OS_LINUX_SPEC
175 /* FIXME: This will quite possibly choose the wrong dynamic linker. */
176 #undef LINK_OS_GNU_SPEC
177 #define LINK_OS_GNU_SPEC LINK_OS_LINUX_SPEC
179 #ifndef RS6000_BI_ARCH
180 #define ASM_DEFAULT_SPEC "-mppc64"
181 #define ASM_SPEC "%(asm_spec64) %(asm_spec_common)"
182 #define LINK_OS_LINUX_SPEC "%(link_os_linux_spec64)"
183 #else
184 #if DEFAULT_ARCH64_P
185 #define ASM_DEFAULT_SPEC "-mppc%{!m32:64}"
186 #define ASM_SPEC "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)"
187 #define LINK_OS_LINUX_SPEC "%{m32:%(link_os_linux_spec32)}%{!m32:%(link_os_linux_spec64)}"
188 #else
189 #define ASM_DEFAULT_SPEC "-mppc%{m64:64}"
190 #define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)"
191 #define LINK_OS_LINUX_SPEC "%{!m64:%(link_os_linux_spec32)}%{m64:%(link_os_linux_spec64)}"
192 #endif
193 #endif
195 #define ASM_SPEC32 "-a32 %{Ym,*} %{Yd,*} \
196 %{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \
197 %{memb} %{!memb: %{msdata=eabi: -memb}} \
198 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
199 %{mcall-freebsd: -mbig} \
200 %{mcall-i960-old: -mlittle} \
201 %{mcall-linux: -mbig} \
202 %{mcall-gnu: -mbig} \
203 %{mcall-netbsd: -mbig} \
204 }}}}"
206 #define ASM_SPEC64 "-a64"
208 #define ASM_SPEC_COMMON "%(asm_cpu) \
209 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
210 %{Qy:} %{!Qn:-Qy} \
211 %{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
213 #undef SUBSUBTARGET_EXTRA_SPECS
214 #define SUBSUBTARGET_EXTRA_SPECS \
215 { "asm_spec_common", ASM_SPEC_COMMON }, \
216 { "asm_spec32", ASM_SPEC32 }, \
217 { "asm_spec64", ASM_SPEC64 }, \
218 { "link_os_linux_spec32", LINK_OS_LINUX_SPEC32 }, \
219 { "link_os_linux_spec64", LINK_OS_LINUX_SPEC64 },
221 #undef MULTILIB_DEFAULTS
222 #if DEFAULT_ARCH64_P
223 #define MULTILIB_DEFAULTS { "m64" }
224 #else
225 #define MULTILIB_DEFAULTS { "m32" }
226 #endif
228 #ifndef RS6000_BI_ARCH
230 /* 64-bit PowerPC Linux is always big-endian. */
231 #undef TARGET_LITTLE_ENDIAN
232 #define TARGET_LITTLE_ENDIAN 0
234 /* 64-bit PowerPC Linux always has a TOC. */
235 #undef TARGET_TOC
236 #define TARGET_TOC 1
238 /* Some things from sysv4.h we don't do when 64 bit. */
239 #undef TARGET_RELOCATABLE
240 #define TARGET_RELOCATABLE 0
241 #undef TARGET_EABI
242 #define TARGET_EABI 0
243 #undef TARGET_PROTOTYPE
244 #define TARGET_PROTOTYPE 0
245 #undef RELOCATABLE_NEEDS_FIXUP
246 #define RELOCATABLE_NEEDS_FIXUP 0
248 #endif
250 /* We use glibc _mcount for profiling. */
251 #define NO_PROFILE_COUNTERS 1
252 #define PROFILE_HOOK(LABEL) \
253 do { if (TARGET_64BIT) output_profile_hook (LABEL); } while (0)
255 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
256 #undef ADJUST_FIELD_ALIGN
257 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
258 ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
259 ? 128 \
260 : (TARGET_64BIT \
261 && TARGET_ALIGN_NATURAL == 0 \
262 && TYPE_MODE (strip_array_types (TREE_TYPE (FIELD))) == DFmode) \
263 ? MIN ((COMPUTED), 32) \
264 : (COMPUTED))
266 /* PowerPC64 Linux increases natural record alignment to doubleword if
267 the first field is an FP double, only if in power alignment mode. */
268 #undef ROUND_TYPE_ALIGN
269 #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \
270 ((TARGET_64BIT \
271 && (TREE_CODE (STRUCT) == RECORD_TYPE \
272 || TREE_CODE (STRUCT) == UNION_TYPE \
273 || TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \
274 && TARGET_ALIGN_NATURAL == 0) \
275 ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \
276 : MAX ((COMPUTED), (SPECIFIED)))
278 /* Use the default for compiling target libs. */
279 #ifdef IN_TARGET_LIBS
280 #undef TARGET_ALIGN_NATURAL
281 #define TARGET_ALIGN_NATURAL 1
282 #endif
284 /* Indicate that jump tables go in the text section. */
285 #undef JUMP_TABLES_IN_TEXT_SECTION
286 #define JUMP_TABLES_IN_TEXT_SECTION TARGET_64BIT
288 /* The linux ppc64 ABI isn't explicit on whether aggregates smaller
289 than a doubleword should be padded upward or downward. You could
290 reasonably assume that they follow the normal rules for structure
291 layout treating the parameter area as any other block of memory,
292 then map the reg param area to registers. i.e. pad upward.
293 Setting both of the following defines results in this behavior.
294 Setting just the first one will result in aggregates that fit in a
295 doubleword being padded downward, and others being padded upward.
296 Not a bad idea as this results in struct { int x; } being passed
297 the same way as an int. */
298 #define AGGREGATE_PADDING_FIXED TARGET_64BIT
299 #define AGGREGATES_PAD_UPWARD_ALWAYS 0
301 /* Specify padding for the last element of a block move between
302 registers and memory. FIRST is nonzero if this is the only
303 element. */
304 #define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
305 (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE))
307 /* Linux doesn't support saving and restoring 64-bit regs in a 32-bit
308 process. */
309 #define OS_MISSING_POWERPC64 !TARGET_64BIT
311 #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
313 /* glibc has float and long double forms of math functions. */
314 #undef TARGET_C99_FUNCTIONS
315 #define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
317 /* Whether we have sincos that follows the GNU extension. */
318 #undef TARGET_HAS_SINCOS
319 #define TARGET_HAS_SINCOS (OPTION_GLIBC)
321 #undef TARGET_OS_CPP_BUILTINS
322 #define TARGET_OS_CPP_BUILTINS() \
323 do \
325 if (TARGET_64BIT) \
327 builtin_define ("__PPC__"); \
328 builtin_define ("__PPC64__"); \
329 builtin_define ("__powerpc__"); \
330 builtin_define ("__powerpc64__"); \
331 builtin_assert ("cpu=powerpc64"); \
332 builtin_assert ("machine=powerpc64"); \
334 else \
336 builtin_define_std ("PPC"); \
337 builtin_define_std ("powerpc"); \
338 builtin_assert ("cpu=powerpc"); \
339 builtin_assert ("machine=powerpc"); \
340 TARGET_OS_SYSV_CPP_BUILTINS (); \
343 while (0)
345 #undef CPP_OS_DEFAULT_SPEC
346 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
348 /* The GNU C++ standard library currently requires _GNU_SOURCE being
349 defined on glibc-based systems. This temporary hack accomplishes this,
350 it should go away as soon as libstdc++-v3 has a real fix. */
351 #undef CPLUSPLUS_CPP_SPEC
352 #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
354 #undef LINK_SHLIB_SPEC
355 #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
357 #undef LIB_DEFAULT_SPEC
358 #define LIB_DEFAULT_SPEC "%(lib_linux)"
360 #undef STARTFILE_DEFAULT_SPEC
361 #define STARTFILE_DEFAULT_SPEC "%(startfile_linux)"
363 #undef ENDFILE_DEFAULT_SPEC
364 #define ENDFILE_DEFAULT_SPEC "%(endfile_linux)"
366 #undef LINK_START_DEFAULT_SPEC
367 #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
369 #undef LINK_OS_DEFAULT_SPEC
370 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
372 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
373 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
374 #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
375 #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
376 #if DEFAULT_LIBC == LIBC_UCLIBC
377 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
378 #elif DEFAULT_LIBC == LIBC_GLIBC
379 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
380 #else
381 #error "Unsupported DEFAULT_LIBC"
382 #endif
383 #define LINUX_DYNAMIC_LINKER32 \
384 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
385 #define LINUX_DYNAMIC_LINKER64 \
386 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
389 #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
390 %{rdynamic:-export-dynamic} \
391 -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}"
393 #define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
394 %{rdynamic:-export-dynamic} \
395 -dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}"
397 #undef TOC_SECTION_ASM_OP
398 #define TOC_SECTION_ASM_OP \
399 (TARGET_64BIT \
400 ? "\t.section\t\".toc\",\"aw\"" \
401 : "\t.section\t\".got\",\"aw\"")
403 #undef MINIMAL_TOC_SECTION_ASM_OP
404 #define MINIMAL_TOC_SECTION_ASM_OP \
405 (TARGET_64BIT \
406 ? "\t.section\t\".toc1\",\"aw\"" \
407 : ((TARGET_RELOCATABLE || flag_pic) \
408 ? "\t.section\t\".got2\",\"aw\"" \
409 : "\t.section\t\".got1\",\"aw\""))
411 #undef TARGET_VERSION
412 #define TARGET_VERSION fprintf (stderr, " (PowerPC64 GNU/Linux)");
414 /* Must be at least as big as our pointer type. */
415 #undef SIZE_TYPE
416 #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
418 #undef PTRDIFF_TYPE
419 #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
421 #undef WCHAR_TYPE
422 #define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")
423 #undef WCHAR_TYPE_SIZE
424 #define WCHAR_TYPE_SIZE 32
426 /* Override rs6000.h definition. */
427 #undef ASM_APP_ON
428 #define ASM_APP_ON "#APP\n"
430 /* Override rs6000.h definition. */
431 #undef ASM_APP_OFF
432 #define ASM_APP_OFF "#NO_APP\n"
434 /* PowerPC no-op instruction. */
435 #undef RS6000_CALL_GLUE
436 #define RS6000_CALL_GLUE (TARGET_64BIT ? "nop" : "cror 31,31,31")
438 #undef RS6000_MCOUNT
439 #define RS6000_MCOUNT "_mcount"
441 #ifdef __powerpc64__
442 /* _init and _fini functions are built from bits spread across many
443 object files, each potentially with a different TOC pointer. For
444 that reason, place a nop after the call so that the linker can
445 restore the TOC pointer if a TOC adjusting call stub is needed. */
446 #if DOT_SYMBOLS
447 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
448 asm (SECTION_OP "\n" \
449 " bl ." #FUNC "\n" \
450 " nop\n" \
451 " .previous");
452 #else
453 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
454 asm (SECTION_OP "\n" \
455 " bl " #FUNC "\n" \
456 " nop\n" \
457 " .previous");
458 #endif
459 #endif
461 /* FP save and restore routines. */
462 #undef SAVE_FP_PREFIX
463 #define SAVE_FP_PREFIX (TARGET_64BIT ? "._savef" : "_savefpr_")
464 #undef SAVE_FP_SUFFIX
465 #define SAVE_FP_SUFFIX ""
466 #undef RESTORE_FP_PREFIX
467 #define RESTORE_FP_PREFIX (TARGET_64BIT ? "._restf" : "_restfpr_")
468 #undef RESTORE_FP_SUFFIX
469 #define RESTORE_FP_SUFFIX ""
471 /* Dwarf2 debugging. */
472 #undef PREFERRED_DEBUGGING_TYPE
473 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
475 /* This is how to declare the size of a function. */
476 #undef ASM_DECLARE_FUNCTION_SIZE
477 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
478 do \
480 if (!flag_inhibit_size_directive) \
482 fputs ("\t.size\t", (FILE)); \
483 if (TARGET_64BIT && DOT_SYMBOLS) \
484 putc ('.', (FILE)); \
485 assemble_name ((FILE), (FNAME)); \
486 fputs (",.-", (FILE)); \
487 rs6000_output_function_entry (FILE, FNAME); \
488 putc ('\n', (FILE)); \
491 while (0)
493 /* Return nonzero if this entry is to be written into the constant
494 pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF
495 or a CONST containing one of them. If -mfp-in-toc (the default),
496 we also do this for floating-point constants. We actually can only
497 do this if the FP formats of the target and host machines are the
498 same, but we can't check that since not every file that uses
499 the macros includes real.h. We also do this when we can write the
500 entry into the TOC and the entry is not larger than a TOC entry. */
502 #undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
503 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \
504 (TARGET_TOC \
505 && (GET_CODE (X) == SYMBOL_REF \
506 || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \
507 && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \
508 || GET_CODE (X) == LABEL_REF \
509 || (GET_CODE (X) == CONST_INT \
510 && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \
511 || (GET_CODE (X) == CONST_DOUBLE \
512 && ((TARGET_64BIT \
513 && (TARGET_MINIMAL_TOC \
514 || (SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
515 && ! TARGET_NO_FP_IN_TOC))) \
516 || (!TARGET_64BIT \
517 && !TARGET_NO_FP_IN_TOC \
518 && !TARGET_RELOCATABLE \
519 && SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
520 && BITS_PER_WORD == HOST_BITS_PER_INT)))))
522 /* Select a format to encode pointers in exception handling data. CODE
523 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
524 true if the symbol may be affected by dynamic relocations. */
525 #undef ASM_PREFERRED_EH_DATA_FORMAT
526 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
527 ((TARGET_64BIT || flag_pic || TARGET_RELOCATABLE) \
528 ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel \
529 | (TARGET_64BIT ? DW_EH_PE_udata8 : DW_EH_PE_sdata4)) \
530 : DW_EH_PE_absptr)
532 /* For backward compatibility, we must continue to use the AIX
533 structure return convention. */
534 #undef DRAFT_V4_STRUCT_RET
535 #define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)
537 #define TARGET_ASM_FILE_END rs6000_elf_end_indicate_exec_stack
539 #define TARGET_POSIX_IO
541 #define LINK_GCC_C_SEQUENCE_SPEC \
542 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
544 /* Use --as-needed -lgcc_s for eh support. */
545 #ifdef HAVE_LD_AS_NEEDED
546 #define USE_LD_AS_NEEDED 1
547 #endif
549 #define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h"
551 #ifdef TARGET_LIBC_PROVIDES_SSP
552 /* ppc32 glibc provides __stack_chk_guard in -0x7008(2),
553 ppc64 glibc provides it at -0x7010(13). */
554 #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008)
555 #endif
557 #define POWERPC_LINUX
559 /* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later. */
560 #ifdef TARGET_DEFAULT_LONG_DOUBLE_128
561 #define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
562 #endif
564 /* Static stack checking is supported by means of probes. */
565 #define STACK_CHECK_STATIC_BUILTIN 1
567 /* The default value isn't sufficient in 64-bit mode. */
568 #define STACK_CHECK_PROTECT (TARGET_64BIT ? 16 * 1024 : 12 * 1024)