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

Subversion Repositories openrisc

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

Go to most recent revision | 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
2
   Sequent's Dynix/ptx v4 and later.
3
   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2007
4
   Free Software Foundation, Inc.
5
   Generic SysV4 file Contributed by Ron Guilmette (rfg@monkeys.com).
6
   Renamed and changed to suit Dynix/ptx v4 and later.
7
   Modified by Tim Wright (timw@sequent.com).
8
   Modified by Janis Johnson (janis@us.ibm.com).
9
 
10
This file is part of GCC.
11
 
12
GCC is free software; you can redistribute it and/or modify
13
it under the terms of the GNU General Public License as published by
14
the Free Software Foundation; either version 3, or (at your option)
15
any later version.
16
 
17
GCC is distributed in the hope that it will be useful,
18
but WITHOUT ANY WARRANTY; without even the implied warranty of
19
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
GNU General Public License for more details.
21
 
22
You should have received a copy of the GNU General Public License
23
along with GCC; see the file COPYING3.  If not see
24
<http://www.gnu.org/licenses/>.
25
 
26
*/
27
 
28
/* Define a symbol indicating that we are using svr4.h.  */
29
#define USING_SVR4_H
30
 
31
/* Use DWARF 2 debugging info by default.  */
32
 
33
#undef PREFERRED_DEBUGGING_TYPE
34
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
35
 
36
#define DWARF2_DEBUGGING_INFO 1
37
 
38
/* Cpp, assembler, linker, library, and startfile spec's.  */
39
 
40
/* This defines which switch letters take arguments.  On svr4, most of
41
   the normal cases (defined in gcc.c) apply, and we also have -h* and
42
   -z* options (for the linker).  Note however that there is no such
43
   thing as a -T option for svr4.  */
44
 
45
#define SWITCH_TAKES_ARG(CHAR) \
46
  (   (CHAR) == 'D' \
47
   || (CHAR) == 'U' \
48
   || (CHAR) == 'o' \
49
   || (CHAR) == 'e' \
50
   || (CHAR) == 'u' \
51
   || (CHAR) == 'I' \
52
   || (CHAR) == 'm' \
53
   || (CHAR) == 'L' \
54
   || (CHAR) == 'A' \
55
   || (CHAR) == 'h' \
56
   || (CHAR) == 'z')
57
 
58
/* This defines which multi-letter switches take arguments.  On svr4,
59
   there are no such switches except those implemented by GCC itself.  */
60
 
61
#define WORD_SWITCH_TAKES_ARG(STR)                      \
62
 (DEFAULT_WORD_SWITCH_TAKES_ARG (STR)                   \
63
  && strcmp (STR, "Tdata") && strcmp (STR, "Ttext")     \
64
  && strcmp (STR, "Tbss"))
65
 
66
/* Provide an ASM_SPEC appropriate for svr4.  Here we try to support as
67
   many of the specialized svr4 assembler options as seems reasonable,
68
   given that there are certain options which we can't (or shouldn't)
69
   support directly due to the fact that they conflict with other options
70
   for other svr4 tools (e.g. ld) or with other options for GCC itself.
71
   For example, we don't support the -o (output file) or -R (remove
72
   input file) options because GCC already handles these things.  We
73
   also don't support the -m (run m4) option for the assembler because
74
   that conflicts with the -m (produce load map) option of the svr4
75
   linker.  We do however allow passing arbitrary options to the svr4
76
   assembler via the -Wa, option.
77
 
78
   Note that gcc doesn't allow a space to follow -Y in a -Ym,* or -Yd,*
79
   option.
80
*/
81
 
82
#undef ASM_SPEC
83
#ifdef USE_GAS
84
#define ASM_SPEC \
85
  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
86
#else
87
#define ASM_SPEC \
88
  "-no_0f_fix -no_eflags_chk %{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
89
#endif
90
 
91
#define AS_NEEDS_DASH_FOR_PIPED_INPUT
92
 
93
/* Provide a LIB_SPEC appropriate for svr4.  Here we tack on the default
94
   standard C library (unless we are building a shared library).  */
95
 
96
#undef  LIB_SPEC
97
#define LIB_SPEC "%{!shared:%{!symbolic:-lc}}"
98
 
99
/* Provide a LIBGCC_SPEC appropriate for svr4.  We also want to exclude
100
   libgcc when -symbolic.  */
101
 
102
#undef  LIBGCC_SPEC
103
#define LIBGCC_SPEC "%{!shared:%{!symbolic:-lgcc}}"
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}%{!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*,
122
   -l*, -o*, -r, -s, -u*, and -L* options are directly supported
123
   by gcc.c itself.  We don't directly support the -m (generate load
124
   map) option because that conflicts with the -m (run m4) option of
