OSDN Git Service

(STARTFILE_SPEC): Don't force -static for -g.
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / linux.h
1 /* Definitions for Intel 386 running Linux
2    Copyright (C) 1992, 1994 Free Software Foundation, Inc.
3    Contributed by H.J. Lu (hjl@nynexst.com)
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, 675 Mass Ave, Cambridge, MA 02139, USA.  */
20
21 #if 0   /* The FSF has fixed the known bugs. But ....... */
22
23 /* Linux has a hacked gas 1.38.1, which can handle repz, repnz
24  and fildll.  */
25
26 #define GOOD_GAS
27 #endif
28
29 /* Don't assume anything about the header files. */
30 #define NO_IMPLICIT_EXTERN_C
31
32 /* This is tested by i386/gas.h.  */
33 #define YES_UNDERSCORES
34
35 #ifndef LINUX_ELF
36 #include "i386/gstabs.h"
37 #endif
38
39 /* Specify predefined symbols in preprocessor.  */
40
41 #undef CPP_PREDEFINES
42 #define CPP_PREDEFINES "-Dunix -Di386 -Dlinux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386)"
43
44 #undef CPP_SPEC
45 #if TARGET_CPU_DEFAULT == 2
46 #define CPP_SPEC "%{!m386:-D__i486__} %{posix:-D_POSIX_SOURCE}"
47 #else
48 #define CPP_SPEC "%{m486:-D__i486__} %{posix:-D_POSIX_SOURCE}"
49 #endif
50
51 #undef SIZE_TYPE
52 #define SIZE_TYPE "unsigned int"
53
54 #undef PTRDIFF_TYPE
55 #define PTRDIFF_TYPE "int"
56
57 #undef WCHAR_TYPE
58 #define WCHAR_TYPE "long int"
59
60 #undef WCHAR_TYPE_SIZE
61 #define WCHAR_TYPE_SIZE BITS_PER_WORD
62
63 #undef HAVE_ATEXIT
64 #define HAVE_ATEXIT
65
66 /* Linux uses ctype from glibc.a. I am not sure how complete it is.
67    For now, we play safe. It may change later. */
68
69 #if 0
70 #undef MULTIBYTE_CHARS
71 #define MULTIBYTE_CHARS 1
72 #endif
73
74 #undef LIB_SPEC
75 #define LIB_SPEC \
76 "%{mieee-fp:-lieee} %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
77  %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}" 
78
79 #undef STARTFILE_SPEC
80 #define STARTFILE_SPEC  "%{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:crt0.o%s}}"
81
82 \f
83 /* There are conflicting reports about whether this system uses
84    a different assembler syntax.  wilson@cygnus.com says # is right.  */
85 #undef COMMENT_BEGIN
86 #define COMMENT_BEGIN "#"
87
88 #undef ASM_APP_ON
89 #define ASM_APP_ON "#APP\n"
90
91 #undef ASM_APP_OFF
92 #define ASM_APP_OFF "#NO_APP\n"
93 \f
94 /* Don't default to pcc-struct-return, because gcc is the only compiler, and
95    we want to retain compatibility with older gcc versions.  */
96 #define DEFAULT_PCC_STRUCT_RETURN 0
97
98 /* We need that too. */
99 #define HANDLE_SYSV_PRAGMA
100
101 #undef LINK_SPEC
102
103 /* We want to pass -v to linker */
104 #if TARGET_CPU_DEFAULT == 2
105 #define LINK_SPEC       "%{v:-dll-verbose} %{!m386:-m486}"
106 #else
107 #define LINK_SPEC       "%{v:-dll-verbose} %{m486:-m486}"
108 #endif