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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [config/] [mips/] [iris.h] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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