OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / prebuilt / linux-x86 / toolchain / arm-eabi-4.4.3 / lib / gcc / arm-eabi / 4.4.3 / plugin / include / config / arm / eabi.h
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       "-Bdynamic " \
57       "%{rdynamic:-export-dynamic} " \
58       "%{!dynamic-linker:-dynamic-linker /system/bin/linker}}} " \
59 "-X" SUBTARGET_EXTRA_LINK_SPEC
60
61 /* Override LINK_SPEC in bpabi.h. */
62 #undef LINK_SPEC
63 #define LINK_SPEC \
64 "%{mandroid: %(link_android) ;" \
65 "          : %(link_default)}"
66
67 /* Android uses "-fno-exceptions -fpic -fno-short-enums -mthumb-interwork" by
68    default. -mthumb-interwork is implied by EABI.  */
69 #undef ANDROID_CC1_SPEC
70 #define ANDROID_CC1_SPEC \
71 "%{!fexceptions:-fno-exceptions} " \
72 "%{!fno-pic:%{!fno-PIC:-fpic}} " \
73 "%{!fshort-enums:-fno-short-enums} "
74
75 /* Default CC1_SPEC as in arm.h. */
76 #undef CC1_DEFAULT_SPEC
77 #define CC1_DEFAULT_SPEC ""
78
79 #undef CC1_SPEC
80 #define CC1_SPEC \
81 "%{mandroid: %(cc1_android) ;" \
82 "          : %(cc1_default)}"
83
84 /* Android uses -fno-rtti by default. */
85 #undef ANDROID_CC1PLUS_SPEC
86 #define ANDROID_CC1PLUS_SPEC "%{!frtti:-fno-rtti}"
87
88 /* Default CC1PLUS_SPEC as in gcc.c. */
89 #undef CC1PLUS_DEFAULT_SPEC
90 #define CC1PLUS_DEFAULT_SPEC ""
91
92 #undef CC1PLUS_SPEC
93 #define CC1PLUS_SPEC \
94 "%{mandroid: %(cc1plus_android) ;" \
95 "          : %(cc1plus_default)}"
96
97 #undef ANDROID_LIB_SPEC
98 #define ANDROID_LIB_SPEC        "-lc %{!static:-ldl}"
99
100 /* Default LIB_SPEC as in gcc.c. */
101 #undef LIB_DEFAULT_SPEC
102 #define LIB_DEFAULT_SPEC \
103 "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}"
104
105 #undef LIB_SPEC
106 #define LIB_SPEC \
107 "%{mandroid: %(lib_android) ;" \
108 "          : %(lib_default)}"
109
110 #undef ANDROID_STARTFILE_SPEC
111 #define ANDROID_STARTFILE_SPEC \
112 "%{!shared:" \
113    "%{static: crtbegin_static%O%s ;" \
114    "        : crtbegin_dynamic%O%s}}"
115
116 /* Override STARTFILE_SPEC in unknown-elf.h. */
117 #undef STARTFILE_SPEC
118 #define STARTFILE_SPEC \
119 "%{mandroid: %(startfile_android) ;" \
120 "          : %(startfile_default)}"
121
122 #undef ANDROID_ENDFILE_SPEC
123 #define ANDROID_ENDFILE_SPEC    "%{!shared:crtend_android%O%s}"
124
125 /* Override ENDFILE_SPEC in unknown-elf.h. */
126 #undef ENDFILE_SPEC
127 #define ENDFILE_SPEC \
128 "%{mandroid: %(endfile_android) ;" \
129 "          : %(endfile_default)}"
130
131 #undef NEED_INDICATE_EXEC_STACK
132 #define NEED_INDICATE_EXEC_STACK  1