]> gcc.gnu.org Git - gcc.git/blame - gcc/config/svr4.h
Makefile.in (abs_docdir, abs_srcdir): Define.
[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.
75c6d514 3 Copyright (C) 1991, 1994, 1995, 1996, 1997, 1998, 1999,
32fb7c9d 4 2000, 2001 Free Software Foundation, Inc.
66dae892 5 Contributed by Ron Guilmette (rfg@monkeys.com).
2a2ab3f9 6
814499a4 7This file is part of GCC.
2a2ab3f9 8
814499a4 9GCC is free software; you can redistribute it and/or modify
2a2ab3f9
JVA
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
814499a4 14GCC is distributed in the hope that it will be useful,
2a2ab3f9
JVA
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
814499a4 20along with GCC; see the file COPYING. If not, write to
0af195cf
RK
21the Free Software Foundation, 59 Temple Place - Suite 330,
22Boston, MA 02111-1307, USA.
2a2ab3f9 23
32fb7c9d 24 To use this file, make up a line like that in config.gcc:
2a2ab3f9 25
32fb7c9d 26 tm_file="$tm_file elfos.h svr4.h MACHINE/svr4.h"
2a2ab3f9 27
32fb7c9d
FS
28 where MACHINE is replaced by the name of the basic hardware that you
29 are targeting for. Then, in the file MACHINE/svr4.h, put any really
30 system-specific defines (or overrides of defines) which you find that
c08f71aa 31 you need.
2a2ab3f9
JVA
32*/
33
16ff428b
TW
34/* Define a symbol indicating that we are using svr4.h. */
35#define USING_SVR4_H
36
2a2ab3f9
JVA
37/* Cpp, assembler, linker, library, and startfile spec's. */
38
39/* This defines which switch letters take arguments. On svr4, most of
40 the normal cases (defined in gcc.c) apply, and we also have -h* and
41 -z* options (for the linker). Note however that there is no such
42 thing as a -T option for svr4. */
43
55047c9d 44#undef SWITCH_TAKES_ARG
f6cad4c9
NC
45#define SWITCH_TAKES_ARG(CHAR) \
46 (DEFAULT_SWITCH_TAKES_ARG (CHAR) \
47 || (CHAR) == 'h' \
48 || (CHAR) == 'x' \
2a2ab3f9
JVA
49 || (CHAR) == 'z')
50
51/* This defines which multi-letter switches take arguments. On svr4,
52 there are no such switches except those implemented by GCC itself. */
53
54#define WORD_SWITCH_TAKES_ARG(STR) \
3b39b94f
ILT
55 (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
56 && strcmp (STR, "Tdata") && strcmp (STR, "Ttext") \
57 && strcmp (STR, "Tbss"))
2a2ab3f9 58
2a2ab3f9
JVA
59/* Provide an ASM_SPEC appropriate for svr4. Here we try to support as
60 many of the specialized svr4 assembler options as seems reasonable,
61 given that there are certain options which we can't (or shouldn't)
96f158f7 62 support directly due to the fact that they conflict with other options
2a2ab3f9
JVA
63 for other svr4 tools (e.g. ld) or with other options for GCC itself.
64 For example, we don't support the -o (output file) or -R (remove
65 input file) options because GCC already handles these things. We
66 also don't support the -m (run m4) option for the assembler because
67 that conflicts with the -m (produce load map) option of the svr4
68 linker. We do however allow passing arbitrary options to the svr4
69 assembler via the -Wa, option.
70
71 Note that gcc doesn't allow a space to follow -Y in a -Ym,* or -Yd,*
72 option.
4977bab6
ZW
73
74 The svr4 assembler wants '-' on the command line if it's expected to
75 read its stdin.
2a2ab3f9
JVA
76*/
77
f6cad4c9 78#undef ASM_SPEC
2a2ab3f9 79#define ASM_SPEC \
660d9d96 80 "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
2a2ab3f9 81
4977bab6 82#define AS_NEEDS_DASH_FOR_PIPED_INPUT
2a2ab3f9 83
93639b52
RS
84/* Under svr4, the normal location of the `ld' and `as' programs is the
85 /usr/ccs/bin directory. */
86
f905fc0d 87#ifndef CROSS_COMPILE
f6cad4c9 88#undef MD_EXEC_PREFIX
93639b52 89#define MD_EXEC_PREFIX "/usr/ccs/bin/"
f905fc0d 90#endif
93639b52 91
2a2ab3f9
JVA
92/* Under svr4, the normal location of the various *crt*.o files is the
93 /usr/ccs/lib directory. */
94
f905fc0d 95#ifndef CROSS_COMPILE
f6cad4c9 96#undef MD_STARTFILE_PREFIX
2a2ab3f9 97#define MD_STARTFILE_PREFIX "/usr/ccs/lib/"
f905fc0d 98#endif
2a2ab3f9 99
b4ac57ab 100/* Provide a LIB_SPEC appropriate for svr4. Here we tack on the default
68d69835
JM
101 standard C library (unless we are building a shared library). */
102
103#undef LIB_SPEC
104#define LIB_SPEC "%{!shared:%{!symbolic:-lc}}"
105
68d69835
JM
106/* Provide an ENDFILE_SPEC appropriate for svr4. Here we tack on our own
107 magical crtend.o file (see crtstuff.c) which provides part of the
108 support for getting C++ file-scope static object constructed before
2a2ab3f9
JVA
109 entering `main', followed by the normal svr3/svr4 "finalizer" file,
110 which is either `gcrtn.o' or `crtn.o'. */
111
68d69835 112#undef ENDFILE_SPEC
a4ec6e2a 113#define ENDFILE_SPEC "crtend.o%s %{pg:gcrtn.o%s}%{!pg:crtn.o%s}"
2a2ab3f9
JVA
114
115/* Provide a LINK_SPEC appropriate for svr4. Here we provide support
116 for the special GCC options -static, -shared, and -symbolic which
117 allow us to link things in one of these three modes by applying the
118 appropriate combinations of options at link-time. We also provide
119 support here for as many of the other svr4 linker options as seems
120 reasonable, given that some of them conflict with options for other
121 svr4 tools (e.g. the assembler). In particular, we do support the
51610b0a
GK
122 -z*, -V, -b, -t, -Qy, -Qn, and -YP* options here, and the -e*, -l*,
123 -o*, -r, -s, -u*, and -L* options are directly supported by gcc.c
124 itself. We don't directly support the -m (generate load map)
125 option because that conflicts with the -m (run m4) option of the
126 svr4 assembler. We also don't directly support the svr4 linker's
127 -I* or -M* options because these conflict with existing GCC
128 options. We do however allow passing arbitrary options to the svr4
129 linker via the -Wl, option, in gcc.c. We don't support the svr4
130 linker's -a option at all because it is totally useless and because
131 it conflicts with GCC's own -a option.
2a2ab3f9
JVA
132
133 Note that gcc doesn't allow a space to follow -Y in a -YP,* option.
134
135 When the -G link option is used (-shared and -symbolic) a final link is
136 not being done. */
137
138#undef LINK_SPEC
f905fc0d 139#ifdef CROSS_COMPILE
660d9d96 140#define LINK_SPEC "%{h*} %{v:-V} \
51610b0a 141 %{b} \
f905fc0d 142 %{static:-dn -Bstatic} \
8b496c8d
ILT
143 %{shared:-G -dy -z text} \
144 %{symbolic:-Bsymbolic -G -dy -z text} \
f905fc0d
DE
145 %{G:-G} \
146 %{YP,*} \
147 %{Qy:} %{!Qn:-Qy}"
148#else
660d9d96 149#define LINK_SPEC "%{h*} %{v:-V} \
51610b0a 150 %{b} \
2a2ab3f9 151 %{static:-dn -Bstatic} \
8b496c8d
ILT
152 %{shared:-G -dy -z text} \
153 %{symbolic:-Bsymbolic -G -dy -z text} \
b4ac57ab 154 %{G:-G} \
2a2ab3f9
JVA
155 %{YP,*} \
156 %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
157 %{!p:-Y P,/usr/ccs/lib:/usr/lib}} \
158 %{Qy:} %{!Qn:-Qy}"
f905fc0d 159#endif
2a2ab3f9 160
f458d1d5
ZW
161/* Gcc automatically adds in one of the files /usr/ccs/lib/values-Xc.o
162 or /usr/ccs/lib/values-Xa.o for each final link step (depending
163 upon the other gcc options selected, such as -ansi). These files
164 each contain one (initialized) copy of a special variable called
165 `_lib_version'. Each one of these files has `_lib_version' initialized
166 to a different (enum) value. The SVR4 library routines query the
167 value of `_lib_version' at run to decide how they should behave.
168 Specifically, they decide (based upon the value of `_lib_version')
169 if they will act in a strictly ANSI conforming manner or not. */
2a2ab3f9
JVA
170
171#undef STARTFILE_SPEC
172#define STARTFILE_SPEC "%{!shared: \
173 %{!symbolic: \
68d69835
JM
174 %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
175 %{pg:gcrti.o%s}%{!pg:crti.o%s} \
176 %{ansi:values-Xc.o%s} \
f458d1d5 177 %{!ansi:values-Xa.o%s} \
68d69835 178 crtbegin.o%s"
2a2ab3f9 179
2a2ab3f9
JVA
180/* The numbers used to denote specific machine registers in the System V
181 Release 4 DWARF debugging information are quite likely to be totally
182 different from the numbers used in BSD stabs debugging information
183 for the same kind of target machine. Thus, we undefine the macro
184 DBX_REGISTER_NUMBER here as an extra inducement to get people to
185 provide proper machine-specific definitions of DBX_REGISTER_NUMBER
186 (which is also used to provide DWARF registers numbers in dwarfout.c)
187 in their tm.h files which include this file. */
188
189#undef DBX_REGISTER_NUMBER
190
191/* Define the actual types of some ANSI-mandated types. (These
192 definitions should work for most SVR4 systems). */
193
f6cad4c9 194#undef SIZE_TYPE
2a2ab3f9
JVA
195#define SIZE_TYPE "unsigned int"
196
f6cad4c9 197#undef PTRDIFF_TYPE
2a2ab3f9
JVA
198#define PTRDIFF_TYPE "int"
199
f6cad4c9 200#undef WCHAR_TYPE
2a2ab3f9
JVA
201#define WCHAR_TYPE "long int"
202
f6cad4c9 203#undef WCHAR_TYPE_SIZE
2a2ab3f9
JVA
204#define WCHAR_TYPE_SIZE BITS_PER_WORD
205
e09d24ff 206#define TARGET_HAS_F_SETLKW
This page took 1.371465 seconds and 5 git commands to generate.