]> gcc.gnu.org Git - gcc.git/blame - gcc/config/sparc/sol2.h
Change the location of the Sun bundled C compiler (for backup defaults).
[gcc.git] / gcc / config / sparc / sol2.h
CommitLineData
8f3d7f00
RS
1/* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
2 Copyright 1992 Free Software Foundation, Inc.
3 Contributed by Ron Guilmette (rfg@ncd.com) and
4 David V. Henkel-Wallace (gumby@cygnus.com).
4ab76dcd
RK
5
6This file is part of GNU CC.
7
8GNU CC is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2, or (at your option)
11any later version.
12
13GNU CC is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU CC; see the file COPYING. If not, write to
20the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
21
8f3d7f00 22#define NO_UNDERSCORES 1
4ab76dcd 23
8f3d7f00 24/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
4ab76dcd
RK
25#include "sparcv4.h"
26
8f3d7f00
RS
27#undef CPP_PREDEFINES
28#define CPP_PREDEFINES \
29 "-Dsun -Dsparc -Dunix -D__svr4__ -Asystem(unix) -Acpu(sparc) -Amachine(sparc)"
30
31/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
32 It's safe to pass -s always, even if -g is not used. */
33#undef ASM_SPEC
34#define ASM_SPEC \
35 "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s"
36
37/* However it appears that Solaris 2.0 uses the same reg numbering as
38 the old BSD-style system did. */
39
40#undef DBX_REGISTER_NUMBER
41/* Same as sparc.h */
42#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
43
44#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
45
46#define DBX_BLOCKS_FUNCTION_RELATIVE 1
47
48/* "gcc2_compiled." must be a .stabs, not an ordinary symbol, or GDB won't
49 see it. Furthermore, since GDB reads the input piecemeal, starting
50 with each N_SO, it's a lot easier if the gcc2 flag symbol is *after*
51 the N_SO rather than before it. So we emit an N_OPT stab here. */
52
53#define ASM_IDENTIFY_GCC(FILE) /* Do nothing */
54
55#define ASM_IDENTIFY_GCC_AFTER_SOURCE(FILE) \
56 fputs ("\t.stabs\t\"gcc2_compiled.\", 0x3c, 0, 0, 0\n", FILE)
57
58#undef CTORS_SECTION_ASM_OP
59#undef DTORS_SECTION_ASM_OP
60
61#if 0 /* These seems unnecessary; the ones in sparcv4.h look right. */
62#undef TEXT_SECTION_ASM_OP
63#undef DATA_SECTION_ASM_OP
64#undef BSS_SECTION_ASM_OP
65#undef CONST_SECTION_ASM_OP
66#undef INIT_SECTION_ASM_OP
67
68#define TEXT_SECTION_ASM_OP "\t.section\t\".text\""
69#define DATA_SECTION_ASM_OP "\t.section\t\".data\""
70#define BSS_SECTION_ASM_OP "\t.section\t\".bss\""
71
72#define CONST_SECTION_ASM_OP "\t.section\t\".rodata\""
73#define INIT_SECTION_ASM_OP "\t.section\t\".init\""
74#endif
75
76#define CTORS_SECTION_ASM_OP "\t.section\t\".ctors\",#alloc,#execinstr\n"
77#define DTORS_SECTION_ASM_OP "\t.section\t\".dtors\",#alloc,#execinstr\n"
78
8f3d7f00
RS
79/* The Solaris 2 assembler uses .skip, not .zero, so put this back. */
80#undef ASM_OUTPUT_SKIP
81#define ASM_OUTPUT_SKIP(FILE,SIZE) \
82 fprintf (FILE, "\t.skip %u\n", (SIZE))
83
84#undef ASM_OUTPUT_ALIGNED_LOCAL
85#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
86do { \
87 fputs ("\t.local\t", (FILE)); \
88 assemble_name ((FILE), (NAME)); \
89 putc ('\n', (FILE)); \
90 ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \
91} while (0)
92
93#undef COMMON_ASM_OP
94#define COMMON_ASM_OP "\t.common"
95
96/* This is how to output a definition of an internal numbered label where
97 PREFIX is the class of label and NUM is the number within the class. */
98
99#undef ASM_OUTPUT_INTERNAL_LABEL
100#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
101 fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
102
103/* This is how to output a reference to an internal numbered label where
104 PREFIX is the class of label and NUM is the number within the class. */
105
106#undef ASM_OUTPUT_INTERNAL_LABELREF
107#define ASM_OUTPUT_INTERNAL_LABELREF(FILE,PREFIX,NUM) \
108 fprintf (FILE, ".L%s%d", PREFIX, NUM)
109
110/* This is how to store into the string LABEL
111 the symbol_ref name of an internal numbered label where
112 PREFIX is the class of label and NUM is the number within the class.
113 This is suitable for output with `assemble_name'. */
114
115#undef ASM_GENERATE_INTERNAL_LABEL
116#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
117 sprintf (LABEL, "*.L%s%d", PREFIX, NUM)
118
119/* in Solaris 2.0, linenos are relative to the current fn. */
120#undef ASM_OUTPUT_SOURCE_LINE
121#define ASM_OUTPUT_SOURCE_LINE(file, line) \
122 { static int sym_lineno = 1; \
123 fprintf (file, ".stabn 68,0,%d,.LM%d-%s\n.LM%d:\n", \
124 line, sym_lineno, \
125 IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl)),\
126 sym_lineno); \
127 sym_lineno += 1; }
128
129/* But, to make this work, we have to output the stabs for the function
130 name *first*... */
131#define DBX_FUNCTION_FIRST
132
133\f
134/* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us.
135 We don't use the standard LIB_SPEC only because we don't yet support c++ */
4ab76dcd
RK
136
137/* If we cannot find the GNU *crt*.o files in the STANDARD_STARTFILE_PREFIX
138 directory, our fallback strategy must be to look for these files instead
139 in the Sun C 2.0 directory. */
140
8f3d7f00 141#undef MD_STARTFILE_PREFIX
f36e573d 142#define MD_STARTFILE_PREFIX "/opt/SUNWspro/SC2.0/"
8f3d7f00
RS
143
144#undef STARTFILE_SPEC
145#define STARTFILE_SPEC "%{!shared: \
146 %{!symbolic: \
147 %{pg:crt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} \
148 %{pg:gmon.o%s} \
149 %{pg:crti.o%s}%{!pg:crti.o%s} \
150 %{ansi:/usr/ccs/lib/values-Xc.o%s} \
151 %{!ansi: \
152 %{traditional:/usr/ccs/lib/values-Xt.o%s} \
153 %{!traditional:/usr/ccs/lib/values-Xa.o%s}}}}"
154
155#undef LIB_SPEC
156#define LIB_SPEC \
157 "%{!shared:%{!symbolic:-lc}} \
158 %{!shared:%{!symbolic:%{pg:crtn.o%s}%{!pg:crtn.o%s}}}"
This page took 0.599684 seconds and 5 git commands to generate.