]>
Commit | Line | Data |
---|---|---|
117756eb | 1 | /* Definitions for ARM running ucLinux using ELF |
f1717362 | 2 | Copyright (C) 1999-2016 Free Software Foundation, Inc. |
117756eb | 3 | Contributed by Philip Blundell <pb@nexus.co.uk> |
4 | ||
acf6ed70 | 5 | This file is part of GCC. |
117756eb | 6 | |
acf6ed70 | 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 | |
038d1e19 | 9 | by the Free Software Foundation; either version 3, or (at your |
acf6ed70 | 10 | option) any later version. |
117756eb | 11 | |
acf6ed70 | 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. | |
117756eb | 16 | |
b81ef88d | 17 | Under Section 7 of GPL version 3, you are granted additional |
18 | permissions described in the GCC Runtime Library Exception, version | |
19 | 3.1, as published by the Free Software Foundation. | |
20 | ||
6f0c730b | 21 | You should have received a copy of the GNU General Public License and |
22 | a copy of the GCC Runtime Library Exception along with this program; | |
23 | see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
038d1e19 | 24 | <http://www.gnu.org/licenses/>. */ |
117756eb | 25 | |
117756eb | 26 | /* We don't want a PLT. */ |
27 | #undef NEED_PLT_RELOC | |
28 | #define NEED_PLT_RELOC 0 | |
29 | ||
117756eb | 30 | #undef TARGET_DEFAULT |
81f6de2f | 31 | #define TARGET_DEFAULT (MASK_SINGLE_PIC_BASE) |
73ef502e | 32 | |
33 | /* NOTE: The remaining definitions in this file are needed because uclinux | |
34 | does not use config/linux.h. */ | |
35 | ||
1ad38120 | 36 | /* Add GNU/Linux builtins. */ |
37 | #undef TARGET_OS_CPP_BUILTINS | |
38 | #define TARGET_OS_CPP_BUILTINS() \ | |
39 | do \ | |
40 | { \ | |
41 | builtin_define ("__uClinux__"); \ | |
42 | builtin_define ("__gnu_linux__"); \ | |
43 | builtin_define_std ("linux"); \ | |
44 | builtin_define_std ("unix"); \ | |
45 | builtin_assert ("system=linux"); \ | |
46 | builtin_assert ("system=unix"); \ | |
47 | builtin_assert ("system=posix"); \ | |
48 | } \ | |
49 | while (false) | |
50 | ||
73ef502e | 51 | /* Do not assume anything about header files. */ |
52 | #define NO_IMPLICIT_EXTERN_C | |
53 | ||
54 | /* The GNU C++ standard library requires that these macros be defined. */ | |
55 | #undef CPLUSPLUS_CPP_SPEC | |
56 | #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" | |
57 | ||
1ad38120 | 58 | #undef SUBTARGET_EXTRA_LINK_SPEC |
59 | #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux" | |
73ef502e | 60 | |
1ad38120 | 61 | /* Now we define the strings used to build the spec file. */ |
73ef502e | 62 | #undef STARTFILE_SPEC |
1ad38120 | 63 | #define STARTFILE_SPEC "crt1%O%s crti%O%s crtbegin%O%s" |
73ef502e | 64 | |
65 | #undef ENDFILE_SPEC | |
1ad38120 | 66 | #define ENDFILE_SPEC "crtend%O%s crtn%O%s" |
73ef502e | 67 | |
68 | #undef CC1_SPEC | |
69 | #define CC1_SPEC "%{profile:-p}" | |
70 | ||
1ad38120 | 71 | #undef LINK_GCC_C_SEQUENCE_SPEC |
73ef502e | 72 | #define LINK_GCC_C_SEQUENCE_SPEC \ |
d62eaedc | 73 | "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G %L}" |
73ef502e | 74 | |
75 | /* Use --as-needed -lgcc_s for eh support. */ | |
76 | #ifdef HAVE_LD_AS_NEEDED | |
77 | #define USE_LD_AS_NEEDED 1 | |
78 | #endif | |
1ad38120 | 79 | |
80 | #undef LINK_SPEC | |
81 | #define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X -elf2flt" | |
82 | ||
83 | #undef LIB_SPEC | |
84 | #define LIB_SPEC \ | |
85 | "%{pthread:-lpthread} \ | |
86 | %{shared:-lc} \ | |
87 | %{!shared:%{profile:-lc_p}%{!profile:-lc}}" | |
d0e6a121 | 88 | |
89 | #define TARGET_DEFAULT_WORD_RELOCATIONS 1 |