]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/gcc/config/i386/sol2-10.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / gcc / config / i386 / sol2-10.h
1 /* Solaris 10 configuration.
2    Copyright (C) 2004 Free Software Foundation, Inc.
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
19 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.  */
21
22 #undef ASM_COMMENT_START
23 #define ASM_COMMENT_START "/"
24
25 /* binutils' GNU as understands --32 and --64, but the native Solaris
26    assembler requires -xarch=generic or -xarch=generic64 instead.  */
27 #undef ASM_SPEC
28 #ifdef USE_GAS
29 #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} " \
30                  "%{Wa,*:%*} %{m32:--32} %{m64:--64} -s %(asm_cpu)"
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
36
37 #undef NO_PROFILE_COUNTERS
38
39 #undef MCOUNT_NAME
40 #define MCOUNT_NAME "_mcount"
41
42 #undef WCHAR_TYPE
43 #define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")
44 #undef WCHAR_TYPE_SIZE
45 #define WCHAR_TYPE_SIZE 32
46
47 #undef WINT_TYPE
48 #define WINT_TYPE (TARGET_64BIT ? "int" : "long int")
49 #undef WINT_TYPE_SIZE
50 #define WINT_TYPE_SIZE 32
51
52 #define SUBTARGET_OVERRIDE_OPTIONS                              \
53   do                                                            \
54     {                                                           \
55       if (flag_omit_frame_pointer == 2)                         \
56         flag_omit_frame_pointer = 0;                            \
57     }                                                           \
58   while (0)
59
60 #undef TARGET_SUBTARGET_DEFAULT
61 #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP     \
62                                   | MASK_FLOAT_RETURNS)
63
64 #define SUBTARGET_OPTIMIZATION_OPTIONS                  \
65   do                                                    \
66     {                                                   \
67       if (optimize >= 1)                                \
68         target_flags |= MASK_OMIT_LEAF_FRAME_POINTER;   \
69     }                                                   \
70   while (0)
71
72 #define MULTILIB_DEFAULTS { "m32" }
73
74 #undef LINK_ARCH64_SPEC_BASE
75 #define LINK_ARCH64_SPEC_BASE \
76   "%{G:-G} \
77    %{YP,*} \
78    %{R*} \
79    %{compat-bsd: \
80      %{!YP,*:%{p|pg:-Y P,/usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64} \
81              %{!p:%{!pg:-Y P,/usr/ucblib/64:/lib:/usr/lib/64}}} \
82              -R /usr/ucblib/64} \
83    %{!compat-bsd: \
84      %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64} \
85              %{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}}}"
86
87 #undef LINK_ARCH64_SPEC
88 #define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
89
90 #ifdef TARGET_GNU_LD
91 #define TARGET_LD_EMULATION "%{m64:-m elf_x86_64}%{!m64:-m elf_i386} "
92 #else
93 #define TARGET_LD_EMULATION ""
94 #endif
95
96 #undef LINK_ARCH_SPEC
97 #define LINK_ARCH_SPEC TARGET_LD_EMULATION \
98                        "%{m64:" LINK_ARCH64_SPEC "}%{!m64:" LINK_ARCH32_SPEC "}"
99
100 /* We do not need to search a special directory for startup files.  */
101 #undef MD_STARTFILE_PREFIX
102
103 #undef TARGET_ASM_NAMED_SECTION
104 #define TARGET_ASM_NAMED_SECTION i386_solaris_elf_named_section
105
106 /* In 32-bit mode, follow the SVR4 ABI definition; in 64-bit mode, use
107    the AMD64 ABI definition.  */
108 #undef RETURN_IN_MEMORY
109 #define RETURN_IN_MEMORY(TYPE)                  \
110   (TARGET_64BIT                                 \
111    ? ix86_return_in_memory (TYPE)               \
112    : (TYPE_MODE (TYPE) == BLKmode               \
113       || (VECTOR_MODE_P (TYPE_MODE (TYPE))      \
114           && int_size_in_bytes (TYPE) == 8)))