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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [config/] [mips/] [iris.h] - Blame information for rev 282

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 282 jeremybenn
/* Definitions of target machine for GNU compiler.  Generic IRIX version.
2
   Copyright (C) 1993, 1995, 1996, 1998, 2000,
3
   2001, 2002, 2003, 2004, 2007, 2008, 2009, 2010
4
   Free Software Foundation, Inc.
5
 
6
This file is part of GCC.
7
 
8
GCC is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 3, or (at your option)
11
any later version.
12
 
13
GCC is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17
 
18
You should have received a copy of the GNU General Public License
19
along with GCC; see the file COPYING3.  If not see
20
<http://www.gnu.org/licenses/>.  */
21
 
22
/* We are compiling for IRIX now.  */
23
#undef TARGET_IRIX
24
#define TARGET_IRIX 1
25
 
26
/* MIPS specific debugging info */
27
#define MIPS_DEBUGGING_INFO 1
28
 
29
/* The size in bytes of a DWARF field indicating an offset or length
30
   relative to a debug info section, specified to be 4 bytes in the DWARF-2
31
   specification.  The SGI/MIPS ABI defines it to be the same as PTR_SIZE.  */
32
#define DWARF_OFFSET_SIZE PTR_SIZE
33
 
34
/* The size in bytes of the initial length field in a debug info
35
   section.  The DWARF 3 (draft) specification defines this to be
36
   either 4 or 12 (with a 4-byte "escape" word when it's 12), but the
37
   SGI/MIPS ABI predates this standard and defines it to be the same
38
   as DWARF_OFFSET_SIZE.  */
39
#define DWARF_INITIAL_LENGTH_SIZE DWARF_OFFSET_SIZE
40
 
41
/* MIPS assemblers don't have the usual .set foo,bar construct;
42
   .set is used for assembler options instead.  */
43
#undef SET_ASM_OP
44
#define ASM_OUTPUT_DEF(FILE, LABEL1, LABEL2)                    \
45
  do                                                            \
46
    {                                                           \
47
      fputc ('\t', FILE);                                       \
48
      assemble_name (FILE, LABEL1);                             \
49
      fputs (" = ", FILE);                                      \
50
      assemble_name (FILE, LABEL2);                             \
51
      fputc ('\n', FILE);                                       \
52
    }                                                           \
53
  while (0)
54
 
55
/* The MIPSpro o32 linker warns about not linking .comment sections.  */
56
#undef IDENT_ASM_OP
57
 
58
#undef LOCAL_LABEL_PREFIX
59
#define LOCAL_LABEL_PREFIX (TARGET_NEWABI ? "." : "$")
60
 
61
#undef ASM_DECLARE_OBJECT_NAME
62
#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
63
 
64
#undef ASM_FINISH_DECLARE_OBJECT
65
#define ASM_FINISH_DECLARE_OBJECT mips_finish_declare_object
66
 
67
/* Specify wchar_t types.  */
68
#undef WCHAR_TYPE
69
#define WCHAR_TYPE (Pmode == DImode ? "int" : "long int")
70
 
71
#undef WCHAR_TYPE_SIZE
72
#define WCHAR_TYPE_SIZE INT_TYPE_SIZE
73
 
74
/* Same for wint_t.  */
75
#undef WINT_TYPE
76
#define WINT_TYPE (Pmode == DImode ? "int" : "long int")
77
 
78
#undef WINT_TYPE_SIZE
79
#define WINT_TYPE_SIZE 32
80
 
81
/* C99 stdint.h types.  */
82
#define INT8_TYPE "signed char"
83
#define INT16_TYPE "short int"
84
#define INT32_TYPE "int"
85
#define INT64_TYPE "long long int"
86
#define UINT8_TYPE "unsigned char"
87
#define UINT16_TYPE "short unsigned int"
88
#define UINT32_TYPE "unsigned int"
89
#define UINT64_TYPE "long long unsigned int"
90
 
91
#define INT_LEAST8_TYPE "signed char"
92
#define INT_LEAST16_TYPE "short int"
93
#define INT_LEAST32_TYPE "int"
94
#define INT_LEAST64_TYPE "long long int"
95
#define UINT_LEAST8_TYPE "unsigned char"
96
#define UINT_LEAST16_TYPE "short unsigned int"
97
#define UINT_LEAST32_TYPE "unsigned int"
98
#define UINT_LEAST64_TYPE "long long unsigned int"
99
 
100
#define INT_FAST8_TYPE "signed char"
101
#define INT_FAST16_TYPE "short int"
102
#define INT_FAST32_TYPE "int"
103
#define INT_FAST64_TYPE "long long int"
104
#define UINT_FAST8_TYPE "unsigned char"
105
#define UINT_FAST16_TYPE "short unsigned int"
106
#define UINT_FAST32_TYPE "unsigned int"
107
#define UINT_FAST64_TYPE "long long unsigned int"
108
 
109
#define INTMAX_TYPE "long long int"
110
#define UINTMAX_TYPE "long long unsigned int"
111
 
112
#define INTPTR_TYPE "long int"
113
#define UINTPTR_TYPE "long unsigned int"
114
 
115
#define SIG_ATOMIC_TYPE "int"
116
 
117
/* Plain char is unsigned in the SGI compiler.  */
118
#undef DEFAULT_SIGNED_CHAR
119
#define DEFAULT_SIGNED_CHAR 0
120
 
121
#define WORD_SWITCH_TAKES_ARG(STR)                      \
122
  (DEFAULT_WORD_SWITCH_TAKES_ARG (STR)                  \
123
   || strcmp (STR, "rpath") == 0)
