1 /* Target definitions for GNU compiler for Intel 80386 running Solaris 2
2 Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
3 Contributed by Fred Fish (fnf@cygnus.com).
5 This file is part of GNU CC.
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)
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.
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. */
22 #include "i386/sysv4.h"
24 /* We use stabs-in-elf for debugging, because that is what the native
26 #undef PREFERRED_DEBUGGING_TYPE
27 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
29 #if ! GAS_REJECTS_MINUS_S
32 Changed from config/svr4.h in the following ways:
34 - Removed -Yd (neither the sun bundled assembler nor gas accept it).
35 - Added "-s" so that stabs are not discarded.
40 "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s"
42 #else /* GAS_REJECTS_MINUS_S */
44 /* Same as above, except for -s, unsupported by GNU as. */
47 "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*}"
49 #endif /* GAS_REJECTS_MINUS_S */
51 /* The Solaris 2.0 x86 linker botches alignment of code sections.
52 It tries to align to a 16 byte boundary by padding with 0x00000090
53 ints, rather than 0x90 bytes (nop). This generates trash in the
54 ".init" section since the contribution from crtbegin.o is only 7
55 bytes. The linker pads it to 16 bytes with a single 0x90 byte, and
56 two 0x00000090 ints, which generates a segmentation violation when
57 executed. This macro forces the assembler to do the padding, since
58 it knows what it is doing. */
60 #define FORCE_INIT_SECTION_ALIGN asm (ALIGN_ASM_OP ## " 16")
61 #define FORCE_FINI_SECTION_ALIGN FORCE_INIT_SECTION_ALIGN
63 /* Add "sun" to the list of symbols defined for SVR4. */
65 #define CPP_PREDEFINES \
66 "-Dunix -D__svr4__ -D__SVR4 -Dsun -Asystem(svr4)"
69 #define CPP_SPEC "%(cpp_cpu) \
70 %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}"
74 "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} %{!shared:%{!symbolic:-lc}}"
77 #define ENDFILE_SPEC "crtend.o%s %{pg:crtn.o%s}%{!pg:crtn.o%s}"
80 #define STARTFILE_SPEC "%{!shared: \
82 %{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
83 %{pg:gmon.o%s} crti.o%s \
84 %{ansi:values-Xc.o%s} \
86 %{traditional:values-Xt.o%s} \
87 %{!traditional:values-Xa.o%s}} \
90 /* This should be the same as in svr4.h, except with -R added. */
95 %{static:-dn -Bstatic} \
96 %{shared:-G -dy -z text} \
97 %{symbolic:-Bsymbolic -G -dy -z text} \
102 %{!YP,*:%{pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
103 %{!pg:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
104 %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \
107 %{!YP,*:%{pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
108 %{!pg:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
109 %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}} \
112 /* This defines which switch letters take arguments.
113 It is as in svr4.h but with -R added. */
115 #undef SWITCH_TAKES_ARG
116 #define SWITCH_TAKES_ARG(CHAR) \
117 (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
122 #define STDC_0_IN_SYSTEM_HEADERS
124 #undef LOCAL_LABEL_PREFIX
125 #define LOCAL_LABEL_PREFIX "."