]>
Commit | Line | Data |
---|---|---|
956d6950 | 1 | /* Definitions for Linux-based GNU systems with ELF format |
8efcd34f | 2 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004 |
42df2193 | 3 | Free Software Foundation, Inc. |
9e2fc7c0 | 4 | Contributed by Eric Youngdale. |
e5e809f4 | 5 | Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org). |
9e2fc7c0 | 6 | |
2a71dcad | 7 | This file is part of GCC. |
9e2fc7c0 | 8 | |
2a71dcad | 9 | GCC is free software; you can redistribute it and/or modify |
9e2fc7c0 RK |
10 | it under the terms of the GNU General Public License as published by |
11 | the Free Software Foundation; either version 2, or (at your option) | |
12 | any later version. | |
13 | ||
2a71dcad | 14 | GCC is distributed in the hope that it will be useful, |
9e2fc7c0 RK |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | GNU General Public License for more details. | |
18 | ||
19 | You should have received a copy of the GNU General Public License | |
2a71dcad | 20 | along with GCC; see the file COPYING. If not, write to |
39d14dda KC |
21 | the Free Software Foundation, 51 Franklin Street, Fifth Floor, |
22 | Boston, MA 02110-1301, USA. */ | |
9e2fc7c0 | 23 | |
991b6592 | 24 | /* Don't assume anything about the header files. */ |
9e2fc7c0 RK |
25 | #define NO_IMPLICIT_EXTERN_C |
26 | ||
9e2fc7c0 RK |
27 | #undef ASM_APP_ON |
28 | #define ASM_APP_ON "#APP\n" | |
29 | ||
30 | #undef ASM_APP_OFF | |
31 | #define ASM_APP_OFF "#NO_APP\n" | |
32 | ||
9e2fc7c0 RK |
33 | #undef MD_EXEC_PREFIX |
34 | #undef MD_STARTFILE_PREFIX | |
35 | ||
956d6950 JL |
36 | /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add |
37 | the GNU/Linux magical crtbegin.o file (see crtstuff.c) which | |
9e2fc7c0 | 38 | provides part of the support for getting C++ file-scope static |
991b6592 | 39 | object constructed before entering `main'. */ |
9e2fc7c0 RK |
40 | |
41 | #undef STARTFILE_SPEC | |
0a2b72a6 | 42 | #if defined HAVE_LD_PIE |
24a4dd31 JJ |
43 | #define STARTFILE_SPEC \ |
44 | "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ | |
45 | crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" | |
275b60d6 JJ |
46 | #else |
47 | #define STARTFILE_SPEC \ | |
24a4dd31 JJ |
48 | "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \ |
49 | crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" | |
275b60d6 | 50 | #endif |
9e2fc7c0 | 51 | |
956d6950 JL |
52 | /* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on |
53 | the GNU/Linux magical crtend.o file (see crtstuff.c) which | |
9e2fc7c0 RK |
54 | provides part of the support for getting C++ file-scope static |
55 | object constructed before entering `main', followed by a normal | |
956d6950 | 56 | GNU/Linux "finalizer" file, `crtn.o'. */ |
9e2fc7c0 RK |
57 | |
58 | #undef ENDFILE_SPEC | |
59 | #define ENDFILE_SPEC \ | |
24a4dd31 | 60 | "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" |
12e2fea9 | 61 | |
991b6592 | 62 | /* This is for -profile to use -lc_p instead of -lc. */ |
bba17b29 | 63 | #ifndef CC1_SPEC |
12e2fea9 | 64 | #define CC1_SPEC "%{profile:-p}" |
bba17b29 L |
65 | #endif |
66 | ||
281e78ae | 67 | /* The GNU C++ standard library requires that these macros be defined. */ |
37344b9b | 68 | #undef CPLUSPLUS_CPP_SPEC |
281e78ae | 69 | #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" |
37344b9b | 70 | |
12e2fea9 | 71 | #undef LIB_SPEC |
020bf2e7 | 72 | #define LIB_SPEC \ |
17772b2a JJ |
73 | "%{pthread:-lpthread} \ |
74 | %{shared:-lc} \ | |
75 | %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}" | |
f0ce07b8 | 76 | |
26b0ad13 KG |
77 | #define LINUX_TARGET_OS_CPP_BUILTINS() \ |
78 | do { \ | |
79 | builtin_define ("__gnu_linux__"); \ | |
80 | builtin_define_std ("linux"); \ | |
81 | builtin_define_std ("unix"); \ | |
82 | builtin_assert ("system=linux"); \ | |
83 | builtin_assert ("system=unix"); \ | |
84 | builtin_assert ("system=posix"); \ | |
85 | } while (0) | |
86 | ||
0a2b72a6 | 87 | #if defined(HAVE_LD_EH_FRAME_HDR) |
275b60d6 JJ |
88 | #define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " |
89 | #endif | |
90 | ||
f0ce07b8 JM |
91 | /* Define this so we can compile MS code for use with WINE. */ |
92 | #define HANDLE_PRAGMA_PACK_PUSH_POP | |
272f51a3 | 93 | |
42df2193 JJ |
94 | #define LINK_GCC_C_SEQUENCE_SPEC \ |
95 | "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" | |
272f51a3 | 96 | |
8efcd34f AM |
97 | /* Use --as-needed -lgcc_s for eh support. */ |
98 | #ifdef HAVE_LD_AS_NEEDED | |
99 | #define USE_LD_AS_NEEDED 1 | |
100 | #endif | |
101 | ||
272f51a3 JH |
102 | /* Determine whether the the entire c99 runtime |
103 | is present in the runtime library. */ | |
272f51a3 | 104 | #define TARGET_C99_FUNCTIONS 1 |
90b8be73 | 105 | |
4969c0d8 | 106 | #define TARGET_POSIX_IO |