2008-11-18 Kai Tietz <kai.tietz@onevision.com>
[official-gcc.git] / gcc / config / i386 / sol2-10.h
blobbd5c63781af9c971f277eff083e057365336b5e0
1 /* Solaris 10 configuration.
2 Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
3 Contributed by CodeSourcery, LLC.
5 This file is part of GCC.
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 3, or (at your option)
10 any later version.
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.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 #undef ASM_COMMENT_START
22 #define ASM_COMMENT_START "/"
24 /* binutils' GNU as understands --32 and --64, but the native Solaris
25 assembler requires -xarch=generic or -xarch=generic64 instead. */
26 #undef ASM_SPEC
27 #ifdef USE_GAS
28 #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} " \
29 "%{Wa,*:%*} %{m32:--32} %{m64:--64} -s %(asm_cpu)"
30 #else
31 #define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} " \
32 "%{Wa,*:%*} %{m32:-xarch=generic} %{m64:-xarch=generic64} " \
33 "-s %(asm_cpu)"
34 #endif
36 /* The native Solaris assembler can't calculate the difference between
37 symbols in different sections, which causes problems for -fPIC jump
38 tables in .rodata. */
39 #ifndef HAVE_AS_IX86_DIFF_SECT_DELTA
40 #undef JUMP_TABLES_IN_TEXT_SECTION
41 #define JUMP_TABLES_IN_TEXT_SECTION 1
42 #endif
44 #undef NO_PROFILE_COUNTERS
46 #undef MCOUNT_NAME
47 #define MCOUNT_NAME "_mcount"
49 #undef WCHAR_TYPE
50 #define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")
51 #undef WCHAR_TYPE_SIZE
52 #define WCHAR_TYPE_SIZE 32
54 #undef WINT_TYPE
55 #define WINT_TYPE (TARGET_64BIT ? "int" : "long int")
56 #undef WINT_TYPE_SIZE
57 #define WINT_TYPE_SIZE 32
59 #define SUBTARGET_OVERRIDE_OPTIONS \
60 do \
61 { \
62 if (flag_omit_frame_pointer == 2) \
63 flag_omit_frame_pointer = 0; \
64 } \
65 while (0)
67 #undef TARGET_SUBTARGET_DEFAULT
68 #define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP \
69 | MASK_FLOAT_RETURNS)
71 #define SUBTARGET_OPTIMIZATION_OPTIONS \
72 do \
73 { \
74 if (optimize >= 1) \
75 target_flags |= MASK_OMIT_LEAF_FRAME_POINTER; \
76 } \
77 while (0)
79 #define MULTILIB_DEFAULTS { "m32" }
81 #undef LINK_ARCH64_SPEC_BASE
82 #define LINK_ARCH64_SPEC_BASE \
83 "%{G:-G} \
84 %{YP,*} \
85 %{R*} \
86 %{compat-bsd: \
87 %{!YP,*:%{p|pg:-Y P,/usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64} \
88 %{!p:%{!pg:-Y P,/usr/ucblib/64:/lib:/usr/lib/64}}} \
89 -R /usr/ucblib/64} \
90 %{!compat-bsd: \
91 %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64} \
92 %{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}}}"
94 #undef LINK_ARCH64_SPEC
95 #define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
97 #ifdef TARGET_GNU_LD
98 #define TARGET_LD_EMULATION "%{m64:-m elf_x86_64}%{!m64:-m elf_i386} "
99 #else
100 #define TARGET_LD_EMULATION ""
101 #endif
103 #undef LINK_ARCH_SPEC
104 #define LINK_ARCH_SPEC TARGET_LD_EMULATION \
105 "%{m64:" LINK_ARCH64_SPEC "}%{!m64:" LINK_ARCH32_SPEC "}"
107 /* We do not need to search a special directory for startup files. */
108 #undef MD_STARTFILE_PREFIX
110 #undef TARGET_ASM_NAMED_SECTION
111 #define TARGET_ASM_NAMED_SECTION i386_solaris_elf_named_section
113 #undef SUBTARGET_RETURN_IN_MEMORY
114 #define SUBTARGET_RETURN_IN_MEMORY(TYPE, FNTYPE) \
115 ix86_sol10_return_in_memory (TYPE, FNTYPE)