1 /* Definitions of target machine for GCC, for bi-arch Solaris 2.
2 Copyright (C) 2011 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 Under Section 7 of GPL version 3, you are granted additional
17 permissions described in the GCC Runtime Library Exception, version
18 3.1, as published by the Free Software Foundation.
20 You should have received a copy of the GNU General Public License and
21 a copy of the GCC Runtime Library Exception along with this program;
22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 <http://www.gnu.org/licenses/>. */
25 /* wchar_t is called differently in <wchar.h> for 32 and 64-bit
26 compilations. This is called for by SCD 2.4.1, p. 6-83, Figure 6-65
27 (32-bit) and p. 6P-10, Figure 6.38 (64-bit). */
30 #define WCHAR_TYPE (TARGET_64BIT ? "int" : "long int")
32 #undef WCHAR_TYPE_SIZE
33 #define WCHAR_TYPE_SIZE 32
35 /* Same for wint_t. See SCD 2.4.1, p. 6-83, Figure 6-66 (32-bit). There's
36 no corresponding 64-bit definition, but this is what Solaris 8
37 <iso/wchar_iso.h> uses. */
40 #define WINT_TYPE (TARGET_64BIT ? "int" : "long int")
43 #define WINT_TYPE_SIZE 32
46 #define MULTILIB_DEFAULTS { "m32" }
48 #define MULTILIB_DEFAULTS { "m64" }
52 #define DEF_ARCH32_SPEC(__str) "%{!m64:" __str "}"
53 #define DEF_ARCH64_SPEC(__str) "%{m64:" __str "}"
55 #define DEF_ARCH32_SPEC(__str) "%{m32:" __str "}"
56 #define DEF_ARCH64_SPEC(__str) "%{!m32:" __str "}"
59 /* This should be the same as LINK_ARCH32_SPEC_BASE, except with
60 ARCH64_SUBDIR appended to the paths and /usr/ccs/lib is no longer
62 #undef LINK_ARCH64_SPEC_BASE
63 #define LINK_ARCH64_SPEC_BASE \
67 %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "} \
68 %{!p:%{!pg:-Y P,%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "}}}"
70 #undef LINK_ARCH64_SPEC
72 /* FIXME: Used to be SPARC-only. Not SPARC-specfic but for the model name! */
73 #define LINK_ARCH64_SPEC \
74 "%{mcmodel=medlow:-M /usr/lib/ld/" ARCH64_SUBDIR "/map.below4G} " \
77 #define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
81 #define TARGET_LD_EMULATION "%{m32:-m " ARCH32_EMULATION "}" \
82 "%{m64:-m " ARCH64_EMULATION "} "
84 #define TARGET_LD_EMULATION ""
90 #define LINK_ARCH_SPEC TARGET_LD_EMULATION " \
91 %{m32:%(link_arch32)} \
92 %{m64:%edoes not support multilib} \
93 %{!m32:%{!m64:%(link_arch_default)}} \
96 #define LINK_ARCH_SPEC TARGET_LD_EMULATION " \
97 %{m32:%edoes not support multilib} \
98 %{m64:%(link_arch64)} \
99 %{!m32:%{!m64:%(link_arch_default)}} \
103 #define LINK_ARCH_SPEC TARGET_LD_EMULATION " \
104 %{m32:%(link_arch32)} \
105 %{m64:%(link_arch64)} \
106 %{!m32:%{!m64:%(link_arch_default)}}"
109 #define LINK_ARCH_DEFAULT_SPEC \
110 (DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC)
112 #undef SUBTARGET_EXTRA_SPECS
113 #define SUBTARGET_EXTRA_SPECS \
114 { "startfile_arch", STARTFILE_ARCH_SPEC }, \
115 { "link_arch32", LINK_ARCH32_SPEC }, \
116 { "link_arch64", LINK_ARCH64_SPEC }, \
117 { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
118 { "link_arch", LINK_ARCH_SPEC }, \
119 SUBTARGET_CPU_EXTRA_SPECS