125
   the svr4 assembler.  We also don't directly support the svr4 linker's
126
   -I* or -M* options because these conflict with existing GCC options.
127
   We do however allow passing arbitrary options to the svr4 linker
128
   via the -Wl, option.  We don't support the svr4 linker's -a option
129
   at all because it is totally useless and because it conflicts with
130
   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
#define LINK_SPEC "%{h*} %{v:-V} \
139
                   %{b} \
140
                   %{static:-dn -Bstatic} \
141
                   %{shared:-G -dy -z text} \
142
                   %{symbolic:-Bsymbolic -G -dy -z text} \
143
                   %{G:-G} \
144
                   %{YP,*} \
145
                   %{!YP,*:%{p:-Y P,/lib/libp:/usr/lib/libp:/lib:/usr/lib} \
146
                    %{!p:-Y P,/lib:/usr/lib}} \
147
                   %{Qy:} %{!Qn:-Qy}"
148
 
149
/* Gcc automatically adds in one of the files /lib/values-Xc.o
150
   or /lib/values-Xa.o, for each final link step (depending upon the other
151
   gcc options selected, such as -ansi).  These files each contain one
152
   (initialized) copy of a special variable called `_lib_version'.  Each
153
   one of these files has `_lib_version' initialized to a different (enum)
154
   value.  The SVR4 library routines query the value of `_lib_version'
155
   at run to decide how they should behave.  Specifically, they decide
156
   (based upon the value of `_lib_version') if they will act in a strictly
157
   ANSI conforming manner or not.
158
*/
159
 
160
#undef  STARTFILE_SPEC
161
#define STARTFILE_SPEC "%{!shared: \
162
                         %{!symbolic: \
163
                          %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
164
                        %{pg:gcrti.o%s}%{!pg:crti.o%s} \
165
                        %{ansi:values-Xc.o%s} \
166
                        %{!ansi:values-Xa.o%s} \
167
                        crtbegin.o%s"
168
 
169
/* Don't use bcopy, which doesn't handle overlaps before DYNIX/ptx 4.6.  */
170
 
171
#undef HAVE_BCOPY
172
 
173
/* The numbers used to denote specific machine registers in the System V
174
   Release 4 DWARF debugging information are quite likely to be totally
175
   different from the numbers used in BSD stabs debugging information
176
   for the same kind of target machine.  Thus, we undefine the macro
177
   DBX_REGISTER_NUMBER here as an extra inducement to get people to
178
   provide proper machine-specific definitions of DBX_REGISTER_NUMBER
179
   (which is also used to provide DWARF registers numbers in dwarfout.c)
180
   in their tm.h files which include this file.  */
181
 
182
#undef DBX_REGISTER_NUMBER
183
 
184
/* Like block addresses, stabs line numbers are relative to the
185
   current function.  */
186
 
187
#define DBX_LINES_FUNCTION_RELATIVE 1
188
 
189
/* Generate a blank trailing N_SO to mark the end of the .o file, since
190
   we can't depend upon the linker to mark .o file boundaries with
191
   embedded stabs.  */
192
 
193
#define DBX_OUTPUT_NULL_N_SO_AT_MAIN_SOURCE_FILE_END
194
 
195
/* Define the actual types of some ANSI-mandated types.  (These
196
   definitions should work for most SVR4 systems).  */
197
 
198
#undef SIZE_TYPE
199
#define SIZE_TYPE "unsigned int"
200
 
201
#undef PTRDIFF_TYPE
202
#define PTRDIFF_TYPE "int"
203
 
204
#undef WCHAR_TYPE
205
#define WCHAR_TYPE "long int"
206
 
207
#undef WCHAR_TYPE_SIZE
208
#define WCHAR_TYPE_SIZE BITS_PER_WORD
209
 
210
/* This says how to output assembler code to declare an uninitialized
211
   external linkage data item.  There's a bug in the DYNIX/ptx linker
212
   (PR 254649) when the alignment for such an object is specified, so
213
   ignore the ALIGN parameter.  */
214
 
215
#undef ASM_OUTPUT_ALIGNED_COMMON
216
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)              \
217
do {                                                                    \
218
  fprintf ((FILE), "%s", COMMON_ASM_OP);                                \
219
  assemble_name ((FILE), (NAME));                                       \
220
  fprintf ((FILE), ",%lu\n", (unsigned long)(SIZE)); \
221
} while (0)
222
 

powered by: WebSVN 2.1.0

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