]>
Commit | Line | Data |
---|---|---|
a8e68029 | 1 | /* Solaris 10 configuration. |
68b92f78 | 2 | Copyright (C) 2004, 2006 Free Software Foundation, Inc. |
a8e68029 DJ |
3 | Contributed by CodeSourcery, LLC. |
4 | ||
5 | This file is part of GCC. | |
6 | ||
7 | 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 | the Free Software Foundation; either version 2, or (at your option) | |
10 | any later version. | |
11 | ||
12 | GCC is distributed in the hope that it will be useful, | |
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 | |
18 | along with GCC; see the file COPYING. If not, write to | |
39d14dda KC |
19 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
20 | Boston, MA 02110-1301, USA. */ | |
a8e68029 DJ |
21 | |
22 | #undef ASM_COMMENT_START | |
23 | #define ASM_COMMENT_START "/" | |
24 | ||
79387e57 RS |
25 | /* binutils' GNU as understands --32 and --64, but the native Solaris |
26 | assembler requires -xarch=generic or -xarch=generic64 instead. */ | |
a8e68029 | 27 | #undef ASM_SPEC |
79387e57 | 28 | #ifdef USE_GAS |
a8e68029 DJ |
29 | #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} " \ |
30 | "%{Wa,*:%*} %{m32:--32} %{m64:--64} -s %(asm_cpu)" | |
79387e57 RS |
31 | #else |
32 | #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} " \ | |
33 | "%{Wa,*:%*} %{m32:-xarch=generic} %{m64:-xarch=generic64} " \ | |
34 | "-s %(asm_cpu)" | |
35 | #endif | |
a8e68029 | 36 | |
68b92f78 RS |
37 | /* The native Solaris assembler can't calculate the difference between |
38 | symbols in different sections, which causes problems for -fPIC jump | |
39 | tables in .rodata. */ | |
40 | #ifndef HAVE_AS_IX86_DIFF_SECT_DELTA | |
41 | #undef JUMP_TABLES_IN_TEXT_SECTION | |
42 | #define JUMP_TABLES_IN_TEXT_SECTION 1 | |
43 | #endif | |
44 | ||
a8e68029 DJ |
45 | #undef NO_PROFILE_COUNTERS |
46 | ||
47 | #undef MCOUNT_NAME | |
48 | #define MCOUNT_NAME "_mcount" | |
49 | ||
50 | #undef WCHAR_TYPE | |
51 | #define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int") | |
52 | #undef WCHAR_TYPE_SIZE | |
53 | #define WCHAR_TYPE_SIZE 32 | |
54 | ||
55 | #undef WINT_TYPE | |
56 | #define WINT_TYPE (TARGET_64BIT ? "int" : "long int") | |
57 | #undef WINT_TYPE_SIZE | |
58 | #define WINT_TYPE_SIZE 32 | |
59 | ||
60 | #define SUBTARGET_OVERRIDE_OPTIONS \ | |
61 | do \ | |
62 | { \ | |
63 | if (flag_omit_frame_pointer == 2) \ | |
64 | flag_omit_frame_pointer = 0; \ | |
65 | } \ | |
66 | while (0) | |
67 | ||
68 | #undef TARGET_SUBTARGET_DEFAULT | |
69 | #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP \ | |
4f514514 JM |
70 | | MASK_FLOAT_RETURNS) |
71 | ||
72 | #define SUBTARGET_OPTIMIZATION_OPTIONS \ | |
73 | do \ | |
74 | { \ | |
75 | if (optimize >= 1) \ | |
76 | target_flags |= MASK_OMIT_LEAF_FRAME_POINTER; \ | |
77 | } \ | |
78 | while (0) | |
a8e68029 DJ |
79 | |
80 | #define MULTILIB_DEFAULTS { "m32" } | |
81 | ||
82 | #undef LINK_ARCH64_SPEC_BASE | |
83 | #define LINK_ARCH64_SPEC_BASE \ | |
84 | "%{G:-G} \ | |
85 | %{YP,*} \ | |
86 | %{R*} \ | |
87 | %{compat-bsd: \ | |
88 | %{!YP,*:%{p|pg:-Y P,/usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64} \ | |
89 | %{!p:%{!pg:-Y P,/usr/ucblib/64:/lib:/usr/lib/64}}} \ | |
90 | -R /usr/ucblib/64} \ | |
91 | %{!compat-bsd: \ | |
92 | %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64} \ | |
93 | %{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}}}" | |
94 | ||
95 | #undef LINK_ARCH64_SPEC | |
96 | #define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE | |
97 | ||
98 | #ifdef TARGET_GNU_LD | |
99 | #define TARGET_LD_EMULATION "%{m64:-m elf_x86_64}%{!m64:-m elf_i386} " | |
100 | #else | |
101 | #define TARGET_LD_EMULATION "" | |
102 | #endif | |
103 | ||
104 | #undef LINK_ARCH_SPEC | |
105 | #define LINK_ARCH_SPEC TARGET_LD_EMULATION \ | |
106 | "%{m64:" LINK_ARCH64_SPEC "}%{!m64:" LINK_ARCH32_SPEC "}" | |
107 | ||
108 | /* We do not need to search a special directory for startup files. */ | |
109 | #undef MD_STARTFILE_PREFIX | |
110 | ||
111 | #undef TARGET_ASM_NAMED_SECTION | |
112 | #define TARGET_ASM_NAMED_SECTION i386_solaris_elf_named_section | |
113 | ||
114 | /* In 32-bit mode, follow the SVR4 ABI definition; in 64-bit mode, use | |
115 | the AMD64 ABI definition. */ | |
116 | #undef RETURN_IN_MEMORY | |
117 | #define RETURN_IN_MEMORY(TYPE) \ | |
118 | (TARGET_64BIT \ | |
119 | ? ix86_return_in_memory (TYPE) \ | |
120 | : (TYPE_MODE (TYPE) == BLKmode \ | |
121 | || (VECTOR_MODE_P (TYPE_MODE (TYPE)) \ | |
122 | && int_size_in_bytes (TYPE) == 8))) |