OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / prebuilt / linux-x86 / toolchain / arm-eabi-4.4.0 / lib / gcc / arm-eabi / 4.4.0 / 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. */
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 "%{!mno-thumb-interwork:-mthumb-interwork}"
75
76 /* Default CC1_SPEC as in arm.h. */
77 #undef CC1_DEFAULT_SPEC
78 #define CC1_DEFAULT_SPEC ""
79
80 #undef CC1_SPEC
81 #define CC1_SPEC \
82 "%{mandroid: %(cc1_android) ;" \
83 "          : %(cc1_default)}"
84
85 /* Android uses -fno-rtti by default. */
86 #undef ANDROID_CC1PLUS_SPEC
87 #define ANDROID_CC1PLUS_SPEC "%{!frtti:-fno-rtti}"
88
89 /* Default CC1PLUS_SPEC as in gcc.c. */
90 #undef CC1PLUS_DEFAULT_SPEC
91 #define CC1PLUS_DEFAULT_SPEC ""
92
93 #undef CC1PLUS_SPEC
94 #define CC1PLUS_SPEC \
95 "%{mandroid: %(cc1plus_android) ;" \
96 "          : %(cc1plus_default)}"
97
98 #undef ANDROID_LIB_SPEC
99 #define ANDROID_LIB_SPEC        "-lc %{!static:-ldl}"
100
101 /* Default LIB_SPEC as in gcc.c. */
102 #undef LIB_DEFAULT_SPEC
103 #define LIB_DEFAULT_SPEC \
104 "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}"
105
106 #undef LIB_SPEC
107 #define LIB_SPEC \
108 "%{mandroid: %(lib_android) ;" \
109 "          : %(lib_default)}"
110
111 #undef ANDROID_STARTFILE_SPEC
112 #define ANDROID_STARTFILE_SPEC \
113 "%{!shared:" \
114    "%{static: crtbegin_static%O%s ;" \
115    "        : crtbegin_dynamic%O%s}}"
116
117 /* Override STARTFILE_SPEC in unknown-elf.h. */
118 #undef STARTFILE_SPEC
119 #define STARTFILE_SPEC \
120 "%{mandroid: %(startfile_android) ;" \
121 "          : %(startfile_default)}"
122
123 #undef ANDROID_ENDFILE_SPEC
124 #define ANDROID_ENDFILE_SPEC    "%{!shared:crtend_android%O%s}"
125
126 /* Override ENDFILE_SPEC in unknown-elf.h. */
127 #undef ENDFILE_SPEC
128 #define ENDFILE_SPEC \
129 "%{mandroid: %(endfile_android) ;" \
130 "          : %(endfile_default)}"
131
132 #undef NEED_INDICATE_EXEC_STACK
133 #define NEED_INDICATE_EXEC_STACK  1