]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/arm/linux-eabi.h
Update Copyright years for files modified in 2011 and/or 2012.
[thirdparty/gcc.git] / gcc / config / arm / linux-eabi.h
1 /* Configuration file for ARM GNU/Linux EABI targets.
2 Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011, 2012
3 Free Software Foundation, Inc.
4 Contributed by CodeSourcery, LLC
5
6 This file is part of GCC.
7
8 GCC is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published
10 by the Free Software Foundation; either version 3, or (at your
11 option) any later version.
12
13 GCC is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
21
22 /* On EABI GNU/Linux, we want both the BPABI builtins and the
23 GNU/Linux builtins. */
24 #undef TARGET_OS_CPP_BUILTINS
25 #define TARGET_OS_CPP_BUILTINS() \
26 do \
27 { \
28 TARGET_BPABI_CPP_BUILTINS(); \
29 GNU_USER_TARGET_OS_CPP_BUILTINS(); \
30 ANDROID_TARGET_OS_CPP_BUILTINS(); \
31 } \
32 while (false)
33
34 /* We default to a soft-float ABI so that binaries can run on all
35 target hardware. If you override this to use the hard-float ABI then
36 change the setting of GLIBC_DYNAMIC_LINKER_DEFAULT as well. */
37 #undef TARGET_DEFAULT_FLOAT_ABI
38 #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT
39
40 /* We default to the "aapcs-linux" ABI so that enums are int-sized by
41 default. */
42 #undef ARM_DEFAULT_ABI
43 #define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
44
45 /* Default to armv5t so that thumb shared libraries work.
46 The ARM10TDMI core is the default for armv5t, so set
47 SUBTARGET_CPU_DEFAULT to achieve this. */
48 #undef SUBTARGET_CPU_DEFAULT
49 #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
50
51 /* TARGET_BIG_ENDIAN_DEFAULT is set in
52 config.gcc for big endian configurations. */
53 #undef TARGET_LINKER_EMULATION
54 #if TARGET_BIG_ENDIAN_DEFAULT
55 #define TARGET_LINKER_EMULATION "armelfb_linux_eabi"
56 #else
57 #define TARGET_LINKER_EMULATION "armelf_linux_eabi"
58 #endif
59
60 #undef SUBTARGET_EXTRA_LINK_SPEC
61 #define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION
62
63 /* GNU/Linux on ARM currently supports three dynamic linkers:
64 - ld-linux.so.2 - for the legacy ABI
65 - ld-linux.so.3 - for the EABI-derived soft-float ABI
66 - ld-linux-armhf.so.3 - for the EABI-derived hard-float ABI.
67 All the dynamic linkers live in /lib.
68 We default to soft-float, but this can be overridden by changing both
69 GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */
70
71 #undef GLIBC_DYNAMIC_LINKER
72 #define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
73 #define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
74 #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
75
76 #define GLIBC_DYNAMIC_LINKER \
77 "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \
78 %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
79 %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
80
81 /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
82 use the GNU/Linux version, not the generic BPABI version. */
83 #undef LINK_SPEC
84 #define LINK_SPEC BE8_LINK_SPEC \
85 LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
86 LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
87
88 #undef CC1_SPEC
89 #define CC1_SPEC \
90 LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
91 GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
92
93 #define CC1PLUS_SPEC \
94 LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
95
96 #undef LIB_SPEC
97 #define LIB_SPEC \
98 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \
99 GNU_USER_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC)
100
101 #undef STARTFILE_SPEC
102 #define STARTFILE_SPEC \
103 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC)
104
105 #undef ENDFILE_SPEC
106 #define ENDFILE_SPEC \
107 LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
108
109 /* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we
110 do not use -lfloat. */
111 #undef LIBGCC_SPEC
112
113 /* Clear the instruction cache from `beg' to `end'. This is
114 implemented in lib1funcs.S, so ensure an error if this definition
115 is used. */
116 #undef CLEAR_INSN_CACHE
117 #define CLEAR_INSN_CACHE(BEG, END) not_used
118
119 #define ARM_TARGET2_DWARF_FORMAT (DW_EH_PE_pcrel | DW_EH_PE_indirect)