Merge lp:~ams-codesourcery/gcc-linaro/android into lp:gcc-linaro/4.5
- android
- Merge into 4.5
Status: | Merged |
---|---|
Approved by: | Richard Sandiford |
Approved revision: | no longer in the source branch. |
Merged at revision: | 99494 |
Proposed branch: | lp:~ams-codesourcery/gcc-linaro/android |
Merge into: | lp:gcc-linaro/4.5 |
Diff against target: |
1279 lines (+662/-223) 25 files modified
ChangeLog.linaro (+93/-0) config.sub (+6/-4) gcc/config.gcc (+39/-12) gcc/config/alpha/linux-elf.h (+5/-3) gcc/config/arm/eabi.h (+0/-125) gcc/config/arm/eabi.opt (+0/-23) gcc/config/arm/linux-eabi.h (+24/-1) gcc/config/arm/t-linux-androideabi (+10/-0) gcc/config/linux-android.h (+53/-0) gcc/config/linux-android.opt (+23/-0) gcc/config/linux.h (+53/-23) gcc/config/linux.opt (+9/-5) gcc/config/rs6000/linux64.h (+5/-3) gcc/config/rs6000/sysv4.h (+5/-3) gcc/doc/invoke.texi (+33/-4) gcc/gthr-posix.h (+11/-1) gcc/testsuite/gcc.dg/glibc-uclibc-1.c (+0/-6) gcc/testsuite/gcc.dg/glibc-uclibc-2.c (+0/-6) libstdc++-v3/acinclude.m4 (+9/-2) libstdc++-v3/config/os/bionic/ctype_base.h (+57/-0) libstdc++-v3/config/os/bionic/ctype_inline.h (+71/-0) libstdc++-v3/config/os/bionic/ctype_noninline.h (+98/-0) libstdc++-v3/config/os/bionic/os_defines.h (+36/-0) libstdc++-v3/configure (+20/-2) libstdc++-v3/configure.host (+2/-0) |
To merge this branch: | bzr merge lp:~ams-codesourcery/gcc-linaro/android |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Stubbs (community) | Approve | ||
Richard Sandiford | Approve | ||
Review via email: mp+57047@code.launchpad.net |
Commit message
Description of the change
Backport Android support from upstream.
These patches are sufficient to build the Linaro Android tree. The upstream Android won't build due to -Werror giving warnings that Google's Android toolchain does not, whatever that is.
Linaro Toolchain Builder (cbuild) wrote : | # |
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on armv7l-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro+bzr99491:
-PASS: gcc.dg/
-PASS: gcc.dg/
-PASS: gcc.dg/
-PASS: gcc.dg/
-PASS: gfortran.
+FAIL: gfortran.
-PASS: gfortran.
-PASS: gfortran.
-PASS: gfortran.
+FAIL: gfortran.
+FAIL: gfortran.
+FAIL: gfortran.
-PASS: gfortran.
-PASS: gfortran.
-PASS: gfortran.
+FAIL: gfortran.
+FAIL: gfortran.
+FAIL: gfortran.
-FAIL: 27_io/basic_
+PASS: 27_io/basic_
The full testsuite results are at:
http://
cbuild-checked: armv7l-
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on armv7l-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro+bzr99491:
-PASS: gcc.dg/
-PASS: gcc.dg/
-PASS: gcc.dg/
-PASS: gcc.dg/
-FAIL: largefile.c -O3 -g -I. (test for excess errors)
+PASS: largefile.c -O3 -g -I. (test for excess errors)
-FAIL: 27_io/basic_
+PASS: 27_io/basic_
The full testsuite results are at:
http://
cbuild-checked: armv7l-
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on i686-lucid-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro+bzr99491:
-PASS: gcc.dg/
-PASS: gcc.dg/
-PASS: gcc.dg/
-PASS: gcc.dg/
The full testsuite results are at:
http://
cbuild-checked: i686-lucid-
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on x86_64-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro+bzr99491:
-PASS: gcc.dg/
-PASS: gcc.dg/
-PASS: gcc.dg/
-PASS: gcc.dg/
The full testsuite results are at:
http://
cbuild-checked: x86_64-
Michael Hope (michaelh1) wrote : | # |
There might be something in the ARM build hosts that is causing different test results on different build hosts. I'm running a build of bzr99491 on all hosts to see if the A8/A9 results above are real.
Richard Sandiford (rsandifo) wrote : | # |
For the record, I'm not sure about the three-way Negative() entries
in linux.opt (mbionic = !mglibc, mglibc = !muclibc, muclibc = !mbionic).
Now we have three options, it isn't correct to say that one is the
negative of one of the others.
I'm also not sure that it's a good idea to remove the "-mglibc -muclibc"
%es from rs6000/linux64.h without anything to replace it.
Both are directly backported from the patch that was accepted upstream though,
and I don't think either of them is going to affect us or Ubuntu.
Ira Rosen (irar) wrote : | # |
I am out of the office until 17/04/2011.
Note: This is an automated response to your message "Re: [Merge]
lp:~ams-codesourcery/gcc-linaro/android into lp:gcc-linaro" sent on 12/4/11
12:02:23.
This is the only notification you will receive while this person is away.
Andrew Stubbs (ams-codesourcery) wrote : | # |
The fortran failures all say "spawn failed", so I assume they are caused by a harness error, not a compiler error.
The glibc-uclibc tests were removed by the patch, so the missing PASSes are expected.
All other differences are in problem test cases that fail randomly, and in this instance are all progressions in any case.
Preview Diff
1 | === modified file 'ChangeLog.linaro' |
2 | --- ChangeLog.linaro 2011-04-08 10:56:43 +0000 |
3 | +++ ChangeLog.linaro 2011-04-09 13:16:28 +0000 |
4 | @@ -1,3 +1,96 @@ |
5 | +2011-04-09 Andrew Stubbs <ams@codesourcery.com> |
6 | + |
7 | + Backport from mainline: |
8 | + |
9 | + Maxim Kuvyrkov <maxim@codesourcery.com> |
10 | + |
11 | + * config.sub: Recognize *-linux-android*. |
12 | + |
13 | + 2010-05-27 Maxim Kuvyrkov <maxim@codesourcery.com> |
14 | + |
15 | + Add support for Bionic C library |
16 | + gcc/ |
17 | + * config.gcc (LIBC_GLIBC, LIBC_BIONIC, LIBC_UCLIBC): New tm_define |
18 | + macro. |
19 | + (DEFAULT_LIBC): New tm_define macro set to one of LIBC_*. |
20 | + (bfin*-uclinux, moxie-*-uclinux*, m68k-*-uclinux*): Update. |
21 | + |
22 | + * config/linux.h (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC): Define. |
23 | + (LINUX_TARGET_OS_CPP_BUILTINS): Define __gnu_linux__ only for GLIBC. |
24 | + (CHOOSE_DYNAMIC_LINKER1, CHOOSE_DYNAMIC_LINKER): Make it easier |
25 | + to support multiple C libraries. Handle Bionic. |
26 | + (BIONIC_DYNAMIC_LINKER, BIONIC_DYNAMIC_LINKER32,) |
27 | + (BIONIC_DYNAMIC_LINKER64): Define. |
28 | + (LINUX_DYNAMIC_LINKER, LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): |
29 | + Update. |
30 | + (TARGET_HAS_SINCOS): Enable for Bionic. |
31 | + |
32 | + * config/linux.opt: Rewrite to handle more than 2 C libraries. Make |
33 | + the last option specified on command line take effect. |
34 | + (linux_uclibc): Rename to linux_libc, initialize using DEFAULT_LIBC. |
35 | + (mbionic): New. |
36 | + (mglibc, muclibc): Update. |
37 | + |
38 | + * config/alpha/linux-elf.h, config/rs6000/linux64.h, |
39 | + * config/rs6000/sysv4.h (CHOOSE_DYNAMIC_LINKER): Update to use |
40 | + DEFAULT_LIBC. |
41 | + |
42 | + * doc/invoke.texi (-mglibc, -muclibc): Update. |
43 | + (-mbionic): Document. |
44 | + |
45 | + gcc/testsuite/ |
46 | + * gcc.dg/glibc-uclibc-1.c, gcc.dg/glibc-uclibc-2.c: Remove, no longer |
47 | + necessary. |
48 | + |
49 | + 2010-05-27 Maxim Kuvyrkov <maxim@codesourcery.com> |
50 | + |
51 | + Support compilation for Android platform. Reimplement -mandroid. |
52 | + gcc/ |
53 | + * config.gcc (*linux*): Include linux-android.h and linux-android.opt. |
54 | + (*android*): Set ANDROID_DEFAULT. |
55 | + (arm*-*-linux*): Include linux-android.h. |
56 | + (arm*-*-eabi*): Don't include previous -mandroid implementation. |
57 | + * config/arm/eabi.h: Remove, move Android-specific parts ... |
58 | + * config/linux-android.h: ... here. New file. |
59 | + * config/arm/eabi.opt: Rename to ... |
60 | + * config/linux-android.opt: ... this. |
61 | + (mandroid): Allow -mno-android option. Initialize based on |
62 | + ANDROID_DEFAULT. |
63 | + * config/linux.h (STARTFILE_SPEC, ENDFILE_SPEC, CC1_SPEC, LIB_SPEC): |
64 | + Move logic to corresponding LINUX_TARGET_* macros. |
65 | + (TARGET_OS_CPP_BUILTINS): Define __ANDROID__, when appropriate. |
66 | + * config/linux-eabi.h (LINK_SPEC, CC1_SPEC, CC1PLUS_SPEC, LIB_SPEC,) |
67 | + (STARTFILE_SPEC, ENDFILE_SPEC): Define to choose between Linux and |
68 | + Android definitions. |
69 | + (LINUX_TARGET_OS_CPP_BUILTINS): Define __ANDROID__ if TARGET_ANDROID. |
70 | + * doc/invoke.texi (-mandroid, -tno-android-cc, -tno-android-ld): |
71 | + Document. |
72 | + |
73 | + 2010-06-01 Maxim Kuvyrkov <maxim@codesourcery.com> |
74 | + |
75 | + gcc/ |
76 | + * config/arm/t-linux-androideabi: New. |
77 | + * config.gcc (arm*-*-linux-androideabi): Include multilib configuration. |
78 | + |
79 | + 2010-05-27 Maxim Kuvyrkov <maxim@codesourcery.com> |
80 | + |
81 | + gcc/ |
82 | + * gthr-posix.h (pthread_cancel): Don't declare if compiling against |
83 | + Bionic C library. |
84 | + (__gthread_active_p): Check for pthread_create if compiling against |
85 | + Bionic C library. |
86 | + |
87 | + 2010-06-01 Maxim Kuvyrkov <maxim@codesourcery.com> |
88 | + |
89 | + libstdc++-v3/ |
90 | + * acinclude.m4: Support Bionic C library. |
91 | + Explicitly specify -fexceptions for exception check. |
92 | + * configure.host: Support Bionic C library. |
93 | + * configure: Regenerate. |
94 | + * config/os/bionic/ctype_base.h, config/os/bionic/ctype_inline.h, |
95 | + * config/os/bionic/ctype_noincline.h, config/os/bionic/os_defines.h: |
96 | + New files, based on config/os/newlib/*. |
97 | + |
98 | 2011-04-08 Richard Sandiford <richard.sandiford@linaro.org> |
99 | |
100 | Backport from mainline: |
101 | |
102 | === modified file 'config.sub' |
103 | --- config.sub 2010-03-23 14:26:40 +0000 |
104 | +++ config.sub 2011-04-09 13:16:28 +0000 |
105 | @@ -4,7 +4,7 @@ |
106 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
107 | # Free Software Foundation, Inc. |
108 | |
109 | -timestamp='2010-03-22' |
110 | +timestamp='2010-04-23' |
111 | |
112 | # This file is (in principle) common to ALL GNU software. |
113 | # The presence of a machine in this file suggests that SOME GNU software |
114 | @@ -124,8 +124,9 @@ |
115 | # Here we must recognize all the valid KERNEL-OS combinations. |
116 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` |
117 | case $maybe_os in |
118 | - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ |
119 | - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ |
120 | + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ |
121 | + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ |
122 | + knetbsd*-gnu* | netbsd*-gnu* | \ |
123 | kopensolaris*-gnu* | \ |
124 | storm-chaos* | os2-emx* | rtmk-nova*) |
125 | os=-$maybe_os |
126 | @@ -1307,7 +1308,8 @@ |
127 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ |
128 | | -chorusos* | -chorusrdb* | -cegcc* \ |
129 | | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
130 | - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ |
131 | + | -mingw32* | -linux-gnu* | -linux-android* \ |
132 | + | -linux-newlib* | -linux-uclibc* \ |
133 | | -uxpv* | -beos* | -mpeix* | -udk* \ |
134 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ |
135 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ |
136 | |
137 | === modified file 'gcc/config.gcc' |
138 | --- gcc/config.gcc 2011-02-27 01:06:15 +0000 |
139 | +++ gcc/config.gcc 2011-04-09 13:16:28 +0000 |
140 | @@ -513,26 +513,48 @@ |
141 | *-*-gnu*) |
142 | tmake_file="$tmake_file t-gnu";; |
143 | esac |
144 | - # glibc / uclibc switch. uclibc isn't usable for GNU/Hurd and neither for |
145 | - # GNU/k*BSD. |
146 | + # Common C libraries. |
147 | + tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" |
148 | + # glibc / uclibc / bionic switch. |
149 | + # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD. |
150 | case $target in |
151 | *linux*) |
152 | extra_options="$extra_options linux.opt";; |
153 | *) |
154 | tm_defines="$tm_defines OPTION_GLIBC=1";; |
155 | esac |
156 | - case ${target} in |
157 | + case $target in |
158 | + *-*-*android*) |
159 | + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC" |
160 | + ;; |
161 | *-*-*uclibc*) |
162 | - tm_defines="${tm_defines} UCLIBC_DEFAULT=1" |
163 | + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" |
164 | ;; |
165 | *) |
166 | - tm_defines="${tm_defines} UCLIBC_DEFAULT=0" |
167 | + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" |
168 | ;; |
169 | esac |
170 | - # Assume that glibc or uClibc are being used and so __cxa_atexit is provided. |
171 | + # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit |
172 | + # is provided. |
173 | default_use_cxa_atexit=yes |
174 | use_gcc_tgmath=no |
175 | use_gcc_stdint=wrap |
176 | + # Add Android userspace support to Linux targets. |
177 | + case $target in |
178 | + *linux*) |
179 | + tm_file="$tm_file linux-android.h" |
180 | + extra_options="$extra_options linux-android.opt" |
181 | + ;; |
182 | + esac |
183 | + # Enable compilation for Android by default for *android* targets. |
184 | + case $target in |
185 | + *-*-*android*) |
186 | + tm_defines="$tm_defines ANDROID_DEFAULT=1" |
187 | + ;; |
188 | + *) |
189 | + tm_defines="$tm_defines ANDROID_DEFAULT=0" |
190 | + ;; |
191 | + esac |
192 | ;; |
193 | *-*-netbsd*) |
194 | tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic" |
195 | @@ -728,7 +750,7 @@ |
196 | use_collect2=yes |
197 | ;; |
198 | arm*-*-linux*) # ARM GNU/Linux with ELF |
199 | - tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" |
200 | + tm_file="dbxelf.h elfos.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" |
201 | case $target in |
202 | arm*b-*) |
203 | tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" |
204 | @@ -739,6 +761,12 @@ |
205 | arm*-*-linux-*eabi) |
206 | tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h" |
207 | tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc" |
208 | + # Define multilib configuration for arm-linux-androideabi. |
209 | + case ${target} in |
210 | + *-androideabi) |
211 | + tmake_file="$tmake_file arm/t-linux-androideabi" |
212 | + ;; |
213 | + esac |
214 | # The BPABI long long divmod functions return a 128-bit value in |
215 | # registers r0-r3. Correctly modeling that requires the use of |
216 | # TImode. |
217 | @@ -785,9 +813,8 @@ |
218 | tmake_file="arm/t-arm arm/t-arm-elf" |
219 | case ${target} in |
220 | arm*-*-eabi*) |
221 | - tm_file="$tm_file arm/eabi.h newlib-stdint.h" |
222 | + tm_file="$tm_file newlib-stdint.h" |
223 | tmake_file="${tmake_file} arm/t-bpabi" |
224 | - extra_options="${extra_options} arm/eabi.opt" |
225 | use_gcc_stdint=wrap |
226 | ;; |
227 | arm*-*-symbianelf*) |
228 | @@ -843,7 +870,7 @@ |
229 | bfin*-uclinux*) |
230 | tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h glibc-stdint.h bfin/uclinux.h" |
231 | tmake_file=bfin/t-bfin-uclinux |
232 | - tm_defines="${tm_defines} UCLIBC_DEFAULT=1" |
233 | + tm_defines="${tm_defines} DEFAULT_LIBC=LIBC_UCLIBC" |
234 | extra_options="${extra_options} linux.opt" |
235 | use_collect2=no |
236 | ;; |
237 | @@ -924,7 +951,7 @@ |
238 | tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h glibc-stdint.h moxie/uclinux.h" |
239 | extra_parts="crti.o crtn.o crtbegin.o crtend.o" |
240 | tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp" |
241 | - tm_defines="${tm_defines} UCLIBC_DEFAULT=1" |
242 | + tm_defines="${tm_defines} DEFAULT_LIBC=LIBC_UCLIBC" |
243 | extra_options="${extra_options} linux.opt" |
244 | ;; |
245 | h8300-*-rtems*) |
246 | @@ -1644,7 +1671,7 @@ |
247 | default_m68k_cpu=68020 |
248 | default_cf_cpu=5206 |
249 | tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h" |
250 | - tm_defines="${tm_defines} MOTOROLA=1 UCLIBC_DEFAULT=1" |
251 | + tm_defines="${tm_defines} MOTOROLA=1 DEFAULT_LIBC=LIBC_UCLIBC" |
252 | extra_options="${extra_options} linux.opt" |
253 | tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs" |
254 | ;; |
255 | |
256 | === modified file 'gcc/config/alpha/linux-elf.h' |
257 | --- gcc/config/alpha/linux-elf.h 2007-08-02 09:49:31 +0000 |
258 | +++ gcc/config/alpha/linux-elf.h 2011-04-09 13:16:28 +0000 |
259 | @@ -29,10 +29,12 @@ |
260 | |
261 | #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" |
262 | #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" |
263 | -#if UCLIBC_DEFAULT |
264 | -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}" |
265 | +#if DEFAULT_LIBC == LIBC_UCLIBC |
266 | +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" |
267 | +#elif DEFAULT_LIBC == LIBC_GLIBC |
268 | +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" |
269 | #else |
270 | -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}" |
271 | +#error "Unsupported DEFAULT_LIBC" |
272 | #endif |
273 | #define LINUX_DYNAMIC_LINKER \ |
274 | CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) |
275 | |
276 | === removed file 'gcc/config/arm/eabi.h' |
277 | --- gcc/config/arm/eabi.h 2008-07-14 20:01:42 +0000 |
278 | +++ gcc/config/arm/eabi.h 1970-01-01 00:00:00 +0000 |
279 | @@ -1,125 +0,0 @@ |
280 | -/* Configuration file for ARM EABI targets. |
281 | - Copyright (C) 2008 |
282 | - Free Software Foundation, Inc. |
283 | - Contributed by Doug Kwan (dougkwan@google.com) |
284 | - |
285 | - This file is part of GCC. |
286 | - |
287 | - GCC is free software; you can redistribute it and/or modify it |
288 | - under the terms of the GNU General Public License as published |
289 | - by the Free Software Foundation; either version 3, or (at your |
290 | - option) any later version. |
291 | - |
292 | - GCC is distributed in the hope that it will be useful, but WITHOUT |
293 | - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
294 | - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
295 | - License for more details. |
296 | - |
297 | - You should have received a copy of the GNU General Public License |
298 | - along with GCC; see the file COPYING3. If not see |
299 | - <http://www.gnu.org/licenses/>. */ |
300 | - |
301 | -/* This file contains macro overrides for EABI targets. */ |
302 | - |
303 | -#undef TARGET_OS_CPP_BUILTINS |
304 | -#define TARGET_OS_CPP_BUILTINS() \ |
305 | - do \ |
306 | - { \ |
307 | - TARGET_BPABI_CPP_BUILTINS (); \ |
308 | - if (TARGET_ANDROID) \ |
309 | - builtin_define ("__ANDROID__"); \ |
310 | - } \ |
311 | - while (false) |
312 | - |
313 | -#undef SUBSUBTARGET_EXTRA_SPECS |
314 | -#define SUBSUBTARGET_EXTRA_SPECS \ |
315 | - { "link_android", ANDROID_LINK_SPEC }, \ |
316 | - { "link_default", BPABI_LINK_SPEC }, \ |
317 | - { "cc1_android", ANDROID_CC1_SPEC }, \ |
318 | - { "cc1_default", CC1_DEFAULT_SPEC }, \ |
319 | - { "cc1plus_android", ANDROID_CC1PLUS_SPEC }, \ |
320 | - { "cc1plus_default", CC1PLUS_DEFAULT_SPEC }, \ |
321 | - { "lib_android", ANDROID_LIB_SPEC }, \ |
322 | - { "lib_default", LIB_DEFAULT_SPEC }, \ |
323 | - { "startfile_android", ANDROID_STARTFILE_SPEC }, \ |
324 | - { "startfile_default", UNKNOWN_ELF_STARTFILE_SPEC }, \ |
325 | - { "endfile_android", ANDROID_ENDFILE_SPEC }, \ |
326 | - { "endfile_default", UNKNOWN_ELF_ENDFILE_SPEC }, \ |
327 | - |
328 | -#undef ANDROID_LINK_SPEC |
329 | -#define ANDROID_LINK_SPEC \ |
330 | -"%{mbig-endian:-EB} %{mlittle-endian:-EL} " \ |
331 | -"%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} " \ |
332 | -"%{!static:" \ |
333 | - "%{shared: -Bsymbolic} " \ |
334 | - "%{!shared:" \ |
335 | - "%{rdynamic:-export-dynamic} " \ |
336 | - "%{!dynamic-linker:-dynamic-linker /system/bin/linker}}} " \ |
337 | -"-X" SUBTARGET_EXTRA_LINK_SPEC |
338 | - |
339 | -/* Override LINK_SPEC in bpabi.h. */ |
340 | -#undef LINK_SPEC |
341 | -#define LINK_SPEC \ |
342 | -"%{mandroid: %(link_android) ;" \ |
343 | -" : %(link_default)}" |
344 | - |
345 | -/* Android uses -fno-exceptions by default. */ |
346 | -#undef ANDROID_CC1_SPEC |
347 | -#define ANDROID_CC1_SPEC "%{!fexceptions:-fno-exceptions}" |
348 | - |
349 | -/* Default CC1_SPEC as in arm.h. */ |
350 | -#undef CC1_DEFAULT_SPEC |
351 | -#define CC1_DEFAULT_SPEC "" |
352 | - |
353 | -#undef CC1_SPEC |
354 | -#define CC1_SPEC \ |
355 | -"%{mandroid: %(cc1_android) ;" \ |
356 | -" : %(cc1_default)}" |
357 | - |
358 | -/* Android uses -fno-rtti by default. */ |
359 | -#undef ANDROID_CC1PLUS_SPEC |
360 | -#define ANDROID_CC1PLUS_SPEC "%{!frtti:-fno-rtti}" |
361 | - |
362 | -/* Default CC1PLUS_SPEC as in gcc.c. */ |
363 | -#undef CC1PLUS_DEFAULT_SPEC |
364 | -#define CC1PLUS_DEFAULT_SPEC "" |
365 | - |
366 | -#undef CC1PLUS_SPEC |
367 | -#define CC1PLUS_SPEC \ |
368 | -"%{mandroid: %(cc1plus_android) ;" \ |
369 | -" : %(cc1plus_default)}" |
370 | - |
371 | -#undef ANDROID_LIB_SPEC |
372 | -#define ANDROID_LIB_SPEC "-lc %{!static:-ldl}" |
373 | - |
374 | -/* Default LIB_SPEC as in gcc.c. */ |
375 | -#undef LIB_DEFAULT_SPEC |
376 | -#define LIB_DEFAULT_SPEC \ |
377 | -"%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}" |
378 | - |
379 | -#undef LIB_SPEC |
380 | -#define LIB_SPEC \ |
381 | -"%{mandroid: %(lib_android) ;" \ |
382 | -" : %(lib_default)}" |
383 | - |
384 | -#undef ANDROID_STARTFILE_SPEC |
385 | -#define ANDROID_STARTFILE_SPEC \ |
386 | -"%{!shared:" \ |
387 | - "%{static: crtbegin_static%O%s ;" \ |
388 | - " : crtbegin_dynamic%O%s}}" |
389 | - |
390 | -/* Override STARTFILE_SPEC in unknown-elf.h. */ |
391 | -#undef STARTFILE_SPEC |
392 | -#define STARTFILE_SPEC \ |
393 | -"%{mandroid: %(startfile_android) ;" \ |
394 | -" : %(startfile_default)}" |
395 | - |
396 | -#undef ANDROID_ENDFILE_SPEC |
397 | -#define ANDROID_ENDFILE_SPEC "%{!shared:crtend_android%O%s}" |
398 | - |
399 | -/* Override ENDFILE_SPEC in unknown-elf.h. */ |
400 | -#undef ENDFILE_SPEC |
401 | -#define ENDFILE_SPEC \ |
402 | -"%{mandroid: %(endfile_android) ;" \ |
403 | -" : %(endfile_default)}" |
404 | - |
405 | |
406 | === removed file 'gcc/config/arm/eabi.opt' |
407 | --- gcc/config/arm/eabi.opt 2008-07-14 20:01:42 +0000 |
408 | +++ gcc/config/arm/eabi.opt 1970-01-01 00:00:00 +0000 |
409 | @@ -1,23 +0,0 @@ |
410 | -; EABI specific options for ARM port of the compiler. |
411 | - |
412 | -; Copyright (C) 2008 Free Software Foundation, Inc. |
413 | -; |
414 | -; This file is part of GCC. |
415 | -; |
416 | -; GCC is free software; you can redistribute it and/or modify it under |
417 | -; the terms of the GNU General Public License as published by the Free |
418 | -; Software Foundation; either version 3, or (at your option) any later |
419 | -; version. |
420 | -; |
421 | -; GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
422 | -; WARRANTY; without even the implied warranty of MERCHANTABILITY or |
423 | -; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
424 | -; for more details. |
425 | -; |
426 | -; You should have received a copy of the GNU General Public License |
427 | -; along with GCC; see the file COPYING3. If not see |
428 | -; <http://www.gnu.org/licenses/>. |
429 | - |
430 | -mandroid |
431 | -Target Report RejectNegative Mask(ANDROID) |
432 | -Generate code for the Android operating system. |
433 | |
434 | === modified file 'gcc/config/arm/linux-eabi.h' |
435 | --- gcc/config/arm/linux-eabi.h 2009-10-30 20:03:09 +0000 |
436 | +++ gcc/config/arm/linux-eabi.h 2011-04-09 13:16:28 +0000 |
437 | @@ -66,7 +66,30 @@ |
438 | /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to |
439 | use the GNU/Linux version, not the generic BPABI version. */ |
440 | #undef LINK_SPEC |
441 | -#define LINK_SPEC LINUX_TARGET_LINK_SPEC BE8_LINK_SPEC |
442 | +#define LINK_SPEC BE8_LINK_SPEC \ |
443 | + LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ |
444 | + LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) |
445 | + |
446 | +#undef CC1_SPEC |
447 | +#define CC1_SPEC \ |
448 | + LINUX_OR_ANDROID_CC (LINUX_TARGET_CC1_SPEC, \ |
449 | + LINUX_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC) |
450 | + |
451 | +#define CC1PLUS_SPEC \ |
452 | + LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC) |
453 | + |
454 | +#undef LIB_SPEC |
455 | +#define LIB_SPEC \ |
456 | + LINUX_OR_ANDROID_LD (LINUX_TARGET_LIB_SPEC, \ |
457 | + LINUX_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC) |
458 | + |
459 | +#undef STARTFILE_SPEC |
460 | +#define STARTFILE_SPEC \ |
461 | + LINUX_OR_ANDROID_LD (LINUX_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC) |
462 | + |
463 | +#undef ENDFILE_SPEC |
464 | +#define ENDFILE_SPEC \ |
465 | + LINUX_OR_ANDROID_LD (LINUX_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) |
466 | |
467 | /* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we |
468 | do not use -lfloat. */ |
469 | |
470 | === added file 'gcc/config/arm/t-linux-androideabi' |
471 | --- gcc/config/arm/t-linux-androideabi 1970-01-01 00:00:00 +0000 |
472 | +++ gcc/config/arm/t-linux-androideabi 2011-04-09 13:16:28 +0000 |
473 | @@ -0,0 +1,10 @@ |
474 | +MULTILIB_OPTIONS = march=armv7-a mthumb |
475 | +MULTILIB_DIRNAMES = armv7-a thumb |
476 | +MULTILIB_EXCEPTIONS = |
477 | +MULTILIB_MATCHES = |
478 | +MULTILIB_OSDIRNAMES = |
479 | + |
480 | +# The "special" multilib can be used to build native applications for Android, |
481 | +# as opposed to native shared libraries that are then called via JNI. |
482 | +#MULTILIB_OPTIONS += tno-android-cc |
483 | +#MULTILIB_DIRNAMES += special |
484 | |
485 | === added file 'gcc/config/linux-android.h' |
486 | --- gcc/config/linux-android.h 1970-01-01 00:00:00 +0000 |
487 | +++ gcc/config/linux-android.h 2011-04-09 13:16:28 +0000 |
488 | @@ -0,0 +1,53 @@ |
489 | +/* Configuration file for Linux Android targets. |
490 | + Copyright (C) 2010 |
491 | + Free Software Foundation, Inc. |
492 | + Contributed by CodeSourcery, Inc. |
493 | + |
494 | + This file is part of GCC. |
495 | + |
496 | + GCC is free software; you can redistribute it and/or modify it |
497 | + under the terms of the GNU General Public License as published |
498 | + by the Free Software Foundation; either version 3, or (at your |
499 | + option) any later version. |
500 | + |
501 | + GCC is distributed in the hope that it will be useful, but WITHOUT |
502 | + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
503 | + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
504 | + License for more details. |
505 | + |
506 | + You should have received a copy of the GNU General Public License |
507 | + along with GCC; see the file COPYING3. If not see |
508 | + <http://www.gnu.org/licenses/>. */ |
509 | + |
510 | +#if ANDROID_DEFAULT |
511 | +# define NOANDROID "mno-android" |
512 | +#else |
513 | +# define NOANDROID "!mandroid" |
514 | +#endif |
515 | + |
516 | +#define LINUX_OR_ANDROID_CC(LINUX_SPEC, ANDROID_SPEC) \ |
517 | + "%{" NOANDROID "|tno-android-cc:" LINUX_SPEC ";:" ANDROID_SPEC "}" |
518 | + |
519 | +#define LINUX_OR_ANDROID_LD(LINUX_SPEC, ANDROID_SPEC) \ |
520 | + "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}" |
521 | + |
522 | +#define ANDROID_LINK_SPEC \ |
523 | + "%{shared: -Bsymbolic}" |
524 | + |
525 | +#define ANDROID_CC1_SPEC \ |
526 | + "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \ |
527 | + "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}" |
528 | + |
529 | +#define ANDROID_CC1PLUS_SPEC \ |
530 | + "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \ |
531 | + "%{!frtti:%{!fno-rtti: -fno-rtti}}" |
532 | + |
533 | +#define ANDROID_LIB_SPEC \ |
534 | + "%{!static: -ldl}" |
535 | + |
536 | +#define ANDROID_STARTFILE_SPEC \ |
537 | + "%{!shared:" \ |
538 | + " %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}" |
539 | + |
540 | +#define ANDROID_ENDFILE_SPEC \ |
541 | + "%{!shared: crtend_android%O%s}" |
542 | |
543 | === added file 'gcc/config/linux-android.opt' |
544 | --- gcc/config/linux-android.opt 1970-01-01 00:00:00 +0000 |
545 | +++ gcc/config/linux-android.opt 2011-04-09 13:16:28 +0000 |
546 | @@ -0,0 +1,23 @@ |
547 | +; Android specific options. |
548 | + |
549 | +; Copyright (C) 2010 Free Software Foundation, Inc. |
550 | +; |
551 | +; This file is part of GCC. |
552 | +; |
553 | +; GCC is free software; you can redistribute it and/or modify it under |
554 | +; the terms of the GNU General Public License as published by the Free |
555 | +; Software Foundation; either version 3, or (at your option) any later |
556 | +; version. |
557 | +; |
558 | +; GCC is distributed in the hope that it will be useful, but WITHOUT ANY |
559 | +; WARRANTY; without even the implied warranty of MERCHANTABILITY or |
560 | +; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
561 | +; for more details. |
562 | +; |
563 | +; You should have received a copy of the GNU General Public License |
564 | +; along with GCC; see the file COPYING3. If not see |
565 | +; <http://www.gnu.org/licenses/>. |
566 | + |
567 | +mandroid |
568 | +Target Report Mask(ANDROID) Var(flag_android) Init(ANDROID_DEFAULT ? OPTION_MASK_ANDROID : 0) |
569 | +Generate code for the Android platform. |
570 | |
571 | === modified file 'gcc/config/linux.h' |
572 | --- gcc/config/linux.h 2009-04-09 14:00:19 +0000 |
573 | +++ gcc/config/linux.h 2011-04-09 13:16:28 +0000 |
574 | @@ -1,6 +1,6 @@ |
575 | /* Definitions for Linux-based GNU systems with ELF format |
576 | Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006, |
577 | - 2007, 2009 Free Software Foundation, Inc. |
578 | + 2007, 2009, 2010 Free Software Foundation, Inc. |
579 | Contributed by Eric Youngdale. |
580 | Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org). |
581 | |
582 | @@ -42,16 +42,17 @@ |
583 | provides part of the support for getting C++ file-scope static |
584 | object constructed before entering `main'. */ |
585 | |
586 | -#undef STARTFILE_SPEC |
587 | #if defined HAVE_LD_PIE |
588 | -#define STARTFILE_SPEC \ |
589 | +#define LINUX_TARGET_STARTFILE_SPEC \ |
590 | "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ |
591 | crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" |
592 | #else |
593 | -#define STARTFILE_SPEC \ |
594 | +#define LINUX_TARGET_STARTFILE_SPEC \ |
595 | "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \ |
596 | crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" |
597 | #endif |
598 | +#undef STARTFILE_SPEC |
599 | +#define STARTFILE_SPEC LINUX_TARGET_STARTFILE_SPEC |
600 | |
601 | /* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on |
602 | the GNU/Linux magical crtend.o file (see crtstuff.c) which |
603 | @@ -59,33 +60,44 @@ |
604 | object constructed before entering `main', followed by a normal |
605 | GNU/Linux "finalizer" file, `crtn.o'. */ |
606 | |
607 | -#undef ENDFILE_SPEC |
608 | -#define ENDFILE_SPEC \ |
609 | +#define LINUX_TARGET_ENDFILE_SPEC \ |
610 | "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" |
611 | +#undef ENDFILE_SPEC |
612 | +#define ENDFILE_SPEC LINUX_TARGET_ENDFILE_SPEC |
613 | |
614 | /* This is for -profile to use -lc_p instead of -lc. */ |
615 | +#define LINUX_TARGET_CC1_SPEC "%{profile:-p}" |
616 | #ifndef CC1_SPEC |
617 | -#define CC1_SPEC "%{profile:-p}" |
618 | +#define CC1_SPEC LINUX_TARGET_CC1_SPEC |
619 | #endif |
620 | |
621 | /* The GNU C++ standard library requires that these macros be defined. */ |
622 | #undef CPLUSPLUS_CPP_SPEC |
623 | #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" |
624 | |
625 | -#undef LIB_SPEC |
626 | -#define LIB_SPEC \ |
627 | +#define LINUX_TARGET_LIB_SPEC \ |
628 | "%{pthread:-lpthread} \ |
629 | %{shared:-lc} \ |
630 | %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}" |
631 | +#undef LIB_SPEC |
632 | +#define LIB_SPEC LINUX_TARGET_LIB_SPEC |
633 | + |
634 | +/* C libraries supported on Linux. */ |
635 | +#define OPTION_GLIBC (linux_libc == LIBC_GLIBC) |
636 | +#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) |
637 | +#define OPTION_BIONIC (linux_libc == LIBC_BIONIC) |
638 | |
639 | #define LINUX_TARGET_OS_CPP_BUILTINS() \ |
640 | do { \ |
641 | - builtin_define ("__gnu_linux__"); \ |
642 | + if (OPTION_GLIBC) \ |
643 | + builtin_define ("__gnu_linux__"); \ |
644 | builtin_define_std ("linux"); \ |
645 | builtin_define_std ("unix"); \ |
646 | builtin_assert ("system=linux"); \ |
647 | builtin_assert ("system=unix"); \ |
648 | builtin_assert ("system=posix"); \ |
649 | + if (OPTION_ANDROID) \ |
650 | + builtin_define ("__ANDROID__"); \ |
651 | } while (0) |
652 | |
653 | #if defined(HAVE_LD_EH_FRAME_HDR) |
654 | @@ -105,13 +117,24 @@ |
655 | #endif |
656 | |
657 | /* Determine which dynamic linker to use depending on whether GLIBC or |
658 | - uClibc is the default C library and whether -muclibc or -mglibc has |
659 | - been passed to change the default. */ |
660 | -#if UCLIBC_DEFAULT |
661 | -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}" |
662 | + uClibc or Bionic is the default C library and whether |
663 | + -muclibc or -mglibc or -mbionic has been passed to change the default. */ |
664 | + |
665 | +#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ |
666 | + "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" |
667 | + |
668 | +#if DEFAULT_LIBC == LIBC_GLIBC |
669 | +#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ |
670 | + CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) |
671 | +#elif DEFAULT_LIBC == LIBC_UCLIBC |
672 | +#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ |
673 | + CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) |
674 | +#elif DEFAULT_LIBC == LIBC_BIONIC |
675 | +#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ |
676 | + CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) |
677 | #else |
678 | -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}" |
679 | -#endif |
680 | +#error "Unsupported DEFAULT_LIBC" |
681 | +#endif /* DEFAULT_LIBC */ |
682 | |
683 | /* For most targets the following definitions suffice; |
684 | GLIBC_DYNAMIC_LINKER must be defined for each target using them, or |
685 | @@ -120,18 +143,25 @@ |
686 | #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" |
687 | #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" |
688 | #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" |
689 | -#define LINUX_DYNAMIC_LINKER \ |
690 | - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) |
691 | -#define LINUX_DYNAMIC_LINKER32 \ |
692 | - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) |
693 | -#define LINUX_DYNAMIC_LINKER64 \ |
694 | - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) |
695 | +#define BIONIC_DYNAMIC_LINKER "/system/bin/linker" |
696 | +#define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" |
697 | +#define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" |
698 | + |
699 | +#define LINUX_DYNAMIC_LINKER \ |
700 | + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ |
701 | + BIONIC_DYNAMIC_LINKER) |
702 | +#define LINUX_DYNAMIC_LINKER32 \ |
703 | + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ |
704 | + BIONIC_DYNAMIC_LINKER32) |
705 | +#define LINUX_DYNAMIC_LINKER64 \ |
706 | + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ |
707 | + BIONIC_DYNAMIC_LINKER64) |
708 | |
709 | /* Determine whether the entire c99 runtime |
710 | is present in the runtime library. */ |
711 | #define TARGET_C99_FUNCTIONS (OPTION_GLIBC) |
712 | |
713 | /* Whether we have sincos that follows the GNU extension. */ |
714 | -#define TARGET_HAS_SINCOS (OPTION_GLIBC) |
715 | +#define TARGET_HAS_SINCOS (OPTION_GLIBC | OPTION_BIONIC) |
716 | |
717 | #define TARGET_POSIX_IO |
718 | |
719 | === modified file 'gcc/config/linux.opt' |
720 | --- gcc/config/linux.opt 2009-06-22 15:49:03 +0000 |
721 | +++ gcc/config/linux.opt 2011-04-09 13:16:28 +0000 |
722 | @@ -1,6 +1,6 @@ |
723 | ; Processor-independent options for GNU/Linux. |
724 | ; |
725 | -; Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc. |
726 | +; Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc. |
727 | ; Contributed by CodeSourcery. |
728 | ; |
729 | ; This file is part of GCC. |
730 | @@ -19,10 +19,14 @@ |
731 | ; along with GCC; see the file COPYING3. If not see |
732 | ; <http://www.gnu.org/licenses/>. |
733 | |
734 | +mbionic |
735 | +Target Report RejectNegative Var(linux_libc,LIBC_BIONIC) Init(DEFAULT_LIBC) Negative(mglibc) |
736 | +Use Bionic C library |
737 | + |
738 | mglibc |
739 | -Target RejectNegative Report InverseMask(UCLIBC, GLIBC) Var(linux_uclibc) Init(UCLIBC_DEFAULT ? OPTION_MASK_UCLIBC : 0) |
740 | -Use GNU libc instead of uClibc |
741 | +Target Report RejectNegative Var(linux_libc,LIBC_GLIBC) VarExists Negative(muclibc) |
742 | +Use GNU C library |
743 | |
744 | muclibc |
745 | -Target RejectNegative Report Mask(UCLIBC) Var(linux_uclibc) VarExists |
746 | -Use uClibc instead of GNU libc |
747 | +Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) VarExists Negative(mbionic) |
748 | +Use uClibc C library |
749 | |
750 | === modified file 'gcc/config/rs6000/linux64.h' |
751 | --- gcc/config/rs6000/linux64.h 2010-11-17 06:09:53 +0000 |
752 | +++ gcc/config/rs6000/linux64.h 2011-04-09 13:16:28 +0000 |
753 | @@ -344,10 +344,12 @@ |
754 | #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" |
755 | #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" |
756 | #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" |
757 | -#if UCLIBC_DEFAULT |
758 | -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}" |
759 | +#if DEFAULT_LIBC == LIBC_UCLIBC |
760 | +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" |
761 | +#elif DEFAULT_LIBC == LIBC_GLIBC |
762 | +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" |
763 | #else |
764 | -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}" |
765 | +#error "Unsupported DEFAULT_LIBC" |
766 | #endif |
767 | #define LINUX_DYNAMIC_LINKER32 \ |
768 | CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) |
769 | |
770 | === modified file 'gcc/config/rs6000/sysv4.h' |
771 | --- gcc/config/rs6000/sysv4.h 2010-11-03 13:55:26 +0000 |
772 | +++ gcc/config/rs6000/sysv4.h 2011-04-09 13:16:28 +0000 |
773 | @@ -901,10 +901,12 @@ |
774 | |
775 | #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" |
776 | #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" |
777 | -#if UCLIBC_DEFAULT |
778 | -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}" |
779 | +#if DEFAULT_LIBC == LIBC_UCLIBC |
780 | +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" |
781 | +#elif DEFAULT_LIBC == LIBC_GLIBC |
782 | +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" |
783 | #else |
784 | -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}" |
785 | +#error "Unsupported DEFAULT_LIBC" |
786 | #endif |
787 | #define LINUX_DYNAMIC_LINKER \ |
788 | CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) |
789 | |
790 | === modified file 'gcc/doc/invoke.texi' |
791 | --- gcc/doc/invoke.texi 2011-04-06 12:29:08 +0000 |
792 | +++ gcc/doc/invoke.texi 2011-04-09 13:16:28 +0000 |
793 | @@ -565,7 +565,8 @@ |
794 | -mcpu=@var{cpu}} |
795 | |
796 | @emph{GNU/Linux Options} |
797 | -@gccoptlist{-muclibc} |
798 | +@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol |
799 | +-tno-android-cc -tno-android-ld} |
800 | |
801 | @emph{H8/300 Options} |
802 | @gccoptlist{-mrelax -mh -ms -mn -mint32 -malign-300} |
803 | @@ -11476,13 +11477,41 @@ |
804 | @table @gcctabopt |
805 | @item -mglibc |
806 | @opindex mglibc |
807 | -Use the GNU C library instead of uClibc. This is the default except |
808 | -on @samp{*-*-linux-*uclibc*} targets. |
809 | +Use the GNU C library. This is the default except |
810 | +on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets. |
811 | |
812 | @item -muclibc |
813 | @opindex muclibc |
814 | -Use uClibc instead of the GNU C library. This is the default on |
815 | +Use uClibc C library. This is the default on |
816 | @samp{*-*-linux-*uclibc*} targets. |
817 | + |
818 | +@item -mbionic |
819 | +@opindex mbionic |
820 | +Use Bionic C library. This is the default on |
821 | +@samp{*-*-linux-*android*} targets. |
822 | + |
823 | +@item -mandroid |
824 | +@opindex mandroid |
825 | +Compile code compatible with Android platform. This is the default on |
826 | +@samp{*-*-linux-*android*} targets. |
827 | + |
828 | +When compiling, this option enables @option{-mbionic}, @option{-fPIC}, |
829 | +@option{-fno-exceptions} and @option{-fno-rtti} by default. When linking, |
830 | +this option makes the GCC driver pass Android-specific options to the linker. |
831 | +Finally, this option causes the preprocessor macro @code{__ANDROID__} |
832 | +to be defined. |
833 | + |
834 | +@item -tno-android-cc |
835 | +@opindex tno-android-cc |
836 | +Disable compilation effects of @option{-mandroid}, i.e., do not enable |
837 | +@option{-mbionic}, @option{-fPIC}, @option{-fno-exceptions} and |
838 | +@option{-fno-rtti} by default. |
839 | + |
840 | +@item -tno-android-ld |
841 | +@opindex tno-android-ld |
842 | +Disable linking effects of @option{-mandroid}, i.e., pass standard Linux |
843 | +linking options to the linker. |
844 | + |
845 | @end table |
846 | |
847 | @node H8/300 Options |
848 | |
849 | === modified file 'gcc/gthr-posix.h' |
850 | --- gcc/gthr-posix.h 2011-01-29 20:36:39 +0000 |
851 | +++ gcc/gthr-posix.h 2011-04-09 13:16:28 +0000 |
852 | @@ -124,7 +124,9 @@ |
853 | __gthrw(pthread_equal) |
854 | __gthrw(pthread_self) |
855 | __gthrw(pthread_detach) |
856 | +#ifndef __BIONIC__ |
857 | __gthrw(pthread_cancel) |
858 | +#endif |
859 | __gthrw(sched_yield) |
860 | |
861 | __gthrw(pthread_mutex_lock) |
862 | @@ -238,7 +240,15 @@ |
863 | __gthread_active_p (void) |
864 | { |
865 | static void *const __gthread_active_ptr |
866 | - = __extension__ (void *) &__gthrw_(pthread_cancel); |
867 | + = __extension__ (void *) &__gthrw_( |
868 | +/* Android's C library does not provide pthread_cancel, check for |
869 | + `pthread_create' instead. */ |
870 | +#ifndef __BIONIC__ |
871 | + pthread_cancel |
872 | +#else |
873 | + pthread_create |
874 | +#endif |
875 | + ); |
876 | return __gthread_active_ptr != 0; |
877 | } |
878 | |
879 | |
880 | === removed file 'gcc/testsuite/gcc.dg/glibc-uclibc-1.c' |
881 | --- gcc/testsuite/gcc.dg/glibc-uclibc-1.c 2007-06-05 21:30:24 +0000 |
882 | +++ gcc/testsuite/gcc.dg/glibc-uclibc-1.c 1970-01-01 00:00:00 +0000 |
883 | @@ -1,6 +0,0 @@ |
884 | -/* Test -mglibc and -muclibc not allowed together. */ |
885 | -/* Origin: Joseph Myers <joseph@codesourcery.com> */ |
886 | -/* { dg-do link { target *-*-linux* } } */ |
887 | -/* { dg-options "-mglibc -muclibc" } */ |
888 | - |
889 | -/* { dg-message "-mglibc and -muclibc used together" "" { target *-*-* } 0 } */ |
890 | |
891 | === removed file 'gcc/testsuite/gcc.dg/glibc-uclibc-2.c' |
892 | --- gcc/testsuite/gcc.dg/glibc-uclibc-2.c 2007-06-05 21:30:24 +0000 |
893 | +++ gcc/testsuite/gcc.dg/glibc-uclibc-2.c 1970-01-01 00:00:00 +0000 |
894 | @@ -1,6 +0,0 @@ |
895 | -/* Test -mglibc and -muclibc not allowed together. */ |
896 | -/* Origin: Joseph Myers <joseph@codesourcery.com> */ |
897 | -/* { dg-do link { target *-*-linux* } } */ |
898 | -/* { dg-options "-muclibc -mglibc" } */ |
899 | - |
900 | -/* { dg-message "-mglibc and -muclibc used together" "" { target *-*-* } 0 } */ |
901 | |
902 | === modified file 'libstdc++-v3/acinclude.m4' |
903 | --- libstdc++-v3/acinclude.m4 2010-10-14 11:27:31 +0000 |
904 | +++ libstdc++-v3/acinclude.m4 2011-04-09 13:16:28 +0000 |
905 | @@ -95,7 +95,7 @@ |
906 | ## (Right now, this only matters for enable_wchar_t, but nothing prevents |
907 | ## other macros from doing the same. This should be automated.) -pme |
908 | |
909 | - # Check for uClibc since Linux platforms use different configuration |
910 | + # Check for C library flavor since Linux platforms use different configuration |
911 | # directories depending on the C library in use. |
912 | AC_EGREP_CPP([_using_uclibc], [ |
913 | #include <stdio.h> |
914 | @@ -104,6 +104,13 @@ |
915 | #endif |
916 | ], uclibc=yes, uclibc=no) |
917 | |
918 | + AC_EGREP_CPP([_using_bionic], [ |
919 | + #include <stdio.h> |
920 | + #if __BIONIC__ |
921 | + _using_bionic |
922 | + #endif |
923 | + ], bionic=yes, bionic=no) |
924 | + |
925 | # Find platform-specific directories containing configuration info. |
926 | # Also possibly modify flags used elsewhere, as needed by the platform. |
927 | GLIBCXX_CHECK_HOST |
928 | @@ -2722,7 +2729,7 @@ |
929 | } |
930 | EOF |
931 | old_CXXFLAGS="$CXXFLAGS" |
932 | - CXXFLAGS=-S |
933 | + CXXFLAGS="-S -fexceptions" |
934 | if AC_TRY_EVAL(ac_compile); then |
935 | if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then |
936 | enable_sjlj_exceptions=yes |
937 | |
938 | === added directory 'libstdc++-v3/config/os/bionic' |
939 | === added file 'libstdc++-v3/config/os/bionic/ctype_base.h' |
940 | --- libstdc++-v3/config/os/bionic/ctype_base.h 1970-01-01 00:00:00 +0000 |
941 | +++ libstdc++-v3/config/os/bionic/ctype_base.h 2011-04-09 13:16:28 +0000 |
942 | @@ -0,0 +1,57 @@ |
943 | +// Locale support -*- C++ -*- |
944 | + |
945 | +// Copyright (C) 2010 Free Software Foundation, Inc. |
946 | +// |
947 | +// This file is part of the GNU ISO C++ Library. This library is free |
948 | +// software; you can redistribute it and/or modify it under the |
949 | +// terms of the GNU General Public License as published by the |
950 | +// Free Software Foundation; either version 3, or (at your option) |
951 | +// any later version. |
952 | + |
953 | +// This library is distributed in the hope that it will be useful, |
954 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
955 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
956 | +// GNU General Public License for more details. |
957 | + |
958 | +// Under Section 7 of GPL version 3, you are granted additional |
959 | +// permissions described in the GCC Runtime Library Exception, version |
960 | +// 3.1, as published by the Free Software Foundation. |
961 | + |
962 | +// You should have received a copy of the GNU General Public License and |
963 | +// a copy of the GCC Runtime Library Exception along with this program; |
964 | +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
965 | +// <http://www.gnu.org/licenses/>. |
966 | + |
967 | +// |
968 | +// ISO C++ 14882: 22.1 Locales |
969 | +// |
970 | + |
971 | +// Information as gleaned from /usr/include/ctype.h, for solaris2.5.1 |
972 | + |
973 | +// Support for Solaris 2.5.1 |
974 | + |
975 | +_GLIBCXX_BEGIN_NAMESPACE(std) |
976 | + |
977 | + /// @brief Base class for ctype. |
978 | + struct ctype_base |
979 | + { |
980 | + // Non-standard typedefs. |
981 | + typedef const int* __to_type; |
982 | + |
983 | + // NB: Offsets into ctype<char>::_M_table force a particular size |
984 | + // on the mask type. Because of this, we don't use an enum. |
985 | + typedef char mask; |
986 | + static const mask upper = _U; |
987 | + static const mask lower = _L; |
988 | + static const mask alpha = _U | _L; |
989 | + static const mask digit = _N; |
990 | + static const mask xdigit = _X | _N; |
991 | + static const mask space = _S; |
992 | + static const mask print = _P | _U | _L | _N | _B; |
993 | + static const mask graph = _P | _U | _L | _N; |
994 | + static const mask cntrl = _C; |
995 | + static const mask punct = _P; |
996 | + static const mask alnum = _U | _L | _N; |
997 | + }; |
998 | + |
999 | +_GLIBCXX_END_NAMESPACE |
1000 | |
1001 | === added file 'libstdc++-v3/config/os/bionic/ctype_inline.h' |
1002 | --- libstdc++-v3/config/os/bionic/ctype_inline.h 1970-01-01 00:00:00 +0000 |
1003 | +++ libstdc++-v3/config/os/bionic/ctype_inline.h 2011-04-09 13:16:28 +0000 |
1004 | @@ -0,0 +1,71 @@ |
1005 | +// Locale support -*- C++ -*- |
1006 | + |
1007 | +// Copyright (C) 2010 Free Software Foundation, Inc. |
1008 | +// |
1009 | +// This file is part of the GNU ISO C++ Library. This library is free |
1010 | +// software; you can redistribute it and/or modify it under the |
1011 | +// terms of the GNU General Public License as published by the |
1012 | +// Free Software Foundation; either version 3, or (at your option) |
1013 | +// any later version. |
1014 | + |
1015 | +// This library is distributed in the hope that it will be useful, |
1016 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
1017 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1018 | +// GNU General Public License for more details. |
1019 | + |
1020 | +// Under Section 7 of GPL version 3, you are granted additional |
1021 | +// permissions described in the GCC Runtime Library Exception, version |
1022 | +// 3.1, as published by the Free Software Foundation. |
1023 | + |
1024 | +// You should have received a copy of the GNU General Public License and |
1025 | +// a copy of the GCC Runtime Library Exception along with this program; |
1026 | +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
1027 | +// <http://www.gnu.org/licenses/>. |
1028 | + |
1029 | +/** @file ctype_inline.h |
1030 | + * This is an internal header file, included by other library headers. |
1031 | + * You should not attempt to use it directly. |
1032 | + */ |
1033 | + |
1034 | +// |
1035 | +// ISO C++ 14882: 22.1 Locales |
1036 | +// |
1037 | + |
1038 | +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) |
1039 | +// functions go in ctype.cc |
1040 | + |
1041 | +_GLIBCXX_BEGIN_NAMESPACE(std) |
1042 | + |
1043 | + bool |
1044 | + ctype<char>:: |
1045 | + is(mask __m, char __c) const |
1046 | + { return _M_table[static_cast<unsigned char>(__c)] & __m; } |
1047 | + |
1048 | + const char* |
1049 | + ctype<char>:: |
1050 | + is(const char* __low, const char* __high, mask* __vec) const |
1051 | + { |
1052 | + while (__low < __high) |
1053 | + *__vec++ = _M_table[static_cast<unsigned char>(*__low++)]; |
1054 | + return __high; |
1055 | + } |
1056 | + |
1057 | + const char* |
1058 | + ctype<char>:: |
1059 | + scan_is(mask __m, const char* __low, const char* __high) const |
1060 | + { |
1061 | + while (__low < __high && !this->is(__m, *__low)) |
1062 | + ++__low; |
1063 | + return __low; |
1064 | + } |
1065 | + |
1066 | + const char* |
1067 | + ctype<char>:: |
1068 | + scan_not(mask __m, const char* __low, const char* __high) const |
1069 | + { |
1070 | + while (__low < __high && this->is(__m, *__low) != 0) |
1071 | + ++__low; |
1072 | + return __low; |
1073 | + } |
1074 | + |
1075 | +_GLIBCXX_END_NAMESPACE |
1076 | |
1077 | === added file 'libstdc++-v3/config/os/bionic/ctype_noninline.h' |
1078 | --- libstdc++-v3/config/os/bionic/ctype_noninline.h 1970-01-01 00:00:00 +0000 |
1079 | +++ libstdc++-v3/config/os/bionic/ctype_noninline.h 2011-04-09 13:16:28 +0000 |
1080 | @@ -0,0 +1,98 @@ |
1081 | +// Locale support -*- C++ -*- |
1082 | + |
1083 | +// Copyright (C) 2010 Free Software Foundation, Inc. |
1084 | +// |
1085 | +// This file is part of the GNU ISO C++ Library. This library is free |
1086 | +// software; you can redistribute it and/or modify it under the |
1087 | +// terms of the GNU General Public License as published by the |
1088 | +// Free Software Foundation; either version 3, or (at your option) |
1089 | +// any later version. |
1090 | + |
1091 | +// This library is distributed in the hope that it will be useful, |
1092 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
1093 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1094 | +// GNU General Public License for more details. |
1095 | + |
1096 | +// Under Section 7 of GPL version 3, you are granted additional |
1097 | +// permissions described in the GCC Runtime Library Exception, version |
1098 | +// 3.1, as published by the Free Software Foundation. |
1099 | + |
1100 | +// You should have received a copy of the GNU General Public License and |
1101 | +// a copy of the GCC Runtime Library Exception along with this program; |
1102 | +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
1103 | +// <http://www.gnu.org/licenses/>. |
1104 | + |
1105 | +/** @file ctype_noninline.h |
1106 | + * This is an internal header file, included by other library headers. |
1107 | + * You should not attempt to use it directly. |
1108 | + */ |
1109 | + |
1110 | +// |
1111 | +// ISO C++ 14882: 22.1 Locales |
1112 | +// |
1113 | + |
1114 | +// Information as gleaned from /usr/include/ctype.h |
1115 | + |
1116 | + const ctype_base::mask* |
1117 | + ctype<char>::classic_table() throw() |
1118 | + { return _ctype_ + 1; } |
1119 | + |
1120 | + ctype<char>::ctype(__c_locale, const mask* __table, bool __del, |
1121 | + size_t __refs) |
1122 | + : facet(__refs), _M_del(__table != 0 && __del), |
1123 | + _M_toupper(NULL), _M_tolower(NULL), |
1124 | + _M_table(__table ? __table : classic_table()) |
1125 | + { |
1126 | + memset(_M_widen, 0, sizeof(_M_widen)); |
1127 | + _M_widen_ok = 0; |
1128 | + memset(_M_narrow, 0, sizeof(_M_narrow)); |
1129 | + _M_narrow_ok = 0; |
1130 | + } |
1131 | + |
1132 | + ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) |
1133 | + : facet(__refs), _M_del(__table != 0 && __del), |
1134 | + _M_toupper(NULL), _M_tolower(NULL), |
1135 | + _M_table(__table ? __table : classic_table()) |
1136 | + { |
1137 | + memset(_M_widen, 0, sizeof(_M_widen)); |
1138 | + _M_widen_ok = 0; |
1139 | + memset(_M_narrow, 0, sizeof(_M_narrow)); |
1140 | + _M_narrow_ok = 0; |
1141 | + } |
1142 | + |
1143 | + char |
1144 | + ctype<char>::do_toupper(char __c) const |
1145 | + { |
1146 | + int __x = __c; |
1147 | + return (this->is(ctype_base::lower, __c) ? (__x - 'a' + 'A') : __x); |
1148 | + } |
1149 | + |
1150 | + const char* |
1151 | + ctype<char>::do_toupper(char* __low, const char* __high) const |
1152 | + { |
1153 | + while (__low < __high) |
1154 | + { |
1155 | + *__low = this->do_toupper(*__low); |
1156 | + ++__low; |
1157 | + } |
1158 | + return __high; |
1159 | + } |
1160 | + |
1161 | + char |
1162 | + ctype<char>::do_tolower(char __c) const |
1163 | + { |
1164 | + int __x = __c; |
1165 | + return (this->is(ctype_base::upper, __c) ? (__x - 'A' + 'a') : __x); |
1166 | + } |
1167 | + |
1168 | + const char* |
1169 | + ctype<char>::do_tolower(char* __low, const char* __high) const |
1170 | + { |
1171 | + while (__low < __high) |
1172 | + { |
1173 | + *__low = this->do_tolower(*__low); |
1174 | + ++__low; |
1175 | + } |
1176 | + return __high; |
1177 | + } |
1178 | + |
1179 | |
1180 | === added file 'libstdc++-v3/config/os/bionic/os_defines.h' |
1181 | --- libstdc++-v3/config/os/bionic/os_defines.h 1970-01-01 00:00:00 +0000 |
1182 | +++ libstdc++-v3/config/os/bionic/os_defines.h 2011-04-09 13:16:28 +0000 |
1183 | @@ -0,0 +1,36 @@ |
1184 | +// Specific definitions for Bionic -*- C++ -*- |
1185 | + |
1186 | +// Copyright (C) 2010 Free Software Foundation, Inc. |
1187 | +// |
1188 | +// This file is part of the GNU ISO C++ Library. This library is free |
1189 | +// software; you can redistribute it and/or modify it under the |
1190 | +// terms of the GNU General Public License as published by the |
1191 | +// Free Software Foundation; either version 3, or (at your option) |
1192 | +// any later version. |
1193 | + |
1194 | +// This library is distributed in the hope that it will be useful, |
1195 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
1196 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1197 | +// GNU General Public License for more details. |
1198 | + |
1199 | +// Under Section 7 of GPL version 3, you are granted additional |
1200 | +// permissions described in the GCC Runtime Library Exception, version |
1201 | +// 3.1, as published by the Free Software Foundation. |
1202 | + |
1203 | +// You should have received a copy of the GNU General Public License and |
1204 | +// a copy of the GCC Runtime Library Exception along with this program; |
1205 | +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
1206 | +// <http://www.gnu.org/licenses/>. |
1207 | + |
1208 | +/** @file os_defines.h |
1209 | + * This is an internal header file, included by other library headers. |
1210 | + * You should not attempt to use it directly. |
1211 | + */ |
1212 | + |
1213 | +#ifndef _GLIBCXX_OS_DEFINES |
1214 | +#define _GLIBCXX_OS_DEFINES 1 |
1215 | + |
1216 | +// System-specific #define, typedefs, corrections, etc, go here. This |
1217 | +// file will come before all others. |
1218 | + |
1219 | +#endif |
1220 | |
1221 | === modified file 'libstdc++-v3/configure' |
1222 | --- libstdc++-v3/configure 2010-10-14 11:27:31 +0000 |
1223 | +++ libstdc++-v3/configure 2011-04-09 13:16:28 +0000 |
1224 | @@ -5185,7 +5185,7 @@ |
1225 | ## (Right now, this only matters for enable_wchar_t, but nothing prevents |
1226 | ## other macros from doing the same. This should be automated.) -pme |
1227 | |
1228 | - # Check for uClibc since Linux platforms use different configuration |
1229 | + # Check for C library flavor since Linux platforms use different configuration |
1230 | # directories depending on the C library in use. |
1231 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1232 | /* end confdefs.h. */ |
1233 | @@ -5205,6 +5205,24 @@ |
1234 | rm -f conftest* |
1235 | |
1236 | |
1237 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
1238 | +/* end confdefs.h. */ |
1239 | + |
1240 | + #include <stdio.h> |
1241 | + #if __BIONIC__ |
1242 | + _using_bionic |
1243 | + #endif |
1244 | + |
1245 | +_ACEOF |
1246 | +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
1247 | + $EGREP "_using_bionic" >/dev/null 2>&1; then : |
1248 | + bionic=yes |
1249 | +else |
1250 | + bionic=no |
1251 | +fi |
1252 | +rm -f conftest* |
1253 | + |
1254 | + |
1255 | # Find platform-specific directories containing configuration info. |
1256 | # Also possibly modify flags used elsewhere, as needed by the platform. |
1257 | |
1258 | @@ -14897,7 +14915,7 @@ |
1259 | } |
1260 | EOF |
1261 | old_CXXFLAGS="$CXXFLAGS" |
1262 | - CXXFLAGS=-S |
1263 | + CXXFLAGS="-S -fexceptions" |
1264 | if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 |
1265 | (eval $ac_compile) 2>&5 |
1266 | ac_status=$? |
1267 | |
1268 | === modified file 'libstdc++-v3/configure.host' |
1269 | --- libstdc++-v3/configure.host 2010-12-03 12:46:12 +0000 |
1270 | +++ libstdc++-v3/configure.host 2011-04-09 13:16:28 +0000 |
1271 | @@ -238,6 +238,8 @@ |
1272 | gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) |
1273 | if [ "$uclibc" = "yes" ]; then |
1274 | os_include_dir="os/uclibc" |
1275 | + elif [ "$bionic" = "yes" ]; then |
1276 | + os_include_dir="os/bionic" |
1277 | else |
1278 | os_include_dir="os/gnu-linux" |
1279 | fi |
cbuild has taken a snapshot of this branch at r99492 and queued it for build.
The snapshot is available at: ex.seabright. co.nz/snapshots /gcc-linaro- 4.5+bzr99492~ ams-codesourcer y~android. tar.xdelta3. xz
http://
and will be built on the following builders:
a8-builder a9-builder i686 x86_64
You can track the build queue at: ex.seabright. co.nz/helpers/ scheduler
http://
cbuild-snapshot: gcc-linaro- 4.5+bzr99492~ ams-codesourcer y~android
cbuild-ancestor: lp:gcc-linaro+bzr99491
cbuild-state: check