OSDN Git Service

(ASM_OUTPUT_ALIGNED_LOCAL): Delete, use svr4.h's.
[pf3gnuchains/gcc-fork.git] / gcc / config / sparc / sol2.h
1 /* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
2    Copyright 1992, 1995 Free Software Foundation, Inc.
3
4    Written by Ron Guilmette (rfg@netcom.com).
5    Additional changes by David V. Henkel-Wallace (gumby@cygnus.com).
6
7 This file is part of GNU CC.
8
9 GNU CC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
13
14 GNU CC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING.  If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA.  */
23
24 /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
25 #include "sparc/sysv4.h"
26
27 #undef CPP_PREDEFINES
28 #define CPP_PREDEFINES \
29  "-Dsun -Dsparc -Dunix -D__svr4__ -D__SVR4 \
30   -Asystem(unix) -Asystem(svr4) -Acpu(sparc) -Amachine(sparc)\
31   -D__GCC_NEW_VARARGS__"
32
33 #undef CPP_SPEC
34 #define CPP_SPEC "\
35    %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}\
36    %{msparclite:-D__sparclite__} %{mv8:-D__sparc_v8__}\
37    %{msupersparc:-D__supersparc__ -D__sparc_v8__}"
38
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 \
43   "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
44    %{fpic:-K PIC} %{fPIC:-K PIC}"
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
53 /* We use stabs-in-elf for debugging, because that is what the native
54    toolchain uses.  */
55 #undef PREFERRED_DEBUGGING_TYPE
56 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
57
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 /* This is how to output a definition of an internal numbered label where
64    PREFIX is the class of label and NUM is the number within the class.  */
65
66 #undef  ASM_OUTPUT_INTERNAL_LABEL
67 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)      \
68   fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
69
70 /* This is how to output a reference to an internal numbered label where
71    PREFIX is the class of label and NUM is the number within the class.  */
72
73 #undef  ASM_OUTPUT_INTERNAL_LABELREF
74 #define ASM_OUTPUT_INTERNAL_LABELREF(FILE,PREFIX,NUM)   \
75   fprintf (FILE, ".L%s%d", PREFIX, NUM)
76
77 /* This is how to store into the string LABEL
78    the symbol_ref name of an internal numbered label where
79    PREFIX is the class of label and NUM is the number within the class.
80    This is suitable for output with `assemble_name'.  */
81
82 #undef  ASM_GENERATE_INTERNAL_LABEL
83 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)   \
84   sprintf (LABEL, "*.L%s%d", PREFIX, NUM)
85
86 \f
87 /* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us.
88    We don't use the standard LIB_SPEC only because we don't yet support c++ */
89
90 #undef STARTFILE_SPEC
91 #define STARTFILE_SPEC "%{!shared: \
92                          %{!symbolic: \
93                           %{p:mcrt1.o%s} \
94                           %{!p: \
95                             %{pg:gcrt1.o%s gmon.o%s} \
96                             %{!pg:crt1.o%s}}}} \
97                         crti.o%s \
98                         %{ansi:values-Xc.o%s} \
99                         %{!ansi: \
100                          %{traditional:values-Xt.o%s} \
101                          %{!traditional:values-Xa.o%s}} \
102                         crtbegin.o%s"
103
104 /* ??? Note: in order for -compat-bsd to work fully,
105    we must somehow arrange to fixincludes /usr/ucbinclude
106    and put the result in $(libsubdir)/ucbinclude.  */
107
108 #undef LIB_SPEC
109 #define LIB_SPEC \
110   "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} %{!shared:%{!symbolic:-lc}}"
111
112 #undef  ENDFILE_SPEC
113 #define ENDFILE_SPEC "crtend.o%s crtn.o%s"
114
115 /* This should be the same as in svr4.h, except with -R added.  */
116 #undef LINK_SPEC
117 #define LINK_SPEC \
118   "%{h*} %{V} %{v:%{!V:-V}} \
119    %{b} %{Wl,*:%*} \
120    %{static:-dn -Bstatic} \
121    %{shared:-G -dy -z text %{!h*:%{o*:-h %*}}} \
122    %{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}} \
123    %{G:-G} \
124    %{YP,*} \
125    %{R*} \
126    %{compat-bsd: \
127      %{!YP,*:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
128        %{pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
129        %{!p:%{!pg:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \
130      -R /usr/ucblib} \
131    %{!compat-bsd: \
132      %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
133        %{pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
134        %{!p:%{!pg:-Y P,/usr/ccs/lib:/usr/lib}}}} \
135    %{Qy:} %{!Qn:-Qy}"
136
137 /* This defines which switch letters take arguments.
138    It is as in svr4.h but with -R added.  */
139
140 #undef SWITCH_TAKES_ARG
141 #define SWITCH_TAKES_ARG(CHAR) \
142   (   (CHAR) == 'D' \
143    || (CHAR) == 'U' \
144    || (CHAR) == 'o' \
145    || (CHAR) == 'e' \
146    || (CHAR) == 'u' \
147    || (CHAR) == 'I' \
148    || (CHAR) == 'm' \
149    || (CHAR) == 'L' \
150    || (CHAR) == 'R' \
151    || (CHAR) == 'A' \
152    || (CHAR) == 'h' \
153    || (CHAR) == 'x' \
154    || (CHAR) == 'z')
155 \f
156 /* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h.
157    Instead, it is enabled here, because it does work under Solaris.  */
158 /* Define for support of TFmode long double and REAL_ARITHMETIC.
159    Sparc ABI says that long double is 4 words.  */
160 #define LONG_DOUBLE_TYPE_SIZE 128