OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [svr4.h] - Blame information for rev 816

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.