]> gcc.gnu.org Git - gcc.git/blame - gcc/config/sparc/sol2.h
(MAX_OFILE_ALIGNMENT): Moved to config/svr4.h.
[gcc.git] / gcc / config / sparc / sol2.h
CommitLineData
8f3d7f00 1/* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
c637e7b3 2 Copyright 1992, 1995 Free Software Foundation, Inc.
ed1817c6
RK
3
4 Written by Ron Guilmette (rfg@netcom.com).
5 Additional changes by David V. Henkel-Wallace (gumby@cygnus.com).
4ab76dcd
RK
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)
12any later version.
13
14GNU CC is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17GNU General Public License for more details.
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
c15c9075
RK
21the Free Software Foundation, 59 Temple Place - Suite 330,
22Boston, MA 02111-1307, USA. */
4ab76dcd 23
8f3d7f00 24/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
b491172a 25#include "sparc/sysv4.h"
4ab76dcd 26
8f3d7f00
RS
27#undef CPP_PREDEFINES
28#define CPP_PREDEFINES \
b88277f9 29 "-Dsun -Dsparc -Dunix -D__svr4__ -D__SVR4 \
65c42379 30 -Asystem(unix) -Asystem(svr4) -Acpu(sparc) -Amachine(sparc)\
f19c1a78 31 -D__GCC_NEW_VARARGS__"
8f3d7f00 32
8b377b71
RS
33#undef CPP_SPEC
34#define CPP_SPEC "\
d7473723 35 %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}\
47c95f50
JW
36 %{msparclite:-D__sparclite__} %{mv8:-D__sparc_v8__}\
37 %{msupersparc:-D__supersparc__ -D__sparc_v8__}"
8b377b71 38
8f3d7f00
RS
39/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
40 It's safe to pass -s always, even if -g is not used. */
41#undef ASM_SPEC
42#define ASM_SPEC \
4bdf6e3d
JW
43 "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
44 %{fpic:-K PIC} %{fPIC:-K PIC}"
8f3d7f00
RS
45
46/* However it appears that Solaris 2.0 uses the same reg numbering as
47 the old BSD-style system did. */
48
49#undef DBX_REGISTER_NUMBER
50/* Same as sparc.h */
51#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
52
aad3ab2f
JW
53/* We use stabs-in-elf for debugging, because that is what the native
54 toolchain uses. */
136bfcb3 55#undef PREFERRED_DEBUGGING_TYPE
8f3d7f00
RS
56#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
57
8f3d7f00
RS
58/* The Solaris 2 assembler uses .skip, not .zero, so put this back. */
59#undef ASM_OUTPUT_SKIP
60#define ASM_OUTPUT_SKIP(FILE,SIZE) \
61 fprintf (FILE, "\t.skip %u\n", (SIZE))
62
63#undef ASM_OUTPUT_ALIGNED_LOCAL
64#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
65do { \
66 fputs ("\t.local\t", (FILE)); \
67 assemble_name ((FILE), (NAME)); \
68 putc ('\n', (FILE)); \
69 ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \
70} while (0)
71
72#undef COMMON_ASM_OP
73#define COMMON_ASM_OP "\t.common"
74
75/* This is how to output a definition of an internal numbered label where
76 PREFIX is the class of label and NUM is the number within the class. */
77
78#undef ASM_OUTPUT_INTERNAL_LABEL
79#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
80 fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
81
82/* This is how to output a reference to an internal numbered label where
83 PREFIX is the class of label and NUM is the number within the class. */
84
85#undef ASM_OUTPUT_INTERNAL_LABELREF
86#define ASM_OUTPUT_INTERNAL_LABELREF(FILE,PREFIX,NUM) \
87 fprintf (FILE, ".L%s%d", PREFIX, NUM)
88
89/* This is how to store into the string LABEL
90 the symbol_ref name of an internal numbered label where
91 PREFIX is the class of label and NUM is the number within the class.
92 This is suitable for output with `assemble_name'. */
93
94#undef ASM_GENERATE_INTERNAL_LABEL
95#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
96 sprintf (LABEL, "*.L%s%d", PREFIX, NUM)
97
8f3d7f00
RS
98\f
99/* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us.
100 We don't use the standard LIB_SPEC only because we don't yet support c++ */
4ab76dcd 101
8b377b71 102#undef STARTFILE_SPEC
8f3d7f00
RS
103#define STARTFILE_SPEC "%{!shared: \
104 %{!symbolic: \
8466d38a
RK
105 %{p:mcrt1.o%s}%{!p:crt1.o%s} %{pg:gmon.o%s}}} \
106 crti.o%s \
70ef1c9e 107 %{ansi:values-Xc.o%s} \
68d69835 108 %{!ansi: \
70ef1c9e
JW
109 %{traditional:values-Xt.o%s} \
110 %{!traditional:values-Xa.o%s}} \
68d69835 111 crtbegin.o%s"
8f3d7f00 112
8b377b71
RS
113/* ??? Note: in order for -compat-bsd to work fully,
114 we must somehow arrange to fixincludes /usr/ucbinclude
115 and put the result in $(libsubdir)/ucbinclude. */
116
117#undef LIB_SPEC
8f3d7f00 118#define LIB_SPEC \
68d69835
JM
119 "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} %{!shared:%{!symbolic:-lc}}"
120
121#undef ENDFILE_SPEC
8466d38a 122#define ENDFILE_SPEC "crtend.o%s crtn.o%s"
6f13015b
RS
123
124/* This should be the same as in svr4.h, except with -R added. */
125#undef LINK_SPEC
8b377b71
RS
126#define LINK_SPEC \
127 "%{h*} %{V} %{v:%{!V:-V}} \
128 %{b} %{Wl,*:%*} \
129 %{static:-dn -Bstatic} \
f6b54ae8
JM
130 %{shared:-G -dy -z text %{!h*:%{o*:-h %*}}} \
131 %{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}} \
8b377b71
RS
132 %{G:-G} \
133 %{YP,*} \
c637e7b3 134 %{R*} \
8b377b71
RS
135 %{compat-bsd: \
136 %{!YP,*:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
8466d38a
RK
137 %{pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
138 %{!p:%{!pg:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \
8b377b71
RS
139 -R /usr/ucblib} \
140 %{!compat-bsd: \
141 %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
8466d38a
RK
142 %{pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
143 %{!p:%{!pg:-Y P,/usr/ccs/lib:/usr/lib}}}} \
8b377b71 144 %{Qy:} %{!Qn:-Qy}"
6f13015b
RS
145
146/* This defines which switch letters take arguments.
147 It is as in svr4.h but with -R added. */
148
149#undef SWITCH_TAKES_ARG
150#define SWITCH_TAKES_ARG(CHAR) \
151 ( (CHAR) == 'D' \
152 || (CHAR) == 'U' \
153 || (CHAR) == 'o' \
154 || (CHAR) == 'e' \
155 || (CHAR) == 'u' \
156 || (CHAR) == 'I' \
157 || (CHAR) == 'm' \
158 || (CHAR) == 'L' \
159 || (CHAR) == 'R' \
160 || (CHAR) == 'A' \
161 || (CHAR) == 'h' \
162 || (CHAR) == 'z')
05710c13
JW
163\f
164/* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h.
165 Instead, it is enabled here, because it does work under Solaris. */
166/* Define for support of TFmode long double and REAL_ARITHMETIC.
167 Sparc ABI says that long double is 4 words. */
168#define LONG_DOUBLE_TYPE_SIZE 128
This page took 0.246523 seconds and 5 git commands to generate.