124
 
125
#define TARGET_OS_CPP_BUILTINS()                                \
126
  do                                                            \
127
    {                                                           \
128
      builtin_define_std ("host_mips");                         \
129
      builtin_define_std ("sgi");                               \
130
      builtin_define_std ("unix");                              \
131
      builtin_define_std ("SYSTYPE_SVR4");                      \
132
      builtin_define ("_MODERN_C");                             \
133
      builtin_define ("_SVR4_SOURCE");                          \
134
      builtin_define ("__DSO__");                               \
135
      builtin_assert ("system=unix");                           \
136
      builtin_assert ("system=svr4");                           \
137
      builtin_assert ("machine=sgi");                           \
138
                                                                \
139
      if (!ISA_MIPS1 && !ISA_MIPS2)                             \
140
        builtin_define ("_COMPILER_VERSION=601");               \
141
                                                                \
142
      /* We must always define _LONGLONG, even when -ansi is    \
143
         used, because IRIX 5 system header files require it.   \
144
         This is OK, because gcc never warns when long long     \
145
         is used in system header files.                        \
146
                                                                \
147
         An alternative would be to support the SGI builtin     \
148
         type __long_long.  */                                  \
149
      builtin_define ("_LONGLONG");                             \
150
                                                                \
151
      /* IRIX 6.5.18 and above provide many ISO C99             \
152
         features protected by the __c99 macro.                 \
153
         libstdc++ v3 needs them as well.  */                   \
154
      if (TARGET_IRIX6)                                         \
155
        if (flag_isoc99 || c_dialect_cxx ())                    \
156
          builtin_define ("__c99");                             \
157
                                                                \
158
      /* The GNU C++ standard library requires that             \
159
         __EXTENSIONS__ and _SGI_SOURCE be defined on at        \
160
         least IRIX 6.2 and probably all IRIX 6 prior to 6.5.   \
161
         We don't need this on IRIX 6.5 itself, but it          \
162
         shouldn't hurt other than the namespace pollution.  */ \
163
      if (!flag_iso || (TARGET_IRIX6 && c_dialect_cxx ()))      \
164
        {                                                       \
165
          builtin_define ("__EXTENSIONS__");                    \
166
          builtin_define ("_SGI_SOURCE");                       \
167
        }                                                       \
168
    }                                                           \
169
  while (0)
170
 
171
#undef SUBTARGET_CC1_SPEC
172
#define SUBTARGET_CC1_SPEC "%{static: -mno-abicalls}"
173
 
174
#undef INIT_SECTION_ASM_OP
175
#define INIT_SECTION_ASM_OP "\t.section\t.gcc_init,\"ax\",@progbits"
176
 
177
#undef FINI_SECTION_ASM_OP
178
#define FINI_SECTION_ASM_OP "\t.section\t.gcc_fini,\"ax\",@progbits"
179
 
180
#ifdef IRIX_USING_GNU_LD
181
#define IRIX_NO_UNRESOLVED ""
182
#else
183
#define IRIX_NO_UNRESOLVED "-no_unresolved"
184
#endif
185
 
186
#ifdef IRIX_USING_GNU_LD
187
#define SUBTARGET_DONT_WARN_UNUSED_SPEC ""
188
#define SUBTARGET_WARN_UNUSED_SPEC ""
189
#else
190
#define SUBTARGET_DONT_WARN_UNUSED_SPEC "-dont_warn_unused"
191
#define SUBTARGET_WARN_UNUSED_SPEC "-warn_unused"
192
#endif
193
 
194
/* Generic part of the LINK_SPEC.  */
195
#undef LINK_SPEC
196
#define LINK_SPEC "\
197
%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
198
%{bestGnum} %{shared} %{non_shared} \
199
%{call_shared} %{no_archive} %{exact_version} \
200
%{!shared: \
201
  %{!non_shared: %{!call_shared:%{!r: -call_shared " IRIX_NO_UNRESOLVED "}}}} \
202
%{rpath} %{!r: -init __gcc_init -fini __gcc_fini} " IRIX_SUBTARGET_LINK_SPEC
203
 
204
/* A linker error can empirically be avoided by removing duplicate
205
   library search directories.  */
206
#define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 1
207
 
208
/* Add -g to mips.h default to avoid confusing gas with local symbols
209
   generated from stabs info.  */
210
#undef NM_FLAGS
211
#define NM_FLAGS "-Bng"
212
 
213
/* The system header files are C++ aware.  */
214
/* ??? Unfortunately, most but not all of the headers are C++ aware.
215
   Specifically, curses.h is not, and as a consequence, defining this
216
   used to prevent libg++ building.  This is no longer the case so
217
   define it again to prevent other problems, e.g. with getopt in
218
   unistd.h.  We still need some way to fix just those files that need
219
   fixing.  */
220
#define NO_IMPLICIT_EXTERN_C 1
221
 
222
/* -G is incompatible with -KPIC which is the default, so only allow objects
223
   in the small data section if the user explicitly asks for it.  */
224
#undef MIPS_DEFAULT_GVALUE
225
#define MIPS_DEFAULT_GVALUE 0
226
 
227
/* The native o32 IRIX linker does not support merging without a
228
   special elspec(5) file.  */
229
#ifndef IRIX_USING_GNU_LD
230
#undef HAVE_GAS_SHF_MERGE
231
#define HAVE_GAS_SHF_MERGE 0
232
#endif

powered by: WebSVN 2.1.0

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