comparison gcc/config/rs6000/linux64.h @ 0:a06113de4d67

first commit
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Fri, 17 Jul 2009 14:47:48 +0900
parents
children 77e2b8dfacca
comparison
equal deleted inserted replaced
-1:000000000000 0:a06113de4d67
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 Free Software Foundation, Inc.
5
6 This file is part of GCC.
7
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.
12
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.
17
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.
21
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/>. */
26
27 #ifndef RS6000_BI_ARCH
28
29 #undef DEFAULT_ABI
30 #define DEFAULT_ABI ABI_AIX
31
32 #undef TARGET_64BIT
33 #define TARGET_64BIT 1
34
35 #define DEFAULT_ARCH64_P 1
36 #define RS6000_BI_ARCH_P 0
37
38 #else
39
40 #define DEFAULT_ARCH64_P (TARGET_DEFAULT & MASK_64BIT)
41 #define RS6000_BI_ARCH_P 1
42
43 #endif
44
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
53
54 #undef TARGET_AIX
55 #define TARGET_AIX TARGET_64BIT
56
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
63
64 #undef PROCESSOR_DEFAULT
65 #define PROCESSOR_DEFAULT PROCESSOR_POWER6
66 #undef PROCESSOR_DEFAULT64
67 #define PROCESSOR_DEFAULT64 PROCESSOR_POWER6
68
69 /* We don't need to generate entries in .fixup, except when
70 -mrelocatable or -mrelocatable-lib is given. */
71 #undef RELOCATABLE_NEEDS_FIXUP
72 #define RELOCATABLE_NEEDS_FIXUP \
73 (target_flags & target_flags_explicit & MASK_RELOCATABLE)
74
75 #undef RS6000_ABI_NAME
76 #define RS6000_ABI_NAME "linux"
77
78 #define INVALID_64BIT "-m%s not supported in this configuration"
79 #define INVALID_32BIT INVALID_64BIT
80
81 #undef SUBSUBTARGET_OVERRIDE_OPTIONS
82 #define SUBSUBTARGET_OVERRIDE_OPTIONS \
83 do \
84 { \
85 if (!rs6000_explicit_options.alignment) \
86 rs6000_alignment_flags = MASK_ALIGN_NATURAL; \
87 if (TARGET_64BIT) \
88 { \
89 if (DEFAULT_ABI != ABI_AIX) \
90 { \
91 rs6000_current_abi = ABI_AIX; \
92 error (INVALID_64BIT, "call"); \
93 } \
94 dot_symbols = !strcmp (rs6000_abi_name, "aixdesc"); \
95 if (target_flags & MASK_RELOCATABLE) \
96 { \
97 target_flags &= ~MASK_RELOCATABLE; \
98 error (INVALID_64BIT, "relocatable"); \
99 } \
100 if (target_flags & MASK_EABI) \
101 { \
102 target_flags &= ~MASK_EABI; \
103 error (INVALID_64BIT, "eabi"); \
104 } \
105 if (TARGET_PROTOTYPE) \
106 { \
107 TARGET_PROTOTYPE = 0; \
108 error (INVALID_64BIT, "prototype"); \
109 } \
110 if ((target_flags & MASK_POWERPC64) == 0) \
111 { \
112 target_flags |= MASK_POWERPC64; \
113 error ("-m64 requires a PowerPC64 cpu"); \
114 } \
115 } \
116 else \
117 { \
118 if (!RS6000_BI_ARCH_P) \
119 error (INVALID_32BIT, "32"); \
120 if (TARGET_PROFILE_KERNEL) \
121 { \
122 target_flags &= ~MASK_PROFILE_KERNEL; \
123 error (INVALID_32BIT, "profile-kernel"); \
124 } \
125 } \
126 } \
127 while (0)
128
129 #ifdef RS6000_BI_ARCH
130
131 #undef OVERRIDE_OPTIONS
132 #define OVERRIDE_OPTIONS \
133 rs6000_override_options (((TARGET_DEFAULT ^ target_flags) & MASK_64BIT) \
134 ? (char *) 0 : TARGET_CPU_DEFAULT)
135
136 #endif
137
138 #undef ASM_DEFAULT_SPEC
139 #undef ASM_SPEC
140 #undef LINK_OS_LINUX_SPEC
141
142 #ifndef RS6000_BI_ARCH
143 #define ASM_DEFAULT_SPEC "-mppc64"
144 #define ASM_SPEC "%(asm_spec64) %(asm_spec_common)"
145 #define LINK_OS_LINUX_SPEC "%(link_os_linux_spec64)"
146 #else
147 #if DEFAULT_ARCH64_P
148 #define ASM_DEFAULT_SPEC "-mppc%{!m32:64}"
149 #define ASM_SPEC "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)"
150 #define LINK_OS_LINUX_SPEC "%{m32:%(link_os_linux_spec32)}%{!m32:%(link_os_linux_spec64)}"
151 #else
152 #define ASM_DEFAULT_SPEC "-mppc%{m64:64}"
153 #define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)"
154 #define LINK_OS_LINUX_SPEC "%{!m64:%(link_os_linux_spec32)}%{m64:%(link_os_linux_spec64)}"
155 #endif
156 #endif
157
158 #define ASM_SPEC32 "-a32 %{n} %{T} %{Ym,*} %{Yd,*} \
159 %{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \
160 %{memb} %{!memb: %{msdata: -memb} %{msdata=eabi: -memb}} \
161 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \
162 %{mcall-freebsd: -mbig} \
163 %{mcall-i960-old: -mlittle} \
164 %{mcall-linux: -mbig} \
165 %{mcall-gnu: -mbig} \
166 %{mcall-netbsd: -mbig} \
167 }}}}"
168
169 #define ASM_SPEC64 "-a64"
170
171 #define ASM_SPEC_COMMON "%(asm_cpu) \
172 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \
173 %{v:-V} %{Qy:} %{!Qn:-Qy} %{Wa,*:%*} \
174 %{mlittle} %{mlittle-endian} %{mbig} %{mbig-endian}"
175
176 #undef SUBSUBTARGET_EXTRA_SPECS
177 #define SUBSUBTARGET_EXTRA_SPECS \
178 { "asm_spec_common", ASM_SPEC_COMMON }, \
179 { "asm_spec32", ASM_SPEC32 }, \
180 { "asm_spec64", ASM_SPEC64 }, \
181 { "link_os_linux_spec32", LINK_OS_LINUX_SPEC32 }, \
182 { "link_os_linux_spec64", LINK_OS_LINUX_SPEC64 },
183
184 #undef MULTILIB_DEFAULTS
185 #if DEFAULT_ARCH64_P
186 #define MULTILIB_DEFAULTS { "m64" }
187 #else
188 #define MULTILIB_DEFAULTS { "m32" }
189 #endif
190
191 #ifndef RS6000_BI_ARCH
192
193 /* 64-bit PowerPC Linux is always big-endian. */
194 #undef TARGET_LITTLE_ENDIAN
195 #define TARGET_LITTLE_ENDIAN 0
196
197 /* 64-bit PowerPC Linux always has a TOC. */
198 #undef TARGET_TOC
199 #define TARGET_TOC 1
200
201 /* Some things from sysv4.h we don't do when 64 bit. */
202 #undef TARGET_RELOCATABLE
203 #define TARGET_RELOCATABLE 0
204 #undef TARGET_EABI
205 #define TARGET_EABI 0
206 #undef TARGET_PROTOTYPE
207 #define TARGET_PROTOTYPE 0
208 #undef RELOCATABLE_NEEDS_FIXUP
209 #define RELOCATABLE_NEEDS_FIXUP 0
210
211 #endif
212
213 /* We use glibc _mcount for profiling. */
214 #define NO_PROFILE_COUNTERS 1
215 #define PROFILE_HOOK(LABEL) \
216 do { if (TARGET_64BIT) output_profile_hook (LABEL); } while (0)
217
218 /* PowerPC64 Linux word-aligns FP doubles when -malign-power is given. */
219 #undef ADJUST_FIELD_ALIGN
220 #define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
221 ((TARGET_ALTIVEC && TREE_CODE (TREE_TYPE (FIELD)) == VECTOR_TYPE) \
222 ? 128 \
223 : (TARGET_64BIT \
224 && TARGET_ALIGN_NATURAL == 0 \
225 && TYPE_MODE (strip_array_types (TREE_TYPE (FIELD))) == DFmode) \
226 ? MIN ((COMPUTED), 32) \
227 : (COMPUTED))
228
229 /* PowerPC64 Linux increases natural record alignment to doubleword if
230 the first field is an FP double, only if in power alignment mode. */
231 #undef ROUND_TYPE_ALIGN
232 #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED) \
233 ((TARGET_64BIT \
234 && (TREE_CODE (STRUCT) == RECORD_TYPE \
235 || TREE_CODE (STRUCT) == UNION_TYPE \
236 || TREE_CODE (STRUCT) == QUAL_UNION_TYPE) \
237 && TARGET_ALIGN_NATURAL == 0) \
238 ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \
239 : MAX ((COMPUTED), (SPECIFIED)))
240
241 /* Use the default for compiling target libs. */
242 #ifdef IN_TARGET_LIBS
243 #undef TARGET_ALIGN_NATURAL
244 #define TARGET_ALIGN_NATURAL 1
245 #endif
246
247 /* Indicate that jump tables go in the text section. */
248 #undef JUMP_TABLES_IN_TEXT_SECTION
249 #define JUMP_TABLES_IN_TEXT_SECTION TARGET_64BIT
250
251 /* The linux ppc64 ABI isn't explicit on whether aggregates smaller
252 than a doubleword should be padded upward or downward. You could
253 reasonably assume that they follow the normal rules for structure
254 layout treating the parameter area as any other block of memory,
255 then map the reg param area to registers. i.e. pad upward.
256 Setting both of the following defines results in this behavior.
257 Setting just the first one will result in aggregates that fit in a
258 doubleword being padded downward, and others being padded upward.
259 Not a bad idea as this results in struct { int x; } being passed
260 the same way as an int. */
261 #define AGGREGATE_PADDING_FIXED TARGET_64BIT
262 #define AGGREGATES_PAD_UPWARD_ALWAYS 0
263
264 /* Specify padding for the last element of a block move between
265 registers and memory. FIRST is nonzero if this is the only
266 element. */
267 #define BLOCK_REG_PADDING(MODE, TYPE, FIRST) \
268 (!(FIRST) ? upward : FUNCTION_ARG_PADDING (MODE, TYPE))
269
270 /* __throw will restore its own return address to be the same as the
271 return address of the function that the throw is being made to.
272 This is unfortunate, because we want to check the original
273 return address to see if we need to restore the TOC.
274 So we have to squirrel it away with this. */
275 #define SETUP_FRAME_ADDRESSES() \
276 do { if (TARGET_64BIT) rs6000_aix_emit_builtin_unwind_init (); } while (0)
277
278 /* Override svr4.h */
279 #undef MD_EXEC_PREFIX
280 #undef MD_STARTFILE_PREFIX
281
282 /* Linux doesn't support saving and restoring 64-bit regs in a 32-bit
283 process. */
284 #define OS_MISSING_POWERPC64 !TARGET_64BIT
285
286 /* glibc has float and long double forms of math functions. */
287 #undef TARGET_C99_FUNCTIONS
288 #define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
289
290 /* Whether we have sincos that follows the GNU extension. */
291 #undef TARGET_HAS_SINCOS
292 #define TARGET_HAS_SINCOS (OPTION_GLIBC)
293
294 #undef TARGET_OS_CPP_BUILTINS
295 #define TARGET_OS_CPP_BUILTINS() \
296 do \
297 { \
298 if (TARGET_64BIT) \
299 { \
300 builtin_define ("__PPC__"); \
301 builtin_define ("__PPC64__"); \
302 builtin_define ("__powerpc__"); \
303 builtin_define ("__powerpc64__"); \
304 builtin_assert ("cpu=powerpc64"); \
305 builtin_assert ("machine=powerpc64"); \
306 } \
307 else \
308 { \
309 builtin_define_std ("PPC"); \
310 builtin_define_std ("powerpc"); \
311 builtin_assert ("cpu=powerpc"); \
312 builtin_assert ("machine=powerpc"); \
313 TARGET_OS_SYSV_CPP_BUILTINS (); \
314 } \
315 } \
316 while (0)
317
318 #undef CPP_OS_DEFAULT_SPEC
319 #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
320
321 /* The GNU C++ standard library currently requires _GNU_SOURCE being
322 defined on glibc-based systems. This temporary hack accomplishes this,
323 it should go away as soon as libstdc++-v3 has a real fix. */
324 #undef CPLUSPLUS_CPP_SPEC
325 #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
326
327 #undef LINK_SHLIB_SPEC
328 #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"
329
330 #undef LIB_DEFAULT_SPEC
331 #define LIB_DEFAULT_SPEC "%(lib_linux)"
332
333 #undef STARTFILE_DEFAULT_SPEC
334 #define STARTFILE_DEFAULT_SPEC "%(startfile_linux)"
335
336 #undef ENDFILE_DEFAULT_SPEC
337 #define ENDFILE_DEFAULT_SPEC "%(endfile_linux)"
338
339 #undef LINK_START_DEFAULT_SPEC
340 #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
341
342 #undef LINK_OS_DEFAULT_SPEC
343 #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
344
345 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
346 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
347 #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
348 #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
349 #if UCLIBC_DEFAULT
350 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
351 #else
352 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
353 #endif
354 #define LINUX_DYNAMIC_LINKER32 \
355 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
356 #define LINUX_DYNAMIC_LINKER64 \
357 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
358
359
360 #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
361 %{rdynamic:-export-dynamic} \
362 %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}}"
363
364 #define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
365 %{rdynamic:-export-dynamic} \
366 %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}"
367
368 #undef TOC_SECTION_ASM_OP
369 #define TOC_SECTION_ASM_OP \
370 (TARGET_64BIT \
371 ? "\t.section\t\".toc\",\"aw\"" \
372 : "\t.section\t\".got\",\"aw\"")
373
374 #undef MINIMAL_TOC_SECTION_ASM_OP
375 #define MINIMAL_TOC_SECTION_ASM_OP \
376 (TARGET_64BIT \
377 ? "\t.section\t\".toc1\",\"aw\"" \
378 : ((TARGET_RELOCATABLE || flag_pic) \
379 ? "\t.section\t\".got2\",\"aw\"" \
380 : "\t.section\t\".got1\",\"aw\""))
381
382 #undef TARGET_VERSION
383 #define TARGET_VERSION fprintf (stderr, " (PowerPC64 GNU/Linux)");
384
385 /* Must be at least as big as our pointer type. */
386 #undef SIZE_TYPE
387 #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
388
389 #undef PTRDIFF_TYPE
390 #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
391
392 #undef WCHAR_TYPE
393 #define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")
394 #undef WCHAR_TYPE_SIZE
395 #define WCHAR_TYPE_SIZE 32
396
397 /* Override rs6000.h definition. */
398 #undef ASM_APP_ON
399 #define ASM_APP_ON "#APP\n"
400
401 /* Override rs6000.h definition. */
402 #undef ASM_APP_OFF
403 #define ASM_APP_OFF "#NO_APP\n"
404
405 /* PowerPC no-op instruction. */
406 #undef RS6000_CALL_GLUE
407 #define RS6000_CALL_GLUE (TARGET_64BIT ? "nop" : "cror 31,31,31")
408
409 #undef RS6000_MCOUNT
410 #define RS6000_MCOUNT "_mcount"
411
412 #ifdef __powerpc64__
413 /* _init and _fini functions are built from bits spread across many
414 object files, each potentially with a different TOC pointer. For
415 that reason, place a nop after the call so that the linker can
416 restore the TOC pointer if a TOC adjusting call stub is needed. */
417 #if DOT_SYMBOLS
418 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
419 asm (SECTION_OP "\n" \
420 " bl ." #FUNC "\n" \
421 " nop\n" \
422 " .previous");
423 #else
424 #define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
425 asm (SECTION_OP "\n" \
426 " bl " #FUNC "\n" \
427 " nop\n" \
428 " .previous");
429 #endif
430 #endif
431
432 /* FP save and restore routines. */
433 #undef SAVE_FP_PREFIX
434 #define SAVE_FP_PREFIX (TARGET_64BIT ? "._savef" : "_savefpr_")
435 #undef SAVE_FP_SUFFIX
436 #define SAVE_FP_SUFFIX (TARGET_64BIT ? "" : "_l")
437 #undef RESTORE_FP_PREFIX
438 #define RESTORE_FP_PREFIX (TARGET_64BIT ? "._restf" : "_restfpr_")
439 #undef RESTORE_FP_SUFFIX
440 #define RESTORE_FP_SUFFIX (TARGET_64BIT ? "" : "_l")
441
442 /* Dwarf2 debugging. */
443 #undef PREFERRED_DEBUGGING_TYPE
444 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
445
446 /* This is how to declare the size of a function. */
447 #undef ASM_DECLARE_FUNCTION_SIZE
448 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
449 do \
450 { \
451 if (!flag_inhibit_size_directive) \
452 { \
453 fputs ("\t.size\t", (FILE)); \
454 if (TARGET_64BIT && DOT_SYMBOLS) \
455 putc ('.', (FILE)); \
456 assemble_name ((FILE), (FNAME)); \
457 fputs (",.-", (FILE)); \
458 rs6000_output_function_entry (FILE, FNAME); \
459 putc ('\n', (FILE)); \
460 } \
461 } \
462 while (0)
463
464 /* Return nonzero if this entry is to be written into the constant
465 pool in a special way. We do so if this is a SYMBOL_REF, LABEL_REF
466 or a CONST containing one of them. If -mfp-in-toc (the default),
467 we also do this for floating-point constants. We actually can only
468 do this if the FP formats of the target and host machines are the
469 same, but we can't check that since not every file that uses
470 GO_IF_LEGITIMATE_ADDRESS_P includes real.h. We also do this when
471 we can write the entry into the TOC and the entry is not larger
472 than a TOC entry. */
473
474 #undef ASM_OUTPUT_SPECIAL_POOL_ENTRY_P
475 #define ASM_OUTPUT_SPECIAL_POOL_ENTRY_P(X, MODE) \
476 (TARGET_TOC \
477 && (GET_CODE (X) == SYMBOL_REF \
478 || (GET_CODE (X) == CONST && GET_CODE (XEXP (X, 0)) == PLUS \
479 && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF) \
480 || GET_CODE (X) == LABEL_REF \
481 || (GET_CODE (X) == CONST_INT \
482 && GET_MODE_BITSIZE (MODE) <= GET_MODE_BITSIZE (Pmode)) \
483 || (GET_CODE (X) == CONST_DOUBLE \
484 && ((TARGET_64BIT \
485 && (TARGET_MINIMAL_TOC \
486 || (SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
487 && ! TARGET_NO_FP_IN_TOC))) \
488 || (!TARGET_64BIT \
489 && !TARGET_NO_FP_IN_TOC \
490 && !TARGET_RELOCATABLE \
491 && SCALAR_FLOAT_MODE_P (GET_MODE (X)) \
492 && BITS_PER_WORD == HOST_BITS_PER_INT)))))
493
494 /* Select a format to encode pointers in exception handling data. CODE
495 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is
496 true if the symbol may be affected by dynamic relocations. */
497 #undef ASM_PREFERRED_EH_DATA_FORMAT
498 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE, GLOBAL) \
499 ((TARGET_64BIT || flag_pic || TARGET_RELOCATABLE) \
500 ? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel \
501 | (TARGET_64BIT ? DW_EH_PE_udata8 : DW_EH_PE_sdata4)) \
502 : DW_EH_PE_absptr)
503
504 /* For backward compatibility, we must continue to use the AIX
505 structure return convention. */
506 #undef DRAFT_V4_STRUCT_RET
507 #define DRAFT_V4_STRUCT_RET (!TARGET_64BIT)
508
509 #define TARGET_ASM_FILE_END rs6000_elf_end_indicate_exec_stack
510
511 #define TARGET_POSIX_IO
512
513 #define LINK_GCC_C_SEQUENCE_SPEC \
514 "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
515
516 /* Use --as-needed -lgcc_s for eh support. */
517 #ifdef HAVE_LD_AS_NEEDED
518 #define USE_LD_AS_NEEDED 1
519 #endif
520
521 #define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h"
522
523 #ifdef TARGET_LIBC_PROVIDES_SSP
524 /* ppc32 glibc provides __stack_chk_guard in -0x7008(2),
525 ppc64 glibc provides it at -0x7010(13). */
526 #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008)
527 #endif
528
529 #define POWERPC_LINUX
530
531 /* ppc{32,64} linux has 128-bit long double support in glibc 2.4 and later. */
532 #ifdef TARGET_DEFAULT_LONG_DOUBLE_128
533 #define RS6000_DEFAULT_LONG_DOUBLE_SIZE 128
534 #endif