comparison gcc/config/arm/eabi.h @ 0:a06113de4d67

first commit
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Fri, 17 Jul 2009 14:47:48 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:a06113de4d67
1 /* Configuration file for ARM EABI targets.
2 Copyright (C) 2008
3 Free Software Foundation, Inc.
4 Contributed by Doug Kwan (dougkwan@google.com)
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 /* This file contains macro overrides for EABI targets. */
23
24 #undef TARGET_OS_CPP_BUILTINS
25 #define TARGET_OS_CPP_BUILTINS() \
26 do \
27 { \
28 TARGET_BPABI_CPP_BUILTINS (); \
29 if (TARGET_ANDROID) \
30 builtin_define ("__ANDROID__"); \
31 } \
32 while (false)
33
34 #undef SUBSUBTARGET_EXTRA_SPECS
35 #define SUBSUBTARGET_EXTRA_SPECS \
36 { "link_android", ANDROID_LINK_SPEC }, \
37 { "link_default", BPABI_LINK_SPEC }, \
38 { "cc1_android", ANDROID_CC1_SPEC }, \
39 { "cc1_default", CC1_DEFAULT_SPEC }, \
40 { "cc1plus_android", ANDROID_CC1PLUS_SPEC }, \
41 { "cc1plus_default", CC1PLUS_DEFAULT_SPEC }, \
42 { "lib_android", ANDROID_LIB_SPEC }, \
43 { "lib_default", LIB_DEFAULT_SPEC }, \
44 { "startfile_android", ANDROID_STARTFILE_SPEC }, \
45 { "startfile_default", UNKNOWN_ELF_STARTFILE_SPEC }, \
46 { "endfile_android", ANDROID_ENDFILE_SPEC }, \
47 { "endfile_default", UNKNOWN_ELF_ENDFILE_SPEC }, \
48
49 #undef ANDROID_LINK_SPEC
50 #define ANDROID_LINK_SPEC \
51 "%{mbig-endian:-EB} %{mlittle-endian:-EL} " \
52 "%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} " \
53 "%{!static:" \
54 "%{shared: -Bsymbolic} " \
55 "%{!shared:" \
56 "%{rdynamic:-export-dynamic} " \
57 "%{!dynamic-linker:-dynamic-linker /system/bin/linker}}} " \
58 "-X" SUBTARGET_EXTRA_LINK_SPEC
59
60 /* Override LINK_SPEC in bpabi.h. */
61 #undef LINK_SPEC
62 #define LINK_SPEC \
63 "%{mandroid: %(link_android) ;" \
64 " : %(link_default)}"
65
66 /* Android uses -fno-exceptions by default. */
67 #undef ANDROID_CC1_SPEC
68 #define ANDROID_CC1_SPEC "%{!fexceptions:-fno-exceptions}"
69
70 /* Default CC1_SPEC as in arm.h. */
71 #undef CC1_DEFAULT_SPEC
72 #define CC1_DEFAULT_SPEC ""
73
74 #undef CC1_SPEC
75 #define CC1_SPEC \
76 "%{mandroid: %(cc1_android) ;" \
77 " : %(cc1_default)}"
78
79 /* Android uses -fno-rtti by default. */
80 #undef ANDROID_CC1PLUS_SPEC
81 #define ANDROID_CC1PLUS_SPEC "%{!frtti:-fno-rtti}"
82
83 /* Default CC1PLUS_SPEC as in gcc.c. */
84 #undef CC1PLUS_DEFAULT_SPEC
85 #define CC1PLUS_DEFAULT_SPEC ""
86
87 #undef CC1PLUS_SPEC
88 #define CC1PLUS_SPEC \
89 "%{mandroid: %(cc1plus_android) ;" \
90 " : %(cc1plus_default)}"
91
92 #undef ANDROID_LIB_SPEC
93 #define ANDROID_LIB_SPEC "-lc %{!static:-ldl}"
94
95 /* Default LIB_SPEC as in gcc.c. */
96 #undef LIB_DEFAULT_SPEC
97 #define LIB_DEFAULT_SPEC \
98 "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}"
99
100 #undef LIB_SPEC
101 #define LIB_SPEC \
102 "%{mandroid: %(lib_android) ;" \
103 " : %(lib_default)}"
104
105 #undef ANDROID_STARTFILE_SPEC
106 #define ANDROID_STARTFILE_SPEC \
107 "%{!shared:" \
108 "%{static: crtbegin_static%O%s ;" \
109 " : crtbegin_dynamic%O%s}}"
110
111 /* Override STARTFILE_SPEC in unknown-elf.h. */
112 #undef STARTFILE_SPEC
113 #define STARTFILE_SPEC \
114 "%{mandroid: %(startfile_android) ;" \
115 " : %(startfile_default)}"
116
117 #undef ANDROID_ENDFILE_SPEC
118 #define ANDROID_ENDFILE_SPEC "%{!shared:crtend_android%O%s}"
119
120 /* Override ENDFILE_SPEC in unknown-elf.h. */
121 #undef ENDFILE_SPEC
122 #define ENDFILE_SPEC \
123 "%{mandroid: %(endfile_android) ;" \
124 " : %(endfile_default)}"
125