1 /* Definitions of target machine for GCC, for bi-arch Solaris 2.
2 Copyright (C) 2011-2013 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 #undef ASM_CPU_DEFAULT_SPEC
60 #define ASM_CPU_DEFAULT_SPEC \
61 (DEFAULT_ARCH32_P ? "\
62 %{m64:" ASM_CPU64_DEFAULT_SPEC "} \
63 %{!m64:" ASM_CPU32_DEFAULT_SPEC "} \
65 %{m32:" ASM_CPU32_DEFAULT_SPEC "} \
66 %{!m32:" ASM_CPU64_DEFAULT_SPEC "} \
69 /* This should be the same as LINK_ARCH32_SPEC_BASE, except with
70 ARCH64_SUBDIR appended to the paths and /usr/ccs/lib is no longer
72 #undef LINK_ARCH64_SPEC_BASE
73 #define LINK_ARCH64_SPEC_BASE \
77 %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "} \
78 %{!p:%{!pg:-Y P,%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "}}}"
80 #undef LINK_ARCH64_SPEC
82 /* FIXME: Used to be SPARC-only. Not SPARC-specfic but for the model name! */
83 #define LINK_ARCH64_SPEC \
84 "%{mcmodel=medlow:-M /usr/lib/ld/" ARCH64_SUBDIR "/map.below4G} " \
87 #define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
92 #define ARCH_DEFAULT_EMULATION ARCH32_EMULATION
94 #define ARCH_DEFAULT_EMULATION ARCH64_EMULATION
96 #define TARGET_LD_EMULATION "%{m32:-m " ARCH32_EMULATION "}" \
97 "%{m64:-m " ARCH64_EMULATION "}" \
98 "%{!m32:%{!m64:-m " ARCH_DEFAULT_EMULATION "}} "
100 #define TARGET_LD_EMULATION ""
103 #undef LINK_ARCH_SPEC
106 #define LINK_ARCH_SPEC TARGET_LD_EMULATION " \
107 %{m32:%(link_arch32)} \
108 %{m64:%edoes not support multilib} \
109 %{!m32:%{!m64:%(link_arch_default)}} \
112 #define LINK_ARCH_SPEC TARGET_LD_EMULATION " \
113 %{m32:%edoes not support multilib} \
114 %{m64:%(link_arch64)} \
115 %{!m32:%{!m64:%(link_arch_default)}} \
119 #define LINK_ARCH_SPEC TARGET_LD_EMULATION " \
120 %{m32:%(link_arch32)} \
121 %{m64:%(link_arch64)} \
122 %{!m32:%{!m64:%(link_arch_default)}}"
125 #define LINK_ARCH_DEFAULT_SPEC \
126 (DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC)
128 #undef SUBTARGET_EXTRA_SPECS
129 #define SUBTARGET_EXTRA_SPECS \
130 { "startfile_arch", STARTFILE_ARCH_SPEC }, \
131 { "link_arch32", LINK_ARCH32_SPEC }, \
132 { "link_arch64", LINK_ARCH64_SPEC }, \
133 { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
134 { "link_arch", LINK_ARCH_SPEC }, \
135 SUBTARGET_CPU_EXTRA_SPECS