OSDN Git Service

(SET_ASM_OP): New. __attribute__ ((alias ()))
[pf3gnuchains/gcc-fork.git] / gcc / config / linux.h
1 /* Definitions for Linux with ELF format
2    Copyright (C) 1995, 1996 Free Software Foundation, Inc.
3    Contributed by Eric Youngdale.
4    Modified for stabs-in-ELF by H.J. Lu.
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 #undef HAVE_ATEXIT
27 #define HAVE_ATEXIT
28
29 /* Linux uses ctype from glibc.a. I am not sure how complete it is.
30    For now, we play safe. It may change later. */
31
32 #if 0
33 #undef MULTIBYTE_CHARS
34 #define MULTIBYTE_CHARS 1
35 #endif
36
37 /* There are conflicting reports about whether this system uses
38    a different assembler syntax.  wilson@cygnus.com says # is right.  */
39 #undef COMMENT_BEGIN
40 #define COMMENT_BEGIN "#"
41
42 #undef ASM_APP_ON
43 #define ASM_APP_ON "#APP\n"
44
45 #undef ASM_APP_OFF
46 #define ASM_APP_OFF "#NO_APP\n"
47
48 #define SET_ASM_OP      ".set"
49
50 /* Use stabs instead of DWARF debug format.  */
51 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
52 #include "svr4.h"
53
54 #undef MD_EXEC_PREFIX
55 #undef MD_STARTFILE_PREFIX
56
57 /* Output at beginning of assembler file.  */
58 /* The .file command should always begin the output.  */
59 #undef ASM_FILE_START
60 #define ASM_FILE_START(FILE)                                            \
61   do {                                                                  \
62         output_file_directive (FILE, main_input_filename);              \
63         fprintf (FILE, "\t.version\t\"01.01\"\n");                      \
64   } while (0)
65
66 /* Provide a STARTFILE_SPEC appropriate for Linux.  Here we add
67    the Linux magical crtbegin.o file (see crtstuff.c) which
68    provides part of the support for getting C++ file-scope static
69    object constructed before entering `main'. */
70    
71 #undef  STARTFILE_SPEC
72 #define STARTFILE_SPEC \
73   "%{!shared: \
74      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
75                        %{!p:%{profile:gcrt1.o%s} \
76                          %{!profile:crt1.o%s}}}} \
77    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
78
79 /* Provide a ENDFILE_SPEC appropriate for Linux.  Here we tack on
80    the Linux magical crtend.o file (see crtstuff.c) which
81    provides part of the support for getting C++ file-scope static
82    object constructed before entering `main', followed by a normal
83    Linux "finalizer" file, `crtn.o'.  */
84
85 #undef  ENDFILE_SPEC
86 #define ENDFILE_SPEC \
87   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
88
89 /* This is for -profile to use -lc_p instead of -lc. */
90 #undef  CC1_SPEC
91 #define CC1_SPEC "%{profile:-p}"
92
93 #undef  LIB_SPEC
94 #if 1
95 /* We no longer link with libc_p.a or libg.a by default. If you
96  * want to profile or debug the Linux C library, please add
97  * -profile or -ggdb to LDFLAGS at the link time, respectively.
98  */
99 #define LIB_SPEC \
100   "%{!shared: %{p:-lgmon} %{pg:-lgmon} %{profile:-lgmon -lc_p} \
101      %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
102 #else
103 #define LIB_SPEC \
104   "%{!shared: \
105      %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \
106        %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}"
107 #endif