Deleted Added
full compact
sol2.h (90075) sol2.h (96263)
1/* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
1/* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
2 Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000,
3 2001 Free Software Foundation, Inc.
2 Copyright 1992, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
3 Free Software Foundation, Inc.
4 Contributed by Ron Guilmette (rfg@netcom.com).
5 Additional changes by David V. Henkel-Wallace (gumby@cygnus.com).
6
7This file is part of GNU CC.
8
9GNU CC is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 2, or (at your option)

--- 6 unchanged lines hidden (view full) ---

18
19You should have received a copy of the GNU General Public License
20along with GNU CC; see the file COPYING. If not, write to
21the Free Software Foundation, 59 Temple Place - Suite 330,
22Boston, MA 02111-1307, USA. */
23
24/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
25
4 Contributed by Ron Guilmette (rfg@netcom.com).
5 Additional changes by David V. Henkel-Wallace (gumby@cygnus.com).
6
7This file is part of GNU CC.
8
9GNU CC is free software; you can redistribute it and/or modify
10it under the terms of the GNU General Public License as published by
11the Free Software Foundation; either version 2, or (at your option)

--- 6 unchanged lines hidden (view full) ---

18
19You should have received a copy of the GNU General Public License
20along with GNU CC; see the file COPYING. If not, write to
21the Free Software Foundation, 59 Temple Place - Suite 330,
22Boston, MA 02111-1307, USA. */
23
24/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
25
26/* Solaris 2 (at least as of 2.5.1) uses a 32-bit wchar_t. */
27#undef WCHAR_TYPE
28#define WCHAR_TYPE "long int"
29
30#undef WCHAR_TYPE_SIZE
31#define WCHAR_TYPE_SIZE 32
32
26/* Solaris 2 uses a wint_t different from the default. This is required
27 by the SCD 2.4.1, p. 6-83, Figure 6-66. */
28#undef WINT_TYPE
29#define WINT_TYPE "long int"
30
31#undef WINT_TYPE_SIZE
33/* Solaris 2 uses a wint_t different from the default. This is required
34 by the SCD 2.4.1, p. 6-83, Figure 6-66. */
35#undef WINT_TYPE
36#define WINT_TYPE "long int"
37
38#undef WINT_TYPE_SIZE
32#define WINT_TYPE_SIZE BITS_PER_WORD
39#define WINT_TYPE_SIZE 32
33
40
41#define HANDLE_PRAGMA_REDEFINE_EXTNAME 1
42
34#undef CPP_PREDEFINES
35#define CPP_PREDEFINES \
43#undef CPP_PREDEFINES
44#define CPP_PREDEFINES \
36"-Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 \
45"-Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__PRAGMA_REDEFINE_EXTNAME \
37-Asystem=unix -Asystem=svr4"
38
39#undef CPP_SUBTARGET_SPEC
40#define CPP_SUBTARGET_SPEC "\
41%{pthreads:-D_REENTRANT -D_PTHREADS} \
42%{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \
43%{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude} \
44"

--- 30 unchanged lines hidden (view full) ---

75%{mcpu=v8plus:-xarch=v8plus} \
76%{mcpu=ultrasparc:-xarch=v8plusa} \
77%{!mcpu*:%(asm_cpu_default)} \
78"
79
80/* However it appears that Solaris 2.0 uses the same reg numbering as
81 the old BSD-style system did. */
82
46-Asystem=unix -Asystem=svr4"
47
48#undef CPP_SUBTARGET_SPEC
49#define CPP_SUBTARGET_SPEC "\
50%{pthreads:-D_REENTRANT -D_PTHREADS} \
51%{!pthreads:%{threads:-D_REENTRANT -D_SOLARIS_THREADS}} \
52%{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude} \
53"

--- 30 unchanged lines hidden (view full) ---

84%{mcpu=v8plus:-xarch=v8plus} \
85%{mcpu=ultrasparc:-xarch=v8plusa} \
86%{!mcpu*:%(asm_cpu_default)} \
87"
88
89/* However it appears that Solaris 2.0 uses the same reg numbering as
90 the old BSD-style system did. */
91
83#undef DBX_REGISTER_NUMBER
84/* Same as sparc.h */
92/* Same as sparc.h */
93#undef DBX_REGISTER_NUMBER
85#define DBX_REGISTER_NUMBER(REGNO) \
94#define DBX_REGISTER_NUMBER(REGNO) \
86 (TARGET_FLAT && REGNO == FRAME_POINTER_REGNUM ? 31 : REGNO)
95 (TARGET_FLAT && (REGNO) == HARD_FRAME_POINTER_REGNUM ? 31 : REGNO)
87
96
88/* We use stabs-in-elf for debugging, because that is what the native
97/* We use stabs-in-elf by default, because that is what the native
89 toolchain uses. */
90#undef PREFERRED_DEBUGGING_TYPE
91#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
92
93/* The Solaris 2 assembler uses .skip, not .zero, so put this back. */
94#undef ASM_OUTPUT_SKIP
95#define ASM_OUTPUT_SKIP(FILE,SIZE) \
96 fprintf (FILE, "\t.skip %u\n", (SIZE))
97
98 toolchain uses. */
99#undef PREFERRED_DEBUGGING_TYPE
100#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
101
102/* The Solaris 2 assembler uses .skip, not .zero, so put this back. */
103#undef ASM_OUTPUT_SKIP
104#define ASM_OUTPUT_SKIP(FILE,SIZE) \
105 fprintf (FILE, "\t.skip %u\n", (SIZE))
106
107#undef LOCAL_LABEL_PREFIX
108#define LOCAL_LABEL_PREFIX "."
109
98/* This is how to output a definition of an internal numbered label where
99 PREFIX is the class of label and NUM is the number within the class. */
100
101#undef ASM_OUTPUT_INTERNAL_LABEL
102#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
103 fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
104
105/* This is how to output a reference to an internal numbered label where

--- 39 unchanged lines hidden (view full) ---

145 "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
146 %{!shared:\
147 %{!symbolic:\
148 %{pthreads:-lpthread} \
149 %{!pthreads:%{threads:-lthread}} \
150 %{p|pg:-ldl} -lc}}"
151
152#undef ENDFILE_SPEC
110/* This is how to output a definition of an internal numbered label where
111 PREFIX is the class of label and NUM is the number within the class. */
112
113#undef ASM_OUTPUT_INTERNAL_LABEL
114#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
115 fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
116
117/* This is how to output a reference to an internal numbered label where

--- 39 unchanged lines hidden (view full) ---

157 "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
158 %{!shared:\
159 %{!symbolic:\
160 %{pthreads:-lpthread} \
161 %{!pthreads:%{threads:-lthread}} \
162 %{p|pg:-ldl} -lc}}"
163
164#undef ENDFILE_SPEC
153#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
165#define ENDFILE_SPEC \
166 "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
167 crtend.o%s crtn.o%s"
154
155/* This should be the same as in svr4.h, except with -R added. */
156#undef LINK_SPEC
157#define LINK_SPEC \
158 "%{h*} %{v:-V} \
159 %{b} %{Wl,*:%*} \
160 %{static:-dn -Bstatic} \
161 %{shared:-G -dy %{!mimpure-text:-z text}} \

--- 60 unchanged lines hidden (view full) ---

222 fixdfdi_libfunc \
223 = init_one_libfunc (TARGET_ARCH64 ? "__dtol" : "__dtoll"); \
224 fixunsdfdi_libfunc \
225 = init_one_libfunc (TARGET_ARCH64 ? "__dtoul" : "__dtoull")
226
227/* Solaris allows 64 bit out and global registers in 32 bit mode.
228 sparc_override_options will disable V8+ if not generating V9 code. */
229#undef TARGET_DEFAULT
168
169/* This should be the same as in svr4.h, except with -R added. */
170#undef LINK_SPEC
171#define LINK_SPEC \
172 "%{h*} %{v:-V} \
173 %{b} %{Wl,*:%*} \
174 %{static:-dn -Bstatic} \
175 %{shared:-G -dy %{!mimpure-text:-z text}} \

--- 60 unchanged lines hidden (view full) ---

236 fixdfdi_libfunc \
237 = init_one_libfunc (TARGET_ARCH64 ? "__dtol" : "__dtoll"); \
238 fixunsdfdi_libfunc \
239 = init_one_libfunc (TARGET_ARCH64 ? "__dtoul" : "__dtoull")
240
241/* Solaris allows 64 bit out and global registers in 32 bit mode.
242 sparc_override_options will disable V8+ if not generating V9 code. */
243#undef TARGET_DEFAULT
230#define TARGET_DEFAULT (MASK_EPILOGUE + MASK_FPU + MASK_V8PLUS + MASK_LONG_DOUBLE_128)
244#define TARGET_DEFAULT (MASK_FPU + MASK_V8PLUS + MASK_LONG_DOUBLE_128)
231
232/*
233 * Attempt to turn on access permissions for the stack.
234 *
235 * This code must be defined when compiling gcc but not when compiling
236 * libgcc2.a, unless we're generating code for 64 bits SPARC
237 *
238 * _SC_STACK_PROT is only defined for post 2.6, but we want this code
239 * to run always. 2.6 can change the stack protection but has no way to
240 * query it.
241 *
242 */
243
244/* This declares mprotect (used in TRANSFER_FROM_TRAMPOLINE) for
245 libgcc2.c. */
245
246/*
247 * Attempt to turn on access permissions for the stack.
248 *
249 * This code must be defined when compiling gcc but not when compiling
250 * libgcc2.a, unless we're generating code for 64 bits SPARC
251 *
252 * _SC_STACK_PROT is only defined for post 2.6, but we want this code
253 * to run always. 2.6 can change the stack protection but has no way to
254 * query it.
255 *
256 */
257
258/* This declares mprotect (used in TRANSFER_FROM_TRAMPOLINE) for
259 libgcc2.c. */
246#ifdef L_trampoline
260/* We don't want to include this because sys/mman.h is not present on
261 some non-Solaris configurations that use sol2.h. */
262#if 0 /* def L_trampoline */
247#include <sys/mman.h>
248#endif
249
250#define TRANSFER_FROM_TRAMPOLINE \
251static int need_enable_exec_stack; \
252 \
253static void check_enabling(void) __attribute__ ((constructor)); \
254static void check_enabling(void) \

--- 26 unchanged lines hidden ---
263#include <sys/mman.h>
264#endif
265
266#define TRANSFER_FROM_TRAMPOLINE \
267static int need_enable_exec_stack; \
268 \
269static void check_enabling(void) __attribute__ ((constructor)); \
270static void check_enabling(void) \

--- 26 unchanged lines hidden ---