]>
Commit | Line | Data |
---|---|---|
56149abc | 1 | /* Definitions for Sun SPARC64 running FreeBSD using the ELF format |
8d9254fc | 2 | Copyright (C) 2001-2020 Free Software Foundation, Inc. |
c7240cbd DB |
3 | Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi. |
4 | ||
de0a398e | 5 | This file is part of GCC. |
c7240cbd | 6 | |
de0a398e | 7 | GCC is free software; you can redistribute it and/or modify |
c7240cbd | 8 | it under the terms of the GNU General Public License as published by |
2f83c7d6 | 9 | the Free Software Foundation; either version 3, or (at your option) |
c7240cbd DB |
10 | any later version. |
11 | ||
de0a398e | 12 | GCC is distributed in the hope that it will be useful, |
c7240cbd DB |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
2f83c7d6 NC |
18 | along with GCC; see the file COPYING3. If not see |
19 | <http://www.gnu.org/licenses/>. */ | |
2de2f846 | 20 | |
4d980568 | 21 | #undef SUBTARGET_EXTRA_SPECS |
2de2f846 DB |
22 | #define SUBTARGET_EXTRA_SPECS \ |
23 | { "fbsd_dynamic_linker", FBSD_DYNAMIC_LINKER } | |
24 | ||
fa123c53 | 25 | /* FreeBSD needs the platform name (sparc64) defined. |
999a7d80 MS |
26 | Emacs etc needs to know if the arch is 64 or 32-bits. |
27 | This also selects which targets are available via -mcpu. */ | |
28 | ||
29 | #undef FBSD_TARGET_CPU_CPP_BUILTINS | |
30 | #define FBSD_TARGET_CPU_CPP_BUILTINS() \ | |
31 | do \ | |
32 | { \ | |
33 | builtin_define ("__sparc64__"); \ | |
34 | builtin_define ("__sparc__"); \ | |
35 | builtin_define ("__sparc_v9__"); \ | |
36 | builtin_define ("__sparcv9"); \ | |
37 | } \ | |
38 | while (0) | |
c7240cbd | 39 | |
295d926b | 40 | #undef ASM_SPEC |
428b3812 | 41 | #define ASM_SPEC "%{" FPIE_OR_FPIC_SPEC ":-K PIC} %(asm_cpu)" |
295d926b | 42 | |
54e20385 | 43 | #define LINK_SPEC "%(link_arch) \ |
b1138bf3 | 44 | %{!mno-relax:%{!r:-relax}} \ |
d8a07487 | 45 | %{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \ |
c7240cbd DB |
46 | %{assert*} %{R*} %{rpath*} %{defsym*} \ |
47 | %{shared:-Bshareable %{h*} %{soname*}} \ | |
48 | %{symbolic:-Bsymbolic} \ | |
49 | %{!shared: \ | |
50 | %{!static: \ | |
51 | %{rdynamic:-export-dynamic} \ | |
e59dabd2 | 52 | -dynamic-linker %(fbsd_dynamic_linker) } \ |
c7240cbd DB |
53 | %{static:-Bstatic}}" |
54 | ||
55 | ||
56 | /************************[ Target stuff ]***********************************/ | |
57 | ||
58 | /* Define the actual types of some ANSI-mandated types. | |
59 | Needs to agree with <machine/ansi.h>. GCC defaults come from c-decl.c, | |
60 | c-common.c, and config/<arch>/<arch>.h. */ | |
61 | ||
62 | /* Earlier headers may get this wrong for FreeBSD. | |
63 | We use the GCC defaults instead. */ | |
64 | #undef WCHAR_TYPE | |
65 | ||
c7240cbd DB |
66 | #undef WCHAR_TYPE_SIZE |
67 | #define WCHAR_TYPE_SIZE 32 | |
68 | ||
ba31d94e | 69 | /* Define for support of TFmode long double. |
56149abc | 70 | SPARC ABI says that long double is 4 words. */ |
c7240cbd DB |
71 | #undef LONG_DOUBLE_TYPE_SIZE |
72 | #define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_128 ? 128 : 64) | |
73 | ||
c7240cbd DB |
74 | /* Definitions for 64-bit SPARC running systems with ELF. */ |
75 | ||
c7240cbd DB |
76 | #define TARGET_ELF 1 |
77 | ||
78 | /* XXX */ | |
79 | /* A 64 bit v9 compiler with stack-bias, | |
80 | in a Medium/mid code model environment. */ | |
81 | ||
82 | #undef TARGET_DEFAULT | |
83 | #define TARGET_DEFAULT \ | |
e0054185 | 84 | (MASK_V9 + MASK_64BIT + MASK_PTR64 /* + MASK_FASTER_STRUCTS */ \ |
33074e5f | 85 | + MASK_STACK_BIAS + MASK_APP_REGS + MASK_FPU \ |
c7240cbd DB |
86 | + MASK_LONG_DOUBLE_128 /* + MASK_HARD_QUAD */) |
87 | ||
88 | /* The default code model. */ | |
89 | #undef SPARC_DEFAULT_CMODEL | |
7a31a340 | 90 | #define SPARC_DEFAULT_CMODEL CM_MEDLOW |
c7240cbd | 91 | |
10e48e39 | 92 | #define HAVE_ENABLE_EXECUTE_STACK |
c7240cbd DB |
93 | |
94 | /************************[ Assembler stuff ]********************************/ | |
95 | ||
59f96879 RH |
96 | #undef LOCAL_LABEL_PREFIX |
97 | #define LOCAL_LABEL_PREFIX "." | |
98 | ||
c7240cbd DB |
99 | /* XXX2 */ |
100 | /* This is how to store into the string LABEL | |
101 | the symbol_ref name of an internal numbered label where | |
102 | PREFIX is the class of label and NUM is the number within the class. | |
103 | This is suitable for output with `assemble_name'. */ | |
104 | ||
105 | #undef ASM_GENERATE_INTERNAL_LABEL | |
106 | #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ | |
74eda121 | 107 | sprintf (LABEL, "*.L%s%lu", PREFIX, (unsigned long)(NUM)) |
c7240cbd DB |
108 | |
109 | ||
110 | /************************[ Debugger stuff ]*********************************/ | |
111 | ||
112 | /* This is the char to use for continuation (in case we need to turn | |
113 | continuation back on). */ | |
114 | ||
115 | #undef DBX_CONTIN_CHAR | |
116 | #define DBX_CONTIN_CHAR '?' | |
117 | ||
118 | /* DWARF bits. */ | |
119 | ||
120 | /* Follow Irix 6 and not the Dwarf2 draft in using 64-bit offsets. | |
121 | Obviously the Dwarf2 folks havn't tried to actually build systems | |
122 | with their spec. On a 64-bit system, only 64-bit relocs become | |
123 | RELATIVE relocations. */ | |
124 | ||
125 | /* #define DWARF_OFFSET_SIZE PTR_SIZE */ | |
2d69e3cb | 126 | |
999a7d80 MS |
127 | #ifdef HAVE_AS_TLS |
128 | #undef TARGET_SUN_TLS | |
129 | #undef TARGET_GNU_TLS | |
130 | #define TARGET_SUN_TLS 0 | |
131 | #define TARGET_GNU_TLS 1 | |
132 | #endif | |
133 | ||
2d69e3cb | 134 | #undef ENDFILE_SPEC |
f767d794 | 135 | #define ENDFILE_SPEC \ |
0691dde9 | 136 | "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \ |
f767d794 | 137 | FBSD_ENDFILE_SPEC |
7a31a340 DM |
138 | |
139 | /* We use GNU ld so undefine this so that attribute((init_priority)) works. */ | |
140 | #undef CTORS_SECTION_ASM_OP | |
141 | #undef DTORS_SECTION_ASM_OP |