]> gcc.gnu.org Git - gcc.git/blame - gcc/config/svr4.h
mips.h (REGISTER_MOVE_COST): Remove redundant case for moving from HI/LO/HI_LO_REG.
[gcc.git] / gcc / config / svr4.h
CommitLineData
71df9112
RK
1/* Operating system specific defines to be used when targeting GCC for some
2 generic System V Release 4 system.
f6cad4c9 3 Copyright (C) 1991, 94-99, 2000 Free Software Foundation, Inc.
66dae892 4 Contributed by Ron Guilmette (rfg@monkeys.com).
2a2ab3f9
JVA
5
6This file is part of GNU CC.
7
8GNU CC is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2, or (at your option)
11any later version.
12
13GNU CC is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU CC; see the file COPYING. If not, write to
0af195cf
RK
20the Free Software Foundation, 59 Temple Place - Suite 330,
21Boston, MA 02111-1307, USA.
2a2ab3f9
JVA
22
23 To use this file, make up a file with a name like:
24
25 ?????svr4.h
26
27 where ????? is replaced by the name of the basic hardware that you
28 are targeting for. Then, in the file ?????svr4.h, put something
29 like:
30
31 #include "?????.h"
32 #include "svr4.h"
33
34 followed by any really system-specific defines (or overrides of
35 defines) which you find that you need. For example, CPP_PREDEFINES
36 is defined here with only the defined -Dunix and -DSVR4. You should
37 probably override that in your target-specific ?????svr4.h file
38 with a set of defines that includes these, but also contains an
39 appropriate define for the type of hardware that you are targeting.
40*/
41
16ff428b
TW
42/* Define a symbol indicating that we are using svr4.h. */
43#define USING_SVR4_H
44
f6cad4c9
NC
45#include "elfos.h"
46
2a2ab3f9
JVA
47/* Cpp, assembler, linker, library, and startfile spec's. */
48
49/* This defines which switch letters take arguments. On svr4, most of
50 the normal cases (defined in gcc.c) apply, and we also have -h* and
51 -z* options (for the linker). Note however that there is no such
52 thing as a -T option for svr4. */
53
f6cad4c9
NC
54#define SWITCH_TAKES_ARG(CHAR) \
55 (DEFAULT_SWITCH_TAKES_ARG (CHAR) \
56 || (CHAR) == 'h' \
57 || (CHAR) == 'x' \
2a2ab3f9
JVA
58 || (CHAR) == 'z')
59
60/* This defines which multi-letter switches take arguments. On svr4,
61 there are no such switches except those implemented by GCC itself. */
62
63#define WORD_SWITCH_TAKES_ARG(STR) \
3b39b94f
ILT
64 (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
65 && strcmp (STR, "Tdata") && strcmp (STR, "Ttext") \
66 && strcmp (STR, "Tbss"))
2a2ab3f9
JVA
67
68/* You should redefine CPP_PREDEFINES in any file which includes this one.
69 The definition should be appropriate for the type of target system
70 involved, and it should include any -A (assertion) options which are
71 appropriate for the given target system. */
72#undef CPP_PREDEFINES
73
74/* Provide an ASM_SPEC appropriate for svr4. Here we try to support as
75 many of the specialized svr4 assembler options as seems reasonable,
76 given that there are certain options which we can't (or shouldn't)
96f158f7 77 support directly due to the fact that they conflict with other options
2a2ab3f9
JVA
78 for other svr4 tools (e.g. ld) or with other options for GCC itself.
79 For example, we don't support the -o (output file) or -R (remove
80 input file) options because GCC already handles these things. We
81 also don't support the -m (run m4) option for the assembler because
82 that conflicts with the -m (produce load map) option of the svr4
83 linker. We do however allow passing arbitrary options to the svr4
84 assembler via the -Wa, option.
85
86 Note that gcc doesn't allow a space to follow -Y in a -Ym,* or -Yd,*
87 option.
88*/
89
f6cad4c9 90#undef ASM_SPEC
2a2ab3f9 91#define ASM_SPEC \
660d9d96 92 "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
2a2ab3f9
JVA
93
94/* svr4 assemblers need the `-' (indicating input from stdin) to come after
95 the -o option (and its argument) for some reason. If we try to put it
96 before the -o option, the assembler will try to read the file named as
97 the output file in the -o option as an input file (after it has already
98 written some stuff to it) and the binary stuff contained therein will
99 cause totally confuse the assembler, resulting in many spurious error
100 messages. */
101
f6cad4c9 102#undef ASM_FINAL_SPEC
bcc1f62c 103#define ASM_FINAL_SPEC "%|"
2a2ab3f9 104
93639b52
RS
105/* Under svr4, the normal location of the `ld' and `as' programs is the
106 /usr/ccs/bin directory. */
107
f905fc0d 108#ifndef CROSS_COMPILE
f6cad4c9 109#undef MD_EXEC_PREFIX
93639b52 110#define MD_EXEC_PREFIX "/usr/ccs/bin/"
f905fc0d 111#endif
93639b52 112
2a2ab3f9
JVA
113/* Under svr4, the normal location of the various *crt*.o files is the
114 /usr/ccs/lib directory. */
115
f905fc0d 116#ifndef CROSS_COMPILE
f6cad4c9 117#undef MD_STARTFILE_PREFIX
2a2ab3f9 118#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
f905fc0d 119#endif
2a2ab3f9 120
b4ac57ab 121/* Provide a LIB_SPEC appropriate for svr4. Here we tack on the default
68d69835
JM
122 standard C library (unless we are building a shared library). */
123
124#undef LIB_SPEC
125#define LIB_SPEC "%{!shared:%{!symbolic:-lc}}"
126
68d69835
JM
127/* Provide an ENDFILE_SPEC appropriate for svr4. Here we tack on our own
128 magical crtend.o file (see crtstuff.c) which provides part of the
129 support for getting C++ file-scope static object constructed before
2a2ab3f9
JVA
130 entering `main', followed by the normal svr3/svr4 "finalizer" file,
131 which is either `gcrtn.o' or `crtn.o'. */
132
68d69835 133#undef ENDFILE_SPEC
a4ec6e2a 134#define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o%s}%{!pg:crtn.o%s}"
2a2ab3f9
JVA
135
136/* Provide a LINK_SPEC appropriate for svr4. Here we provide support
137 for the special GCC options -static, -shared, and -symbolic which
138 allow us to link things in one of these three modes by applying the
139 appropriate combinations of options at link-time. We also provide
140 support here for as many of the other svr4 linker options as seems
141 reasonable, given that some of them conflict with options for other
142 svr4 tools (e.g. the assembler). In particular, we do support the
8b496c8d 143 -z*, -V, -b, -t, -Qy, -Qn, and -YP* options here, and the -e*,
2a2ab3f9
JVA
144 -l*, -o*, -r, -s, -u*, and -L* options are directly supported
145 by gcc.c itself. We don't directly support the -m (generate load
146 map) option because that conflicts with the -m (run m4) option of
147 the svr4 assembler. We also don't directly support the svr4 linker's
148 -I* or -M* options because these conflict with existing GCC options.
149 We do however allow passing arbitrary options to the svr4 linker
150 via the -Wl, option. We don't support the svr4 linker's -a option
151 at all because it is totally useless and because it conflicts with
152 GCC's own -a option.
153
154 Note that gcc doesn't allow a space to follow -Y in a -YP,* option.
155
156 When the -G link option is used (-shared and -symbolic) a final link is
157 not being done. */
158
159#undef LINK_SPEC
f905fc0d 160#ifdef CROSS_COMPILE
660d9d96 161#define LINK_SPEC "%{h*} %{v:-V} \
f905fc0d
DE
162 %{b} %{Wl,*:%*} \
163 %{static:-dn -Bstatic} \
8b496c8d
ILT
164 %{shared:-G -dy -z text} \
165 %{symbolic:-Bsymbolic -G -dy -z text} \
f905fc0d
DE
166 %{G:-G} \
167 %{YP,*} \
168 %{Qy:} %{!Qn:-Qy}"
169#else
660d9d96 170#define LINK_SPEC "%{h*} %{v:-V} \
b4ac57ab 171 %{b} %{Wl,*:%*} \
2a2ab3f9 172 %{static:-dn -Bstatic} \
8b496c8d
ILT
173 %{shared:-G -dy -z text} \
174 %{symbolic:-Bsymbolic -G -dy -z text} \
b4ac57ab 175 %{G:-G} \
2a2ab3f9
JVA
176 %{YP,*} \
177 %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
178 %{!p:-Y P,/usr/ccs/lib:/usr/lib}} \
179 %{Qy:} %{!Qn:-Qy}"
f905fc0d 180#endif
2a2ab3f9
JVA
181
182/* Gcc automatically adds in one of the files /usr/ccs/lib/values-Xc.o,
183 /usr/ccs/lib/values-Xa.o, or /usr/ccs/lib/values-Xt.o for each final
184 link step (depending upon the other gcc options selected, such as
185 -traditional and -ansi). These files each contain one (initialized)
186 copy of a special variable called `_lib_version'. Each one of these
187 files has `_lib_version' initialized to a different (enum) value.
188 The SVR4 library routines query the value of `_lib_version' at run
189 to decide how they should behave. Specifically, they decide (based
190 upon the value of `_lib_version') if they will act in a strictly ANSI
f6cad4c9 191 conforming manner or not. */
2a2ab3f9
JVA
192
193#undef STARTFILE_SPEC
194#define STARTFILE_SPEC "%{!shared: \
195 %{!symbolic: \
68d69835
JM
196 %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
197 %{pg:gcrti.o%s}%{!pg:crti.o%s} \
198 %{ansi:values-Xc.o%s} \
199 %{!ansi: \
200 %{traditional:values-Xt.o%s} \
201 %{!traditional:values-Xa.o%s}} \
202 crtbegin.o%s"
2a2ab3f9 203
2a2ab3f9
JVA
204/* Allow #sccs in preprocessor. */
205
206#define SCCS_DIRECTIVE
207
2a2ab3f9
JVA
208/* The numbers used to denote specific machine registers in the System V
209 Release 4 DWARF debugging information are quite likely to be totally
210 different from the numbers used in BSD stabs debugging information
211 for the same kind of target machine. Thus, we undefine the macro
212 DBX_REGISTER_NUMBER here as an extra inducement to get people to
213 provide proper machine-specific definitions of DBX_REGISTER_NUMBER
214 (which is also used to provide DWARF registers numbers in dwarfout.c)
215 in their tm.h files which include this file. */
216
217#undef DBX_REGISTER_NUMBER
218
219/* Define the actual types of some ANSI-mandated types. (These
220 definitions should work for most SVR4 systems). */
221
f6cad4c9 222#undef SIZE_TYPE
2a2ab3f9
JVA
223#define SIZE_TYPE "unsigned int"
224
f6cad4c9 225#undef PTRDIFF_TYPE
2a2ab3f9
JVA
226#define PTRDIFF_TYPE "int"
227
f6cad4c9 228#undef WCHAR_TYPE
2a2ab3f9
JVA
229#define WCHAR_TYPE "long int"
230
f6cad4c9 231#undef WCHAR_TYPE_SIZE
2a2ab3f9
JVA
232#define WCHAR_TYPE_SIZE BITS_PER_WORD
233
1474c150
RS
234/* This causes trouble, because it requires the host machine
235 to support ANSI C. */
236/* #define MULTIBYTE_CHARS */
b3865ca9 237
This page took 0.684921 seconds and 5 git commands to generate.