]>
Commit | Line | Data |
---|---|---|
483f6332 | 1 | /* Definitions for ARM running ucLinux using ELF |
2f83c7d6 | 2 | Copyright (C) 1999, 2001, 2004, 2005, 2007 Free Software Foundation, Inc. |
483f6332 PB |
3 | Contributed by Philip Blundell <pb@nexus.co.uk> |
4 | ||
4f448245 | 5 | This file is part of GCC. |
483f6332 | 6 | |
4f448245 NC |
7 | GCC is free software; you can redistribute it and/or modify it |
8 | under the terms of the GNU General Public License as published | |
2f83c7d6 | 9 | by the Free Software Foundation; either version 3, or (at your |
4f448245 | 10 | option) any later version. |
483f6332 | 11 | |
4f448245 NC |
12 | GCC is distributed in the hope that it will be useful, but WITHOUT |
13 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
14 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
15 | License for more details. | |
483f6332 | 16 | |
4f448245 | 17 | You should have received a copy of the GNU General Public License |
2f83c7d6 NC |
18 | along with GCC; see the file COPYING3. If not see |
19 | <http://www.gnu.org/licenses/>. */ | |
483f6332 | 20 | |
483f6332 PB |
21 | /* We don't want a PLT. */ |
22 | #undef NEED_PLT_RELOC | |
23 | #define NEED_PLT_RELOC 0 | |
24 | ||
25 | #undef TARGET_VERSION | |
26 | #define TARGET_VERSION fputs (" (ARM/ELF ucLinux)", stderr); | |
27 | ||
28 | #undef TARGET_DEFAULT | |
c54c7322 | 29 | #define TARGET_DEFAULT (MASK_SINGLE_PIC_BASE) |
d399ae67 DJ |
30 | |
31 | /* NOTE: The remaining definitions in this file are needed because uclinux | |
32 | does not use config/linux.h. */ | |
33 | ||
c147eacb PB |
34 | /* Add GNU/Linux builtins. */ |
35 | #undef TARGET_OS_CPP_BUILTINS | |
36 | #define TARGET_OS_CPP_BUILTINS() \ | |
37 | do \ | |
38 | { \ | |
39 | builtin_define ("__uClinux__"); \ | |
40 | builtin_define ("__gnu_linux__"); \ | |
41 | builtin_define_std ("linux"); \ | |
42 | builtin_define_std ("unix"); \ | |
43 | builtin_assert ("system=linux"); \ | |
44 | builtin_assert ("system=unix"); \ | |
45 | builtin_assert ("system=posix"); \ | |
46 | } \ | |
47 | while (false) | |
48 | ||
d399ae67 DJ |
49 | /* Do not assume anything about header files. */ |
50 | #define NO_IMPLICIT_EXTERN_C | |
51 | ||
52 | /* The GNU C++ standard library requires that these macros be defined. */ | |
53 | #undef CPLUSPLUS_CPP_SPEC | |
54 | #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" | |
55 | ||
c147eacb PB |
56 | #undef SUBTARGET_EXTRA_LINK_SPEC |
57 | #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux" | |
d399ae67 | 58 | |
c147eacb | 59 | /* Now we define the strings used to build the spec file. */ |
d399ae67 | 60 | #undef STARTFILE_SPEC |
c147eacb | 61 | #define STARTFILE_SPEC "crt1%O%s crti%O%s crtbegin%O%s" |
d399ae67 DJ |
62 | |
63 | #undef ENDFILE_SPEC | |
c147eacb | 64 | #define ENDFILE_SPEC "crtend%O%s crtn%O%s" |
d399ae67 DJ |
65 | |
66 | #undef CC1_SPEC | |
67 | #define CC1_SPEC "%{profile:-p}" | |
68 | ||
c147eacb | 69 | #undef LINK_GCC_C_SEQUENCE_SPEC |
d399ae67 DJ |
70 | #define LINK_GCC_C_SEQUENCE_SPEC \ |
71 | "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" | |
72 | ||
73 | /* Use --as-needed -lgcc_s for eh support. */ | |
74 | #ifdef HAVE_LD_AS_NEEDED | |
75 | #define USE_LD_AS_NEEDED 1 | |
76 | #endif | |
c147eacb PB |
77 | |
78 | #undef LINK_SPEC | |
79 | #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X -elf2flt" | |
80 | ||
81 | #undef LIB_SPEC | |
82 | #define LIB_SPEC \ | |
83 | "%{pthread:-lpthread} \ | |
84 | %{shared:-lc} \ | |
85 | %{!shared:%{profile:-lc_p}%{!profile:-lc}}" |