OSDN Git Service

config:
[pf3gnuchains/gcc-fork.git] / gcc / config / linux.h
1 /* Definitions for Linux-based GNU systems with ELF format
2    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
3    Contributed by Eric Youngdale.
4    Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
5
6 This file is part of GNU CC.
7
8 GNU CC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12
13 GNU CC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GNU CC; see the file COPYING.  If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA.  */
22
23 /* Don't assume anything about the header files. */
24 #define NO_IMPLICIT_EXTERN_C
25
26 /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is.
27    For now, we play safe. It may change later. */
28
29 #if 0
30 #undef MULTIBYTE_CHARS
31 #define MULTIBYTE_CHARS 1
32 #endif
33
34 #undef ASM_APP_ON
35 #define ASM_APP_ON "#APP\n"
36
37 #undef ASM_APP_OFF
38 #define ASM_APP_OFF "#NO_APP\n"
39
40 #define SET_ASM_OP      "\t.set\t"
41
42 /* Use stabs instead of DWARF debug format.  */
43 #undef PREFERRED_DEBUGGING_TYPE
44 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
45 #include "svr4.h"
46
47 #undef MD_EXEC_PREFIX
48 #undef MD_STARTFILE_PREFIX
49
50 /* Output at beginning of assembler file.  */
51 /* The .file command should always begin the output.  */
52 #undef ASM_FILE_START
53 #define ASM_FILE_START(FILE)                                            \
54   do {                                                                  \
55         output_file_directive (FILE, main_input_filename);              \
56         fprintf (FILE, "\t.version\t\"01.01\"\n");                      \
57   } while (0)
58
59 /* Provide a STARTFILE_SPEC appropriate for GNU/Linux.  Here we add
60    the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
61    provides part of the support for getting C++ file-scope static
62    object constructed before entering `main'. */
63    
64 #undef  STARTFILE_SPEC
65 #define STARTFILE_SPEC \
66   "%{!shared: \
67      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
68                        %{!p:%{profile:gcrt1.o%s} \
69                          %{!profile:crt1.o%s}}}} \
70    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
71
72 /* Provide a ENDFILE_SPEC appropriate for GNU/Linux.  Here we tack on
73    the GNU/Linux magical crtend.o file (see crtstuff.c) which
74    provides part of the support for getting C++ file-scope static
75    object constructed before entering `main', followed by a normal
76    GNU/Linux "finalizer" file, `crtn.o'.  */
77
78 #undef  ENDFILE_SPEC
79 #define ENDFILE_SPEC \
80   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
81
82 /* This is for -profile to use -lc_p instead of -lc. */
83 #ifndef CC1_SPEC
84 #define CC1_SPEC "%{profile:-p}"
85 #endif
86
87 #ifndef USE_GNULIBC_1
88 #undef DEFAULT_VTABLE_THUNKS
89 #define DEFAULT_VTABLE_THUNKS 1
90 #endif
91
92 #undef  LIB_SPEC
93 /* We no longer link with libc_p.a or libg.a by default. If you
94    want to profile or debug the GNU/Linux C library, please add
95    -profile or -ggdb to LDFLAGS at the link time, respectively. */
96 #if 1
97 #ifdef USE_GNULIBC_1
98 #define LIB_SPEC \
99   "%{!shared: %{p:-lgmon} %{pg:-lgmon} %{profile:-lgmon -lc_p} \
100      %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
101 #else
102 #define LIB_SPEC \
103   "%{shared: -lc} \
104    %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
105         %{profile:-lc_p} %{!profile: -lc}}"
106 #endif
107 #else
108 #define LIB_SPEC \
109   "%{!shared: \
110      %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
111        %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}"
112 #endif
113
114 /* Define this so we can compile MS code for use with WINE.  */
115 #define HANDLE_PRAGMA_PACK_PUSH_POP