OSDN Git Service

3d92619c3e584725fca77e13081dad90aa9aa866
[pf3gnuchains/gcc-fork.git] / gcc / config / mips / osfrose.h
1 /* Definitions of target machine for GNU compiler.
2    DECstation (OSF/1 reference port with OSF/rose) version.
3    Copyright (C) 1991, 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
4
5 This file is part of GNU CC.
6
7 GNU CC 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 2, or (at your option)
10 any later version.
11
12 GNU CC 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 GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 #define DECSTATION
23 #define OSF_OS
24
25 #define HALF_PIC_DEBUG  TARGET_DEBUG_B_MODE
26 #define HALF_PIC_PREFIX "$Lp."
27
28 #include "halfpic.h"
29
30 #define WORD_SWITCH_TAKES_ARG(STR)                                      \
31  (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) || !strcmp (STR, "pic-names"))
32
33 #define CPP_PREDEFINES "\
34 -DOSF -DOSF1 -Dbsd4_2 -DMIPSEL -Dhost_mips -Dmips -Dunix -DR3000 -DSYSTYPE_BSD \
35 -Asystem(unix) -Asystem(xpg4) -Acpu(mips) -Amachine(mips)"
36
37 #define SUBTARGET_CPP_SIZE_SPEC "\
38 %{mlong64:-D__PTRDIFF_TYPE__=long\\ int} \
39 %{!mlong64:-D__PTRDIFF_TYPE__=int}"
40
41 #define SUBTARGET_CPP_SPEC "\
42 %{.S:   %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}} \
43 %{.s:   %{!ansi:%{!traditional:%{!traditional-cpp:%{!ftraditional: -traditional}}}}}"
44
45 /* ??? This assumes that GNU as is always used with GNU ld, and MIPS as is
46    always used with MIPS ld.  */
47 #define LINK_SPEC "\
48 %{G*} %{EL} %{EB} %{mips1} %{mips2} %{mips3} \
49 %{bestGnum} \
50 %{!mmips-as: \
51         %{v*: -v} \
52         %{!noshrlib: %{pic-none: -noshrlib} %{!pic-none: -warn_nopic}} \
53         %{nostdlib} %{noshrlib} %{glue}}"
54
55 #define LIB_SPEC "-lc"
56
57 /* Define this macro meaning that `gcc' should find the library
58    `libgcc.a' by hand, rather than passing the argument `-lgcc' to
59    tell the linker to do the search. */
60
61 #define LINK_LIBGCC_SPECIAL 1
62
63 #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
64
65 #define MACHINE_TYPE "DECstation with OSF/rose objects"
66
67 #ifndef MD_EXEC_PREFIX
68 #define MD_EXEC_PREFIX          "/usr/ccs/gcc/"
69 #endif
70
71 #ifndef MD_STARTFILE_PREFIX
72 #define MD_STARTFILE_PREFIX     "/usr/ccs/lib/"
73 #endif
74
75 /* Turn on -mpic-extern by default.  */
76 #define CC1_SPEC "\
77 %{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
78 %{mips1:-mfp32 -mgp32} %{mips2:-mfp32 -mgp32} %{mips3:-mfp64 -mgp64} \
79 %{mint64|mlong64|mlong32:-mexplicit-type-size }\
80 %{G*} \
81 %{pic-none:   -mno-half-pic} \
82 %{pic-lib:    -mhalf-pic} \
83 %{pic-extern: -mhalf-pic} \
84 %{pic-calls:  -mhalf-pic} \
85 %{pic-names*: -mhalf-pic} \
86 %{!pic-*:     -mhalf-pic}"
87
88 /* Specify size_t and wchar_t types.  */
89 #define SIZE_TYPE       "long unsigned int"
90 #define WCHAR_TYPE      "unsigned int"
91 #define WCHAR_TYPE_SIZE BITS_PER_WORD
92 #define MAX_WCHAR_TYPE_SIZE MAX_LONG_TYPE_SIZE
93
94 /* OSF/1 uses gas, not the mips assembler.  */
95 #define TARGET_DEFAULT MASK_GAS
96
97 /* OSF/rose uses stabs, not ECOFF.  */
98 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
99
100 /* enable dwarf debugging for testing */
101 #define DWARF_DEBUGGING_INFO
102 /* This is needed by dwarfout.c.  */
103 #define SET_ASM_OP      ".set"
104
105 /* Tell collect that the object format is OSF/rose.  */
106 #define OBJECT_FORMAT_ROSE
107
108 /* Tell collect where the appropriate binaries are.  */
109 #define REAL_LD_FILE_NAME       "/usr/ccs/gcc/gld"
110 #define REAL_NM_FILE_NAME       "/usr/ccs/bin/nm"
111 #define REAL_STRIP_FILE_NAME    "/usr/ccs/bin/strip"
112
113 /* Default to -G 0 unless doing ecoff work.  */
114 #define MIPS_DEFAULT_GVALUE ((TARGET_MIPS_AS) ? 8 : 0)
115
116 /* Use atexit for static constructors/destructors, instead of defining
117    our own exit function.  */
118 #define HAVE_ATEXIT
119
120 /* Generate calls to memcpy, etc., not bcopy, etc.  */
121 #define TARGET_MEM_FUNCTIONS
122
123 /* A C statement to output assembler commands which will identify
124    the object file as having been compiled with GNU CC (or another
125    GNU compiler).
126
127    If you don't define this macro, the string `gcc2_compiled.:' is
128    output.  This string is calculated to define a symbol which, on
129    BSD systems, will never be defined for any other reason.  GDB
130    checks for the presence of this symbol when reading the symbol
131    table of an executable.
132
133    On non-BSD systems, you must arrange communication with GDB in
134    some other fashion.  If GDB is not used on your system, you can
135    define this macro with an empty body.
136
137    On OSF/1, gcc2_compiled. confuses the kernel debugger, so don't
138    put it out.  */
139
140 #define ASM_IDENTIFY_GCC(STREAM)
141
142 /* Identify the front-end which produced this file.  To keep symbol
143    space down, and not confuse kdb, only do this if the language is
144    not C.  */
145
146 #define ASM_IDENTIFY_LANGUAGE(STREAM)                                   \
147 {                                                                       \
148   if (strcmp (lang_identify (), "c") != 0)                              \
149     output_lang_identify (STREAM);                                      \
150 }