Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/rs6000/sysv4.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 /* Target definitions for GNU compiler for PowerPC running System V.4 | 1 /* Target definitions for GNU compiler for PowerPC running System V.4 |
2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, | 2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, |
3 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 3 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 |
4 Free Software Foundation, Inc. | |
4 Contributed by Cygnus Support. | 5 Contributed by Cygnus Support. |
5 | 6 |
6 This file is part of GCC. | 7 This file is part of GCC. |
7 | 8 |
8 GCC is free software; you can redistribute it and/or modify it | 9 GCC is free software; you can redistribute it and/or modify it |
38 #define RS6000_ABI_NAME "sysv" | 39 #define RS6000_ABI_NAME "sysv" |
39 | 40 |
40 /* Override rs6000.h definition. */ | 41 /* Override rs6000.h definition. */ |
41 #undef ASM_DEFAULT_SPEC | 42 #undef ASM_DEFAULT_SPEC |
42 #define ASM_DEFAULT_SPEC "-mppc" | 43 #define ASM_DEFAULT_SPEC "-mppc" |
43 | |
44 /* Small data support types. */ | |
45 enum rs6000_sdata_type { | |
46 SDATA_NONE, /* No small data support. */ | |
47 SDATA_DATA, /* Just put data in .sbss/.sdata, don't use relocs. */ | |
48 SDATA_SYSV, /* Use r13 to point to .sdata/.sbss. */ | |
49 SDATA_EABI /* Use r13 like above, r2 points to .sdata2/.sbss2. */ | |
50 }; | |
51 | |
52 extern enum rs6000_sdata_type rs6000_sdata; | |
53 | 44 |
54 #define TARGET_TOC ((target_flags & MASK_64BIT) \ | 45 #define TARGET_TOC ((target_flags & MASK_64BIT) \ |
55 || ((target_flags & (MASK_RELOCATABLE \ | 46 || ((target_flags & (MASK_RELOCATABLE \ |
56 | MASK_MINIMAL_TOC)) \ | 47 | MASK_MINIMAL_TOC)) \ |
57 && flag_pic > 1) \ | 48 && flag_pic > 1) \ |
68 #ifdef HAVE_AS_REL16 | 59 #ifdef HAVE_AS_REL16 |
69 #undef TARGET_SECURE_PLT | 60 #undef TARGET_SECURE_PLT |
70 #define TARGET_SECURE_PLT secure_plt | 61 #define TARGET_SECURE_PLT secure_plt |
71 #endif | 62 #endif |
72 | 63 |
73 extern const char *rs6000_abi_name; | |
74 extern const char *rs6000_sdata_name; | |
75 extern const char *rs6000_tls_size_string; /* For -mtls-size= */ | |
76 | |
77 #define SDATA_DEFAULT_SIZE 8 | 64 #define SDATA_DEFAULT_SIZE 8 |
78 | 65 |
79 /* Sometimes certain combinations of command options do not make sense | 66 /* The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to |
80 on a particular target machine. You can define a macro | 67 get control in TARGET_OPTION_OVERRIDE. */ |
81 `OVERRIDE_OPTIONS' to take account of this. This macro, if | |
82 defined, is executed once just after all the command options have | |
83 been parsed. | |
84 | |
85 The macro SUBTARGET_OVERRIDE_OPTIONS is provided for subtargets, to | |
86 get control. */ | |
87 | 68 |
88 #define SUBTARGET_OVERRIDE_OPTIONS \ | 69 #define SUBTARGET_OVERRIDE_OPTIONS \ |
89 do { \ | 70 do { \ |
90 if (!g_switch_set) \ | 71 if (!global_options_set.x_g_switch_value) \ |
91 g_switch_value = SDATA_DEFAULT_SIZE; \ | 72 g_switch_value = SDATA_DEFAULT_SIZE; \ |
92 \ | 73 \ |
93 if (rs6000_abi_name == NULL) \ | 74 if (rs6000_abi_name == NULL) \ |
94 rs6000_abi_name = RS6000_ABI_NAME; \ | 75 rs6000_abi_name = RS6000_ABI_NAME; \ |
95 \ | 76 \ |
227 target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC; \ | 208 target_flags |= MASK_RELOCATABLE | MASK_MINIMAL_TOC; \ |
228 TARGET_NO_FP_IN_TOC = 1; \ | 209 TARGET_NO_FP_IN_TOC = 1; \ |
229 } \ | 210 } \ |
230 \ | 211 \ |
231 else if (TARGET_RELOCATABLE) \ | 212 else if (TARGET_RELOCATABLE) \ |
232 flag_pic = 2; \ | 213 if (!flag_pic) \ |
214 flag_pic = 2; \ | |
233 } while (0) | 215 } while (0) |
234 | 216 |
235 #ifndef RS6000_BI_ARCH | 217 #ifndef RS6000_BI_ARCH |
236 # define SUBSUBTARGET_OVERRIDE_OPTIONS \ | 218 # define SUBSUBTARGET_OVERRIDE_OPTIONS \ |
237 do { \ | 219 do { \ |
261 /* Override default big endianism definitions in rs6000.h. */ | 243 /* Override default big endianism definitions in rs6000.h. */ |
262 #undef BYTES_BIG_ENDIAN | 244 #undef BYTES_BIG_ENDIAN |
263 #undef WORDS_BIG_ENDIAN | 245 #undef WORDS_BIG_ENDIAN |
264 #define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN) | 246 #define BYTES_BIG_ENDIAN (TARGET_BIG_ENDIAN) |
265 #define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN) | 247 #define WORDS_BIG_ENDIAN (TARGET_BIG_ENDIAN) |
266 | |
267 /* Define this to set the endianness to use in libgcc2.c, which can | |
268 not depend on target_flags. */ | |
269 #if !defined(__LITTLE_ENDIAN__) && !defined(__sun__) | |
270 #define LIBGCC2_WORDS_BIG_ENDIAN 1 | |
271 #else | |
272 #define LIBGCC2_WORDS_BIG_ENDIAN 0 | |
273 #endif | |
274 | 248 |
275 /* Define cutoff for using external functions to save floating point. | 249 /* Define cutoff for using external functions to save floating point. |
276 When optimizing for size, use external functions when profitable. */ | 250 When optimizing for size, use external functions when profitable. */ |
277 #define FP_SAVE_INLINE(FIRST_REG) (optimize_size \ | 251 #define FP_SAVE_INLINE(FIRST_REG) (optimize_size \ |
278 ? ((FIRST_REG) == 62 \ | 252 ? ((FIRST_REG) == 62 \ |
291 | 265 |
292 /* Prefix and suffix to use to restoring floating point. */ | 266 /* Prefix and suffix to use to restoring floating point. */ |
293 #define RESTORE_FP_PREFIX "_restfpr_" | 267 #define RESTORE_FP_PREFIX "_restfpr_" |
294 #define RESTORE_FP_SUFFIX "" | 268 #define RESTORE_FP_SUFFIX "" |
295 | 269 |
270 /* Type used for size_t, as a string used in a declaration. */ | |
271 #undef SIZE_TYPE | |
272 #define SIZE_TYPE "unsigned int" | |
273 | |
296 /* Type used for ptrdiff_t, as a string used in a declaration. */ | 274 /* Type used for ptrdiff_t, as a string used in a declaration. */ |
297 #define PTRDIFF_TYPE "int" | 275 #define PTRDIFF_TYPE "int" |
298 | 276 |
299 /* Type used for wchar_t, as a string used in a declaration. */ | |
300 /* Override svr4.h definition. */ | |
301 #undef WCHAR_TYPE | 277 #undef WCHAR_TYPE |
302 #define WCHAR_TYPE "long int" | 278 #define WCHAR_TYPE "long int" |
303 | 279 |
304 /* Width of wchar_t in bits. */ | |
305 /* Override svr4.h definition. */ | |
306 #undef WCHAR_TYPE_SIZE | 280 #undef WCHAR_TYPE_SIZE |
307 #define WCHAR_TYPE_SIZE 32 | 281 #define WCHAR_TYPE_SIZE 32 |
308 | 282 |
309 /* Make int foo : 8 not cause structures to be aligned to an int boundary. */ | 283 /* Make int foo : 8 not cause structures to be aligned to an int boundary. */ |
310 /* Override elfos.h definition. */ | 284 /* Override elfos.h definition. */ |
414 | 388 |
415 /* Write the extra assembler code needed to declare a function properly. | 389 /* Write the extra assembler code needed to declare a function properly. |
416 Some svr4 assemblers need to also have something extra said about the | 390 Some svr4 assemblers need to also have something extra said about the |
417 function's return value. We allow for that here. */ | 391 function's return value. We allow for that here. */ |
418 | 392 |
419 extern int rs6000_pic_labelno; | |
420 | |
421 /* Override elfos.h definition. */ | 393 /* Override elfos.h definition. */ |
422 #undef ASM_DECLARE_FUNCTION_NAME | 394 #undef ASM_DECLARE_FUNCTION_NAME |
423 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ | 395 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ |
424 rs6000_elf_declare_function_name ((FILE), (NAME), (DECL)) | 396 rs6000_elf_declare_function_name ((FILE), (NAME), (DECL)) |
425 | 397 |
426 /* The USER_LABEL_PREFIX stuff is affected by the -fleading-underscore | 398 /* The USER_LABEL_PREFIX stuff is affected by the -fleading-underscore |
427 flag. The LOCAL_LABEL_PREFIX variable is used by dbxelf.h. */ | 399 flag. The LOCAL_LABEL_PREFIX variable is used by dbxelf.h. */ |
428 | 400 |
429 #define LOCAL_LABEL_PREFIX "." | 401 #define LOCAL_LABEL_PREFIX "." |
430 #define USER_LABEL_PREFIX "" | 402 #define USER_LABEL_PREFIX "" |
431 | |
432 /* svr4.h overrides (*targetm.asm_out.internal_label). */ | |
433 | 403 |
434 #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \ | 404 #define ASM_OUTPUT_INTERNAL_LABEL_PREFIX(FILE,PREFIX) \ |
435 asm_fprintf (FILE, "%L%s", PREFIX) | 405 asm_fprintf (FILE, "%L%s", PREFIX) |
436 | 406 |
437 /* Globalizing directive for a label. */ | 407 /* Globalizing directive for a label. */ |
513 asm_fprintf (FILE, \ | 483 asm_fprintf (FILE, \ |
514 "\t{l|lwz} %s,12(%s)\n\t{ai|addic} %s,%s,16\n", \ | 484 "\t{l|lwz} %s,12(%s)\n\t{ai|addic} %s,%s,16\n", \ |
515 reg_names[REGNO], reg_names[1], reg_names[1], \ | 485 reg_names[REGNO], reg_names[1], reg_names[1], \ |
516 reg_names[1]); \ | 486 reg_names[1]); \ |
517 } while (0) | 487 } while (0) |
518 | |
519 /* Switch Recognition by gcc.c. Add -G xx support. */ | |
520 | |
521 /* Override svr4.h definition. */ | |
522 #undef SWITCH_TAKES_ARG | |
523 #define SWITCH_TAKES_ARG(CHAR) \ | |
524 ((CHAR) == 'D' || (CHAR) == 'U' || (CHAR) == 'o' \ | |
525 || (CHAR) == 'e' || (CHAR) == 'T' || (CHAR) == 'u' \ | |
526 || (CHAR) == 'I' || (CHAR) == 'm' || (CHAR) == 'x' \ | |
527 || (CHAR) == 'L' || (CHAR) == 'A' || (CHAR) == 'V' \ | |
528 || (CHAR) == 'B' || (CHAR) == 'b' || (CHAR) == 'G') | |
529 | 488 |
530 extern int fixuplabelno; | 489 extern int fixuplabelno; |
531 | 490 |
532 /* Handle constructors specially for -mrelocatable. */ | 491 /* Handle constructors specially for -mrelocatable. */ |
533 #define TARGET_ASM_CONSTRUCTOR rs6000_elf_asm_out_constructor | 492 #define TARGET_ASM_CONSTRUCTOR rs6000_elf_asm_out_constructor |
584 TARGET_OS_SYSV_CPP_BUILTINS (); \ | 543 TARGET_OS_SYSV_CPP_BUILTINS (); \ |
585 } \ | 544 } \ |
586 while (0) | 545 while (0) |
587 #endif | 546 #endif |
588 | 547 |
589 /* Pass various options to the assembler. */ | |
590 /* Override svr4.h definition. */ | |
591 #undef ASM_SPEC | 548 #undef ASM_SPEC |
592 #define ASM_SPEC "%(asm_cpu) \ | 549 #define ASM_SPEC "%(asm_cpu) \ |
593 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}}" \ | 550 %{,assembler|,assembler-with-cpp: %{mregnames} %{mno-regnames}} \ |
594 SVR4_ASM_SPEC \ | 551 %{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \ |
595 "%{mrelocatable} %{mrelocatable-lib} %{fpic|fpie|fPIC|fPIE:-K PIC} \ | |
596 %{memb|msdata=eabi: -memb} \ | 552 %{memb|msdata=eabi: -memb} \ |
597 %{mlittle|mlittle-endian:-mlittle; \ | 553 %{mlittle|mlittle-endian:-mlittle; \ |
598 mbig|mbig-endian :-mbig; \ | 554 mbig|mbig-endian :-mbig; \ |
599 mcall-aixdesc | \ | 555 mcall-aixdesc | \ |
600 mcall-freebsd | \ | 556 mcall-freebsd | \ |
643 %{msdata: -msdata=default} \ | 599 %{msdata: -msdata=default} \ |
644 %{mno-sdata: -msdata=none} \ | 600 %{mno-sdata: -msdata=none} \ |
645 %{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \ | 601 %{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \ |
646 %{profile: -p}" | 602 %{profile: -p}" |
647 | 603 |
648 /* Don't put -Y P,<path> for cross compilers. */ | |
649 #ifndef CROSS_DIRECTORY_STRUCTURE | |
650 #define LINK_PATH_SPEC "\ | |
651 %{!R*:%{L*:-R %*}} \ | |
652 %{!nostdlib: %{!YP,*: \ | |
653 %{compat-bsd: \ | |
654 %{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ | |
655 %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \ | |
656 %{!R*: %{!L*: -R /usr/ucblib}} \ | |
657 %{!compat-bsd: \ | |
658 %{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ | |
659 %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}}" | |
660 | |
661 #else | |
662 #define LINK_PATH_SPEC "" | |
663 #endif | |
664 | |
665 /* Default starting address if specified. */ | 604 /* Default starting address if specified. */ |
666 #define LINK_START_SPEC "\ | 605 #define LINK_START_SPEC "\ |
667 %{mads : %(link_start_ads) ; \ | 606 %{mads : %(link_start_ads) ; \ |
668 myellowknife : %(link_start_yellowknife) ; \ | 607 myellowknife : %(link_start_yellowknife) ; \ |
669 mmvme : %(link_start_mvme) ; \ | 608 mmvme : %(link_start_mvme) ; \ |
675 mcall-openbsd: %(link_start_openbsd) ; \ | 614 mcall-openbsd: %(link_start_openbsd) ; \ |
676 : %(link_start_default) }" | 615 : %(link_start_default) }" |
677 | 616 |
678 #define LINK_START_DEFAULT_SPEC "" | 617 #define LINK_START_DEFAULT_SPEC "" |
679 | 618 |
680 /* Override svr4.h definition. */ | |
681 #undef LINK_SPEC | 619 #undef LINK_SPEC |
682 #define LINK_SPEC "\ | 620 #define LINK_SPEC "\ |
683 %{h*} %{v:-V} %{!msdata=none:%{G*}} %{msdata=none:-G0} \ | 621 %{h*} %{v:-V} %{!msdata=none:%{G*}} %{msdata=none:-G0} \ |
684 %{YP,*} %{R*} \ | 622 %{R*} \ |
685 %{Qy:} %{!Qn:-Qy} \ | |
686 %(link_shlib) \ | 623 %(link_shlib) \ |
687 %{!Wl,-T*: %{!T*: %(link_start) }} \ | 624 %{!T*: %(link_start) } \ |
688 %(link_target) \ | 625 %(link_target) \ |
689 %(link_os)" | 626 %(link_os)" |
690 | 627 |
691 /* For now, turn off shared libraries by default. */ | |
692 #ifndef SHARED_LIB_SUPPORT | |
693 #define NO_SHARED_LIB_SUPPORT | |
694 #endif | |
695 | |
696 #ifndef NO_SHARED_LIB_SUPPORT | |
697 /* Shared libraries are default. */ | |
698 #define LINK_SHLIB_SPEC "\ | |
699 %{!static: %(link_path) %{!R*:%{L*:-R %*}}} \ | |
700 %{mshlib: } \ | |
701 %{static:-dn -Bstatic} \ | |
702 %{shared:-G -dy -z text} \ | |
703 %{symbolic:-Bsymbolic -G -dy -z text}" | |
704 | |
705 #else | |
706 /* Shared libraries are not default. */ | 628 /* Shared libraries are not default. */ |
707 #define LINK_SHLIB_SPEC "\ | 629 #define LINK_SHLIB_SPEC "\ |
708 %{mshlib: %(link_path) } \ | |
709 %{!mshlib: %{!shared: %{!symbolic: -dn -Bstatic}}} \ | 630 %{!mshlib: %{!shared: %{!symbolic: -dn -Bstatic}}} \ |
710 %{static: } \ | 631 %{static: } \ |
711 %{shared:-G -dy -z text %(link_path) } \ | 632 %{shared:-G -dy -z text } \ |
712 %{symbolic:-Bsymbolic -G -dy -z text %(link_path) }" | 633 %{symbolic:-Bsymbolic -G -dy -z text }" |
713 #endif | |
714 | 634 |
715 /* Override the default target of the linker. */ | 635 /* Override the default target of the linker. */ |
716 #define LINK_TARGET_SPEC "\ | 636 #define LINK_TARGET_SPEC "\ |
717 %{mlittle: --oformat elf32-powerpcle } %{mlittle-endian: --oformat elf32-powerpcle } \ | 637 %{mlittle: --oformat elf32-powerpcle } %{mlittle-endian: --oformat elf32-powerpcle } \ |
718 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ | 638 %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ |
751 mcall-openbsd: %(cpp_os_openbsd) ; \ | 671 mcall-openbsd: %(cpp_os_openbsd) ; \ |
752 : %(cpp_os_default) }" | 672 : %(cpp_os_default) }" |
753 | 673 |
754 #define CPP_OS_DEFAULT_SPEC "" | 674 #define CPP_OS_DEFAULT_SPEC "" |
755 | 675 |
756 /* Override svr4.h definition. */ | |
757 #undef STARTFILE_SPEC | 676 #undef STARTFILE_SPEC |
758 #define STARTFILE_SPEC "\ | 677 #define STARTFILE_SPEC "\ |
759 %{mads : %(startfile_ads) ; \ | 678 %{mads : %(startfile_ads) ; \ |
760 myellowknife : %(startfile_yellowknife) ; \ | 679 myellowknife : %(startfile_yellowknife) ; \ |
761 mmvme : %(startfile_mvme) ; \ | 680 mmvme : %(startfile_mvme) ; \ |
767 mcall-openbsd: %(startfile_openbsd) ; \ | 686 mcall-openbsd: %(startfile_openbsd) ; \ |
768 : %(startfile_default) }" | 687 : %(startfile_default) }" |
769 | 688 |
770 #define STARTFILE_DEFAULT_SPEC "ecrti.o%s crtbegin.o%s" | 689 #define STARTFILE_DEFAULT_SPEC "ecrti.o%s crtbegin.o%s" |
771 | 690 |
772 /* Override svr4.h definition. */ | |
773 #undef LIB_SPEC | 691 #undef LIB_SPEC |
774 #define LIB_SPEC "\ | 692 #define LIB_SPEC "\ |
775 %{mads : %(lib_ads) ; \ | 693 %{mads : %(lib_ads) ; \ |
776 myellowknife : %(lib_yellowknife) ; \ | 694 myellowknife : %(lib_yellowknife) ; \ |
777 mmvme : %(lib_mvme) ; \ | 695 mmvme : %(lib_mvme) ; \ |
783 mcall-openbsd: %(lib_openbsd) ; \ | 701 mcall-openbsd: %(lib_openbsd) ; \ |
784 : %(lib_default) }" | 702 : %(lib_default) }" |
785 | 703 |
786 #define LIB_DEFAULT_SPEC "-lc" | 704 #define LIB_DEFAULT_SPEC "-lc" |
787 | 705 |
788 /* Override svr4.h definition. */ | |
789 #undef ENDFILE_SPEC | 706 #undef ENDFILE_SPEC |
790 #define ENDFILE_SPEC "\ | 707 #define ENDFILE_SPEC "\ |
791 %{mads : %(endfile_ads) ; \ | 708 %{mads : %(endfile_ads) ; \ |
792 myellowknife : %(endfile_yellowknife) ; \ | 709 myellowknife : %(endfile_yellowknife) ; \ |
793 mmvme : %(endfile_mvme) ; \ | 710 mmvme : %(endfile_mvme) ; \ |
865 #define ENDFILE_FREEBSD_SPEC FBSD_ENDFILE_SPEC | 782 #define ENDFILE_FREEBSD_SPEC FBSD_ENDFILE_SPEC |
866 #define LIB_FREEBSD_SPEC FBSD_LIB_SPEC | 783 #define LIB_FREEBSD_SPEC FBSD_LIB_SPEC |
867 #define LINK_START_FREEBSD_SPEC "" | 784 #define LINK_START_FREEBSD_SPEC "" |
868 | 785 |
869 #define LINK_OS_FREEBSD_SPEC "\ | 786 #define LINK_OS_FREEBSD_SPEC "\ |
870 %{p:%nconsider using `-pg' instead of `-p' with gprof(1)} \ | 787 %{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \ |
871 %{v:-V} \ | 788 %{v:-V} \ |
872 %{assert*} %{R*} %{rpath*} %{defsym*} \ | 789 %{assert*} %{R*} %{rpath*} %{defsym*} \ |
873 %{shared:-Bshareable %{h*} %{soname*}} \ | 790 %{shared:-Bshareable %{h*} %{soname*}} \ |
874 %{!shared: \ | 791 %{!shared: \ |
875 %{!static: \ | 792 %{!static: \ |
876 %{rdynamic: -export-dynamic} \ | 793 %{rdynamic: -export-dynamic} \ |
877 %{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }} \ | 794 -dynamic-linker %(fbsd_dynamic_linker) } \ |
878 %{static:-Bstatic}} \ | 795 %{static:-Bstatic}} \ |
879 %{symbolic:-Bsymbolic}" | 796 %{symbolic:-Bsymbolic}" |
880 | 797 |
881 /* GNU/Linux support. */ | 798 /* GNU/Linux support. */ |
882 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \ | 799 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \ |
901 | 818 |
902 #define LINK_START_LINUX_SPEC "" | 819 #define LINK_START_LINUX_SPEC "" |
903 | 820 |
904 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" | 821 #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" |
905 #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" | 822 #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" |
906 #if UCLIBC_DEFAULT | 823 #if DEFAULT_LIBC == LIBC_UCLIBC |
907 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}" | 824 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" |
825 #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC | |
826 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" | |
908 #else | 827 #else |
909 #define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}" | 828 #error "Unsupported DEFAULT_LIBC" |
910 #endif | 829 #endif |
911 #define LINUX_DYNAMIC_LINKER \ | 830 #define LINUX_DYNAMIC_LINKER \ |
912 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) | 831 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) |
913 | 832 |
914 #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ | 833 #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ |
915 %{rdynamic:-export-dynamic} \ | 834 %{rdynamic:-export-dynamic} \ |
916 %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}" | 835 -dynamic-linker " LINUX_DYNAMIC_LINKER "}}" |
917 | 836 |
918 #if defined(HAVE_LD_EH_FRAME_HDR) | 837 #if defined(HAVE_LD_EH_FRAME_HDR) |
919 # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " | 838 # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " |
920 #endif | 839 #endif |
921 | 840 |
942 | 861 |
943 #define LINK_START_GNU_SPEC "" | 862 #define LINK_START_GNU_SPEC "" |
944 | 863 |
945 #define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \ | 864 #define LINK_OS_GNU_SPEC "-m elf32ppclinux %{!shared: %{!static: \ |
946 %{rdynamic:-export-dynamic} \ | 865 %{rdynamic:-export-dynamic} \ |
947 %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}" | 866 -dynamic-linker /lib/ld.so.1}}" |
948 | 867 |
949 #define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__ \ | 868 #define CPP_OS_GNU_SPEC "-D__unix__ -D__gnu_hurd__ -D__GNU__ \ |
950 %{!undef: \ | 869 %{!undef: \ |
951 %{!ansi: -Dunix -D__unix}} \ | 870 %{!ansi: -Dunix -D__unix}} \ |
952 -Asystem=gnu -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}" | 871 -Asystem=gnu -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}" |
953 | 872 |
954 /* NetBSD support. */ | 873 /* NetBSD support. */ |
955 #define LIB_NETBSD_SPEC "\ | 874 #define LIB_NETBSD_SPEC "\ |
956 %{profile:-lgmon -lc_p} %{!profile:-lc}" | 875 -lc" |
957 | 876 |
958 #define STARTFILE_NETBSD_SPEC "\ | 877 #define STARTFILE_NETBSD_SPEC "\ |
959 ncrti.o%s crt0.o%s \ | 878 ncrti.o%s crt0.o%s \ |
960 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" | 879 %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" |
961 | 880 |
967 " | 886 " |
968 | 887 |
969 #define LINK_OS_NETBSD_SPEC "\ | 888 #define LINK_OS_NETBSD_SPEC "\ |
970 %{!shared: %{!static: \ | 889 %{!shared: %{!static: \ |
971 %{rdynamic:-export-dynamic} \ | 890 %{rdynamic:-export-dynamic} \ |
972 %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}}}" | 891 -dynamic-linker /usr/libexec/ld.elf_so}}" |
973 | 892 |
974 #define CPP_OS_NETBSD_SPEC "\ | 893 #define CPP_OS_NETBSD_SPEC "\ |
975 -D__powerpc__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__" | 894 -D__powerpc__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__" |
976 | 895 |
977 /* OpenBSD support. */ | 896 /* OpenBSD support. */ |
1035 { "endfile_gnu", ENDFILE_GNU_SPEC }, \ | 954 { "endfile_gnu", ENDFILE_GNU_SPEC }, \ |
1036 { "endfile_linux", ENDFILE_LINUX_SPEC }, \ | 955 { "endfile_linux", ENDFILE_LINUX_SPEC }, \ |
1037 { "endfile_netbsd", ENDFILE_NETBSD_SPEC }, \ | 956 { "endfile_netbsd", ENDFILE_NETBSD_SPEC }, \ |
1038 { "endfile_openbsd", ENDFILE_OPENBSD_SPEC }, \ | 957 { "endfile_openbsd", ENDFILE_OPENBSD_SPEC }, \ |
1039 { "endfile_default", ENDFILE_DEFAULT_SPEC }, \ | 958 { "endfile_default", ENDFILE_DEFAULT_SPEC }, \ |
1040 { "link_path", LINK_PATH_SPEC }, \ | |
1041 { "link_shlib", LINK_SHLIB_SPEC }, \ | 959 { "link_shlib", LINK_SHLIB_SPEC }, \ |
1042 { "link_target", LINK_TARGET_SPEC }, \ | 960 { "link_target", LINK_TARGET_SPEC }, \ |
1043 { "link_start", LINK_START_SPEC }, \ | 961 { "link_start", LINK_START_SPEC }, \ |
1044 { "link_start_ads", LINK_START_ADS_SPEC }, \ | 962 { "link_start_ads", LINK_START_ADS_SPEC }, \ |
1045 { "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \ | 963 { "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \ |
1098 #define PROFILE_BEFORE_PROLOGUE 1 | 1016 #define PROFILE_BEFORE_PROLOGUE 1 |
1099 | 1017 |
1100 /* Function name to call to do profiling. */ | 1018 /* Function name to call to do profiling. */ |
1101 #define RS6000_MCOUNT "_mcount" | 1019 #define RS6000_MCOUNT "_mcount" |
1102 | 1020 |
1103 /* Define this macro (to a value of 1) if you want to support the | |
1104 Win32 style pragmas #pragma pack(push,<n>)' and #pragma | |
1105 pack(pop)'. The pack(push,<n>) pragma specifies the maximum | |
1106 alignment (in bytes) of fields within a structure, in much the | |
1107 same way as the __aligned__' and __packed__' __attribute__'s | |
1108 do. A pack value of zero resets the behavior to the default. | |
1109 Successive invocations of this pragma cause the previous values to | |
1110 be stacked, so that invocations of #pragma pack(pop)' will return | |
1111 to the previous value. */ | |
1112 | |
1113 #define HANDLE_PRAGMA_PACK_PUSH_POP 1 | |
1114 | |
1115 /* Select a format to encode pointers in exception handling data. CODE | 1021 /* Select a format to encode pointers in exception handling data. CODE |
1116 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is | 1022 is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is |
1117 true if the symbol may be affected by dynamic relocations. */ | 1023 true if the symbol may be affected by dynamic relocations. */ |
1118 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ | 1024 #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ |
1119 ((flag_pic || TARGET_RELOCATABLE) \ | 1025 ((flag_pic || TARGET_RELOCATABLE) \ |
1123 #define DOUBLE_INT_ASM_OP "\t.quad\t" | 1029 #define DOUBLE_INT_ASM_OP "\t.quad\t" |
1124 | 1030 |
1125 /* Generate entries in .fixup for relocatable addresses. */ | 1031 /* Generate entries in .fixup for relocatable addresses. */ |
1126 #define RELOCATABLE_NEEDS_FIXUP 1 | 1032 #define RELOCATABLE_NEEDS_FIXUP 1 |
1127 | 1033 |
1034 #define TARGET_ASM_FILE_END rs6000_elf_file_end | |
1035 | |
1128 /* This target uses the sysv4.opt file. */ | 1036 /* This target uses the sysv4.opt file. */ |
1129 #define TARGET_USES_SYSV4_OPT 1 | 1037 #define TARGET_USES_SYSV4_OPT 1 |
1038 | |
1039 #undef DBX_REGISTER_NUMBER |