]>
Commit | Line | Data |
---|---|---|
266f9541 | 1 | /* Target definitions for GNU compiler for Intel 80386 running Solaris 2 |
1228a9bd | 2 | Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. |
7d4ea832 | 3 | Contributed by Fred Fish (fnf@cygnus.com). |
266f9541 JW |
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 | |
97aadbb9 RK |
19 | the Free Software Foundation, 59 Temple Place - Suite 330, |
20 | Boston, MA 02111-1307, USA. */ | |
266f9541 JW |
21 | |
22 | #include "i386/sysv4.h" | |
23 | ||
24 | /* The Solaris 2.0 x86 linker botches alignment of code sections. | |
25 | It tries to align to a 16 byte boundary by padding with 0x00000090 | |
26 | ints, rather than 0x90 bytes (nop). This generates trash in the | |
27 | ".init" section since the contribution from crtbegin.o is only 7 | |
28 | bytes. The linker pads it to 16 bytes with a single 0x90 byte, and | |
29 | two 0x00000090 ints, which generates a segmentation violation when | |
30 | executed. This macro forces the assembler to do the padding, since | |
31 | it knows what it is doing. */ | |
32 | ||
1228a9bd | 33 | #define FORCE_INIT_SECTION_ALIGN asm (ALIGN_ASM_OP ## " 16") |
68d69835 | 34 | #define FORCE_FINI_SECTION_ALIGN FORCE_INIT_SECTION_ALIGN |
ebf3718c | 35 | |
bd7da539 RK |
36 | /* Add "sun" to the list of symbols defined for SVR4. */ |
37 | #undef CPP_PREDEFINES | |
38 | #define CPP_PREDEFINES \ | |
8524774e | 39 | "-Dunix -D__svr4__ -D__SVR4 -Dsun -Asystem(svr4)" |
bd7da539 | 40 | |
ebf3718c | 41 | #undef CPP_SPEC |
1228a9bd | 42 | #define CPP_SPEC "%(cpp_cpu) \ |
ebf3718c RS |
43 | %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}" |
44 | ||
45 | #undef LIB_SPEC | |
46 | #define LIB_SPEC \ | |
68d69835 JM |
47 | "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} %{!shared:%{!symbolic:-lc}}" |
48 | ||
49 | #undef ENDFILE_SPEC | |
50 | #define ENDFILE_SPEC "crtend.o%s %{pg:crtn.o%s}%{!pg:crtn.o%s}" | |
ebf3718c | 51 | |
8584b866 SC |
52 | #undef STARTFILE_SPEC |
53 | #define STARTFILE_SPEC "%{!shared: \ | |
54 | %{!symbolic: \ | |
55 | %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\ | |
1228a9bd | 56 | %{pg:gmon.o%s} crti.o%s \ |
8584b866 SC |
57 | %{ansi:values-Xc.o%s} \ |
58 | %{!ansi: \ | |
59 | %{traditional:values-Xt.o%s} \ | |
60 | %{!traditional:values-Xa.o%s}} \ | |
61 | crtbegin.o%s" | |
62 | ||
ebf3718c RS |
63 | /* This should be the same as in svr4.h, except with -R added. */ |
64 | #undef LINK_SPEC | |
65 | #define LINK_SPEC \ | |
c8ce67e2 | 66 | "%{h*} %{v:-V} \ |
ebf3718c RS |
67 | %{b} %{Wl,*:%*} \ |
68 | %{static:-dn -Bstatic} \ | |
68d69835 JM |
69 | %{shared:-G -dy -z text} \ |
70 | %{symbolic:-Bsymbolic -G -dy -z text} \ | |
ebf3718c RS |
71 | %{G:-G} \ |
72 | %{YP,*} \ | |
73 | %{R*} \ | |
74 | %{compat-bsd: \ | |
1228a9bd JW |
75 | %{!YP,*:%{pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ |
76 | %{!pg:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ | |
77 | %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \ | |
ebf3718c RS |
78 | -R /usr/ucblib} \ |
79 | %{!compat-bsd: \ | |
1228a9bd JW |
80 | %{!YP,*:%{pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ |
81 | %{!pg:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ | |
82 | %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}} \ | |
ebf3718c RS |
83 | %{Qy:} %{!Qn:-Qy}" |
84 | ||
85 | /* This defines which switch letters take arguments. | |
86 | It is as in svr4.h but with -R added. */ | |
87 | ||
88 | #undef SWITCH_TAKES_ARG | |
89 | #define SWITCH_TAKES_ARG(CHAR) \ | |
7d4ea832 | 90 | (DEFAULT_SWITCH_TAKES_ARG(CHAR) \ |
33fd3209 | 91 | || (CHAR) == 'R' \ |
ebf3718c RS |
92 | || (CHAR) == 'h' \ |
93 | || (CHAR) == 'z') | |
94 | ||
1228a9bd | 95 | #define STDC_0_IN_SYSTEM_HEADERS |