]>
Commit | Line | Data |
---|---|---|
956d6950 | 1 | /* Definitions for Linux-based GNU systems with ELF format |
e662a129 | 2 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. |
9e2fc7c0 | 3 | Contributed by Eric Youngdale. |
e5e809f4 | 4 | Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org). |
9e2fc7c0 RK |
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 | |
0af195cf RK |
20 | the Free Software Foundation, 59 Temple Place - Suite 330, |
21 | Boston, MA 02111-1307, USA. */ | |
9e2fc7c0 | 22 | |
991b6592 | 23 | /* Don't assume anything about the header files. */ |
9e2fc7c0 RK |
24 | #define NO_IMPLICIT_EXTERN_C |
25 | ||
956d6950 | 26 | /* GNU/Linux uses ctype from glibc.a. I am not sure how complete it is. |
991b6592 | 27 | For now, we play safe. It may change later. */ |
9e2fc7c0 RK |
28 | |
29 | #if 0 | |
30 | #undef MULTIBYTE_CHARS | |
31 | #define MULTIBYTE_CHARS 1 | |
32 | #endif | |
33 | ||
9e2fc7c0 RK |
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 | ||
9e2fc7c0 RK |
40 | #undef MD_EXEC_PREFIX |
41 | #undef MD_STARTFILE_PREFIX | |
42 | ||
956d6950 JL |
43 | /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add |
44 | the GNU/Linux magical crtbegin.o file (see crtstuff.c) which | |
9e2fc7c0 | 45 | provides part of the support for getting C++ file-scope static |
991b6592 | 46 | object constructed before entering `main'. */ |
9e2fc7c0 RK |
47 | |
48 | #undef STARTFILE_SPEC | |
275b60d6 | 49 | #ifdef USE_GNULIBC_1 |
8baa67d9 RK |
50 | #define STARTFILE_SPEC \ |
51 | "%{!shared: \ | |
52 | %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ | |
53 | %{!p:%{profile:gcrt1.o%s} \ | |
54 | %{!profile:crt1.o%s}}}} \ | |
12e2fea9 | 55 | crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" |
275b60d6 JJ |
56 | #else |
57 | #define STARTFILE_SPEC \ | |
58 | "%{!shared: \ | |
59 | %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ | |
60 | %{!p:%{profile:gcrt1.o%s} \ | |
61 | %{!profile:crt1.o%s}}}} \ | |
62 | crti.o%s %{static:crtbeginT.o%s}\ | |
63 | %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}" | |
64 | #endif | |
9e2fc7c0 | 65 | |
956d6950 JL |
66 | /* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on |
67 | the GNU/Linux magical crtend.o file (see crtstuff.c) which | |
9e2fc7c0 RK |
68 | provides part of the support for getting C++ file-scope static |
69 | object constructed before entering `main', followed by a normal | |
956d6950 | 70 | GNU/Linux "finalizer" file, `crtn.o'. */ |
9e2fc7c0 RK |
71 | |
72 | #undef ENDFILE_SPEC | |
73 | #define ENDFILE_SPEC \ | |
74 | "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" | |
12e2fea9 | 75 | |
991b6592 | 76 | /* This is for -profile to use -lc_p instead of -lc. */ |
bba17b29 | 77 | #ifndef CC1_SPEC |
12e2fea9 | 78 | #define CC1_SPEC "%{profile:-p}" |
bba17b29 L |
79 | #endif |
80 | ||
281e78ae | 81 | /* The GNU C++ standard library requires that these macros be defined. */ |
37344b9b | 82 | #undef CPLUSPLUS_CPP_SPEC |
281e78ae | 83 | #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" |
37344b9b | 84 | |
12e2fea9 | 85 | #undef LIB_SPEC |
12e2fea9 | 86 | /* We no longer link with libc_p.a or libg.a by default. If you |
956d6950 | 87 | want to profile or debug the GNU/Linux C library, please add |
991b6592 | 88 | -profile or -ggdb to LDFLAGS at the link time, respectively. */ |
020bf2e7 RK |
89 | #if 1 |
90 | #ifdef USE_GNULIBC_1 | |
12e2fea9 RK |
91 | #define LIB_SPEC \ |
92 | "%{!shared: %{p:-lgmon} %{pg:-lgmon} %{profile:-lgmon -lc_p} \ | |
93 | %{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}" | |
8baa67d9 | 94 | #else |
020bf2e7 | 95 | #define LIB_SPEC \ |
1398405b L |
96 | "%{shared: -lc} \ |
97 | %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \ | |
020bf2e7 RK |
98 | %{profile:-lc_p} %{!profile: -lc}}" |
99 | #endif | |
100 | #else | |
12e2fea9 RK |
101 | #define LIB_SPEC \ |
102 | "%{!shared: \ | |
103 | %{p:-lgmon -lc_p} %{pg:-lgmon -lc_p} \ | |
104 | %{!p:%{!pg:%{!g*:-lc} %{g*:-lg}}}}" | |
8baa67d9 | 105 | #endif |
f0ce07b8 | 106 | |
275b60d6 JJ |
107 | #if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR) |
108 | #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " | |
109 | #endif | |
110 | ||
f0ce07b8 JM |
111 | /* Define this so we can compile MS code for use with WINE. */ |
112 | #define HANDLE_PRAGMA_PACK_PUSH_POP |