1/* Solaris 10 configuration. 2 Copyright (C) 2004 Free Software Foundation, Inc. 3 Contributed by CodeSourcery, LLC. 4 5This file is part of GCC. 6 7GCC is free software; you can redistribute it and/or modify 8it under the terms of the GNU General Public License as published by 9the Free Software Foundation; either version 2, or (at your option) 10any later version. 11 12GCC is distributed in the hope that it will be useful, 13but WITHOUT ANY WARRANTY; without even the implied warranty of 14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15GNU General Public License for more details. 16 17You should have received a copy of the GNU General Public License 18along with GCC; see the file COPYING. If not, write to 19the Free Software Foundation, 51 Franklin Street, Fifth Floor, 20Boston, MA 02110-1301, USA. */ 21 22#undef ASM_COMMENT_START 23#define ASM_COMMENT_START "/" 24 25#undef ASM_SPEC 26#define ASM_SPEC "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} " \ 27 "%{Wa,*:%*} %{m32:--32} %{m64:--64} -s %(asm_cpu)" 28 29#undef NO_PROFILE_COUNTERS 30 31#undef MCOUNT_NAME 32#define MCOUNT_NAME "_mcount" 33 34#undef WCHAR_TYPE 35#define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int") 36#undef WCHAR_TYPE_SIZE 37#define WCHAR_TYPE_SIZE 32 38 39#undef WINT_TYPE 40#define WINT_TYPE (TARGET_64BIT ? "int" : "long int") 41#undef WINT_TYPE_SIZE 42#define WINT_TYPE_SIZE 32 43 44#define SUBTARGET_OVERRIDE_OPTIONS \ 45 do \ 46 { \ 47 if (flag_omit_frame_pointer == 2) \ 48 flag_omit_frame_pointer = 0; \ 49 } \ 50 while (0) 51 52#undef TARGET_SUBTARGET_DEFAULT 53#define TARGET_SUBTARGET_DEFAULT (MASK_80387 | MASK_IEEE_FP \ 54 | MASK_FLOAT_RETURNS) 55 56#define SUBTARGET_OPTIMIZATION_OPTIONS \ 57 do \ 58 { \ 59 if (optimize >= 1) \ 60 target_flags |= MASK_OMIT_LEAF_FRAME_POINTER; \ 61 } \ 62 while (0) 63 64#define MULTILIB_DEFAULTS { "m32" } 65 66#undef LINK_ARCH64_SPEC_BASE 67#define LINK_ARCH64_SPEC_BASE \ 68 "%{G:-G} \ 69 %{YP,*} \ 70 %{R*} \ 71 %{compat-bsd: \ 72 %{!YP,*:%{p|pg:-Y P,/usr/ucblib/64:/usr/lib/libp/64:/lib/64:/usr/lib/64} \ 73 %{!p:%{!pg:-Y P,/usr/ucblib/64:/lib:/usr/lib/64}}} \ 74 -R /usr/ucblib/64} \ 75 %{!compat-bsd: \ 76 %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64} \ 77 %{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}}}" 78 79#undef LINK_ARCH64_SPEC 80#define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE 81 82#ifdef TARGET_GNU_LD 83#define TARGET_LD_EMULATION "%{m64:-m elf_x86_64}%{!m64:-m elf_i386} " 84#else 85#define TARGET_LD_EMULATION "" 86#endif 87 88#undef LINK_ARCH_SPEC 89#define LINK_ARCH_SPEC TARGET_LD_EMULATION \ 90 "%{m64:" LINK_ARCH64_SPEC "}%{!m64:" LINK_ARCH32_SPEC "}" 91 92/* We do not need to search a special directory for startup files. */ 93#undef MD_STARTFILE_PREFIX 94 95#undef TARGET_ASM_NAMED_SECTION 96#define TARGET_ASM_NAMED_SECTION i386_solaris_elf_named_section 97 98/* In 32-bit mode, follow the SVR4 ABI definition; in 64-bit mode, use 99 the AMD64 ABI definition. */ 100#undef RETURN_IN_MEMORY 101#define RETURN_IN_MEMORY(TYPE) \ 102 (TARGET_64BIT \ 103 ? ix86_return_in_memory (TYPE) \ 104 : (TYPE_MODE (TYPE) == BLKmode \ 105 || (VECTOR_MODE_P (TYPE_MODE (TYPE)) \ 106 && int_size_in_bytes (TYPE) == 8))) 107