|
|
1.1 root 1: /* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
2: Copyright 1992 Free Software Foundation, Inc.
1.1.1.3 ! root 3:
! 4: Written by Ron Guilmette ([email protected]).
! 5: Additional changes by David V. Henkel-Wallace ([email protected]).
1.1 root 6:
7: This file is part of GNU CC.
8:
9: GNU CC is free software; you can redistribute it and/or modify
10: it under the terms of the GNU General Public License as published by
11: the Free Software Foundation; either version 2, or (at your option)
12: any later version.
13:
14: GNU CC is distributed in the hope that it will be useful,
15: but WITHOUT ANY WARRANTY; without even the implied warranty of
16: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17: GNU General Public License for more details.
18:
19: You should have received a copy of the GNU General Public License
20: along with GNU CC; see the file COPYING. If not, write to
21: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
22:
23: /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
24: #include "sparc/sysv4.h"
25:
26: #undef CPP_PREDEFINES
27: #define CPP_PREDEFINES \
1.1.1.2 root 28: "-Dsun -Dsparc -Dunix -D__svr4__ \
29: -Asystem(unix) -Asystem(svr4) -Acpu(sparc) -Amachine(sparc)\
1.1 root 30: -D__GCC_NEW_VARARGS__"
31:
32: #undef CPP_SPEC
33: #define CPP_SPEC "\
1.1.1.2 root 34: %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}\
1.1.1.3 ! root 35: %{msparclite:-D__sparclite__} %{mv8:-D__sparc_v8__}\
! 36: %{msupersparc:-D__supersparc__ -D__sparc_v8__}"
1.1 root 37:
38: /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
39: It's safe to pass -s always, even if -g is not used. */
40: #undef ASM_SPEC
41: #define ASM_SPEC \
42: "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
43: %{fpic:-K PIC} %{fPIC:-K PIC}"
44:
45: /* However it appears that Solaris 2.0 uses the same reg numbering as
46: the old BSD-style system did. */
47:
48: #undef DBX_REGISTER_NUMBER
49: /* Same as sparc.h */
50: #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
51:
52: /* We use stabs-in-elf for debugging, because that is what the native
53: toolchain uses. */
1.1.1.3 ! root 54: #undef PREFERRED_DEBUGGING_TYPE
1.1 root 55: #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
56:
57: /* The Solaris 2 assembler uses .skip, not .zero, so put this back. */
58: #undef ASM_OUTPUT_SKIP
59: #define ASM_OUTPUT_SKIP(FILE,SIZE) \
60: fprintf (FILE, "\t.skip %u\n", (SIZE))
61:
62: #undef ASM_OUTPUT_ALIGNED_LOCAL
63: #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \
64: do { \
65: fputs ("\t.local\t", (FILE)); \
66: assemble_name ((FILE), (NAME)); \
67: putc ('\n', (FILE)); \
68: ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN); \
69: } while (0)
70:
71: #undef COMMON_ASM_OP
72: #define COMMON_ASM_OP "\t.common"
73:
74: /* This is how to output a definition of an internal numbered label where
75: PREFIX is the class of label and NUM is the number within the class. */
76:
77: #undef ASM_OUTPUT_INTERNAL_LABEL
78: #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
79: fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
80:
81: /* This is how to output a reference to an internal numbered label where
82: PREFIX is the class of label and NUM is the number within the class. */
83:
84: #undef ASM_OUTPUT_INTERNAL_LABELREF
85: #define ASM_OUTPUT_INTERNAL_LABELREF(FILE,PREFIX,NUM) \
86: fprintf (FILE, ".L%s%d", PREFIX, NUM)
87:
88: /* This is how to store into the string LABEL
89: the symbol_ref name of an internal numbered label where
90: PREFIX is the class of label and NUM is the number within the class.
91: This is suitable for output with `assemble_name'. */
92:
93: #undef ASM_GENERATE_INTERNAL_LABEL
94: #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
95: sprintf (LABEL, "*.L%s%d", PREFIX, NUM)
96:
97:
98: /* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us.
99: We don't use the standard LIB_SPEC only because we don't yet support c++ */
100:
101: /* If we cannot find the GNU *crt*.o files in the STANDARD_STARTFILE_PREFIX
102: directory, our fallback strategy must be to look for these files instead
103: in the Sun C 2.0 directory. */
104:
105: #undef MD_STARTFILE_PREFIX
106: #define MD_STARTFILE_PREFIX "/opt/SUNWspro/SC2.0/"
107:
108: #undef STARTFILE_SPEC
109: #define STARTFILE_SPEC "%{!shared: \
110: %{!symbolic: \
111: %{pg:crt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} \
112: %{pg:gmon.o%s} \
113: %{pg:crti.o%s}%{!pg:crti.o%s} \
114: %{ansi:/usr/ccs/lib/values-Xc.o%s} \
115: %{!ansi: \
116: %{traditional:/usr/ccs/lib/values-Xt.o%s} \
117: %{!traditional:/usr/ccs/lib/values-Xa.o%s}}}} \
118: crtbegin.o%s"
119:
120: /* ??? Note: in order for -compat-bsd to work fully,
121: we must somehow arrange to fixincludes /usr/ucbinclude
122: and put the result in $(libsubdir)/ucbinclude. */
123:
124: #undef LIB_SPEC
125: #define LIB_SPEC \
126: "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
127: %{!shared:%{!symbolic:-lc}} \
128: crtend.o%s \
129: %{!shared:%{!symbolic:%{pg:crtn.o%s}%{!pg:crtn.o%s}}}"
130:
131: /* This should be the same as in svr4.h, except with -R added. */
132: #undef LINK_SPEC
133: #define LINK_SPEC \
134: "%{h*} %{V} %{v:%{!V:-V}} \
135: %{b} %{Wl,*:%*} \
136: %{static:-dn -Bstatic} \
137: %{shared:-G -dy} \
138: %{symbolic:-Bsymbolic -G -dy} \
139: %{G:-G} \
140: %{YP,*} \
141: %{R*} \
142: %{compat-bsd: \
143: %{!YP,*:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
144: %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \
145: -R /usr/ucblib} \
146: %{!compat-bsd: \
147: %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
148: %{!p:-Y P,/usr/ccs/lib:/usr/lib}}} \
149: %{Qy:} %{!Qn:-Qy}"
150:
151: /* This defines which switch letters take arguments.
152: It is as in svr4.h but with -R added. */
153:
154: #undef SWITCH_TAKES_ARG
155: #define SWITCH_TAKES_ARG(CHAR) \
156: ( (CHAR) == 'D' \
157: || (CHAR) == 'U' \
158: || (CHAR) == 'o' \
159: || (CHAR) == 'e' \
160: || (CHAR) == 'u' \
161: || (CHAR) == 'I' \
162: || (CHAR) == 'm' \
163: || (CHAR) == 'L' \
164: || (CHAR) == 'R' \
165: || (CHAR) == 'A' \
166: || (CHAR) == 'h' \
167: || (CHAR) == 'z')
1.1.1.2 root 168:
169: /* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h.
170: Instead, it is enabled here, because it does work under Solaris. */
171: /* Define for support of TFmode long double and REAL_ARITHMETIC.
172: Sparc ABI says that long double is 4 words. */
173: #define LONG_DOUBLE_TYPE_SIZE 128
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.