Merge lp:~ams-codesourcery/gcc-linaro/android into lp:gcc-linaro/4.5

Proposed by Andrew Stubbs
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
Reviewer Review Type Date Requested Status
Andrew Stubbs (community) Approve
Richard Sandiford Approve
Review via email: mp+57047@code.launchpad.net

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.

To post a comment you must log in.
Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild has taken a snapshot of this branch at r99492 and queued it for build.

The snapshot is available at:
 http://ex.seabright.co.nz/snapshots/gcc-linaro-4.5+bzr99492~ams-codesourcery~android.tar.xdelta3.xz

and will be built on the following builders:
 a8-builder a9-builder i686 x86_64

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: gcc-linaro-4.5+bzr99492~ams-codesourcery~android
cbuild-ancestor: lp:gcc-linaro+bzr99491
cbuild-state: check

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild successfully built this on armv7l-maverick-cbuild105-ursa2-cortexa8r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99492~ams-codesourcery~android/logs/armv7l-maverick-cbuild105-ursa2-cortexa8r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99491:
 -PASS: gcc.dg/glibc-uclibc-1.c (test for excess errors)
 -PASS: gcc.dg/glibc-uclibc-1.c (test for warnings, line )
 -PASS: gcc.dg/glibc-uclibc-2.c (test for excess errors)
 -PASS: gcc.dg/glibc-uclibc-2.c (test for warnings, line )
 -PASS: gfortran.dg/zero_sized_3.f90 -O1 execution test
 +FAIL: gfortran.dg/zero_sized_3.f90 -O1 execution test
 -PASS: gfortran.dg/zero_sized_3.f90 -O2 execution test
 -PASS: gfortran.dg/zero_sized_3.f90 -O2 (test for excess errors)
 -PASS: gfortran.dg/zero_sized_3.f90 -O3 -fomit-frame-pointer execution test
 +FAIL: gfortran.dg/zero_sized_3.f90 -O2 execution test
 +FAIL: gfortran.dg/zero_sized_3.f90 -O2 (test for excess errors)
 +FAIL: gfortran.dg/zero_sized_3.f90 -O3 -fomit-frame-pointer execution test
 -PASS: gfortran.dg/zero_sized_3.f90 -O3 -fomit-frame-pointer -funroll-loops execution test
 -PASS: gfortran.dg/zero_sized_3.f90 -O3 -fomit-frame-pointer -funroll-loops (test for excess errors)
 -PASS: gfortran.dg/zero_sized_3.f90 -O3 -fomit-frame-pointer (test for excess errors)
 +FAIL: gfortran.dg/zero_sized_3.f90 -O3 -fomit-frame-pointer -funroll-loops execution test
 +FAIL: gfortran.dg/zero_sized_3.f90 -O3 -fomit-frame-pointer -funroll-loops (test for excess errors)
 +FAIL: gfortran.dg/zero_sized_3.f90 -O3 -fomit-frame-pointer (test for excess errors)
 -FAIL: 27_io/basic_streambuf/sputc/wchar_t/1057.cc execution test
 +PASS: 27_io/basic_streambuf/sputc/wchar_t/1057.cc execution test

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99492~ams-codesourcery~android/logs/armv7l-maverick-cbuild105-ursa2-cortexa8r1/gcc-testsuite.txt

cbuild-checked: armv7l-maverick-cbuild105-ursa2-cortexa8r1

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild successfully built this on armv7l-maverick-cbuild105-ursa3-cortexa9r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99492~ams-codesourcery~android/logs/armv7l-maverick-cbuild105-ursa3-cortexa9r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99491:
 -PASS: gcc.dg/glibc-uclibc-1.c (test for excess errors)
 -PASS: gcc.dg/glibc-uclibc-1.c (test for warnings, line )
 -PASS: gcc.dg/glibc-uclibc-2.c (test for excess errors)
 -PASS: gcc.dg/glibc-uclibc-2.c (test for warnings, line )
 -FAIL: largefile.c -O3 -g -I. (test for excess errors)
 +PASS: largefile.c -O3 -g -I. (test for excess errors)
 -FAIL: 27_io/basic_streambuf/sputc/wchar_t/1057.cc execution test
 +PASS: 27_io/basic_streambuf/sputc/wchar_t/1057.cc execution test

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99492~ams-codesourcery~android/logs/armv7l-maverick-cbuild105-ursa3-cortexa9r1/gcc-testsuite.txt

cbuild-checked: armv7l-maverick-cbuild105-ursa3-cortexa9r1

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild successfully built this on i686-lucid-cbuild105-scorpius-i686r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99492~ams-codesourcery~android/logs/i686-lucid-cbuild105-scorpius-i686r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99491:
 -PASS: gcc.dg/glibc-uclibc-1.c (test for excess errors)
 -PASS: gcc.dg/glibc-uclibc-1.c (test for warnings, line )
 -PASS: gcc.dg/glibc-uclibc-2.c (test for excess errors)
 -PASS: gcc.dg/glibc-uclibc-2.c (test for warnings, line )

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99492~ams-codesourcery~android/logs/i686-lucid-cbuild105-scorpius-i686r1/gcc-testsuite.txt

cbuild-checked: i686-lucid-cbuild105-scorpius-i686r1

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild successfully built this on x86_64-maverick-cbuild105-crucis-x86_64r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99492~ams-codesourcery~android/logs/x86_64-maverick-cbuild105-crucis-x86_64r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99491:
 -PASS: gcc.dg/glibc-uclibc-1.c (test for excess errors)
 -PASS: gcc.dg/glibc-uclibc-1.c (test for warnings, line )
 -PASS: gcc.dg/glibc-uclibc-2.c (test for excess errors)
 -PASS: gcc.dg/glibc-uclibc-2.c (test for warnings, line )

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99492~ams-codesourcery~android/logs/x86_64-maverick-cbuild105-crucis-x86_64r1/gcc-testsuite.txt

cbuild-checked: x86_64-maverick-cbuild105-crucis-x86_64r1

Revision history for this message
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.

Revision history for this message
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.

review: Approve
Revision history for this message
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.

Revision history for this message
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.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog.linaro'
--- ChangeLog.linaro 2011-04-08 10:56:43 +0000
+++ ChangeLog.linaro 2011-04-09 13:16:28 +0000
@@ -1,3 +1,96 @@
12011-04-09 Andrew Stubbs <ams@codesourcery.com>
2
3 Backport from mainline:
4
5 Maxim Kuvyrkov <maxim@codesourcery.com>
6
7 * config.sub: Recognize *-linux-android*.
8
9 2010-05-27 Maxim Kuvyrkov <maxim@codesourcery.com>
10
11 Add support for Bionic C library
12 gcc/
13 * config.gcc (LIBC_GLIBC, LIBC_BIONIC, LIBC_UCLIBC): New tm_define
14 macro.
15 (DEFAULT_LIBC): New tm_define macro set to one of LIBC_*.
16 (bfin*-uclinux, moxie-*-uclinux*, m68k-*-uclinux*): Update.
17
18 * config/linux.h (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC): Define.
19 (LINUX_TARGET_OS_CPP_BUILTINS): Define __gnu_linux__ only for GLIBC.
20 (CHOOSE_DYNAMIC_LINKER1, CHOOSE_DYNAMIC_LINKER): Make it easier
21 to support multiple C libraries. Handle Bionic.
22 (BIONIC_DYNAMIC_LINKER, BIONIC_DYNAMIC_LINKER32,)
23 (BIONIC_DYNAMIC_LINKER64): Define.
24 (LINUX_DYNAMIC_LINKER, LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64):
25 Update.
26 (TARGET_HAS_SINCOS): Enable for Bionic.
27
28 * config/linux.opt: Rewrite to handle more than 2 C libraries. Make
29 the last option specified on command line take effect.
30 (linux_uclibc): Rename to linux_libc, initialize using DEFAULT_LIBC.
31 (mbionic): New.
32 (mglibc, muclibc): Update.
33
34 * config/alpha/linux-elf.h, config/rs6000/linux64.h,
35 * config/rs6000/sysv4.h (CHOOSE_DYNAMIC_LINKER): Update to use
36 DEFAULT_LIBC.
37
38 * doc/invoke.texi (-mglibc, -muclibc): Update.
39 (-mbionic): Document.
40
41 gcc/testsuite/
42 * gcc.dg/glibc-uclibc-1.c, gcc.dg/glibc-uclibc-2.c: Remove, no longer
43 necessary.
44
45 2010-05-27 Maxim Kuvyrkov <maxim@codesourcery.com>
46
47 Support compilation for Android platform. Reimplement -mandroid.
48 gcc/
49 * config.gcc (*linux*): Include linux-android.h and linux-android.opt.
50 (*android*): Set ANDROID_DEFAULT.
51 (arm*-*-linux*): Include linux-android.h.
52 (arm*-*-eabi*): Don't include previous -mandroid implementation.
53 * config/arm/eabi.h: Remove, move Android-specific parts ...
54 * config/linux-android.h: ... here. New file.
55 * config/arm/eabi.opt: Rename to ...
56 * config/linux-android.opt: ... this.
57 (mandroid): Allow -mno-android option. Initialize based on
58 ANDROID_DEFAULT.
59 * config/linux.h (STARTFILE_SPEC, ENDFILE_SPEC, CC1_SPEC, LIB_SPEC):
60 Move logic to corresponding LINUX_TARGET_* macros.
61 (TARGET_OS_CPP_BUILTINS): Define __ANDROID__, when appropriate.
62 * config/linux-eabi.h (LINK_SPEC, CC1_SPEC, CC1PLUS_SPEC, LIB_SPEC,)
63 (STARTFILE_SPEC, ENDFILE_SPEC): Define to choose between Linux and
64 Android definitions.
65 (LINUX_TARGET_OS_CPP_BUILTINS): Define __ANDROID__ if TARGET_ANDROID.
66 * doc/invoke.texi (-mandroid, -tno-android-cc, -tno-android-ld):
67 Document.
68
69 2010-06-01 Maxim Kuvyrkov <maxim@codesourcery.com>
70
71 gcc/
72 * config/arm/t-linux-androideabi: New.
73 * config.gcc (arm*-*-linux-androideabi): Include multilib configuration.
74
75 2010-05-27 Maxim Kuvyrkov <maxim@codesourcery.com>
76
77 gcc/
78 * gthr-posix.h (pthread_cancel): Don't declare if compiling against
79 Bionic C library.
80 (__gthread_active_p): Check for pthread_create if compiling against
81 Bionic C library.
82
83 2010-06-01 Maxim Kuvyrkov <maxim@codesourcery.com>
84
85 libstdc++-v3/
86 * acinclude.m4: Support Bionic C library.
87 Explicitly specify -fexceptions for exception check.
88 * configure.host: Support Bionic C library.
89 * configure: Regenerate.
90 * config/os/bionic/ctype_base.h, config/os/bionic/ctype_inline.h,
91 * config/os/bionic/ctype_noincline.h, config/os/bionic/os_defines.h:
92 New files, based on config/os/newlib/*.
93
12011-04-08 Richard Sandiford <richard.sandiford@linaro.org>942011-04-08 Richard Sandiford <richard.sandiford@linaro.org>
295
3 Backport from mainline:96 Backport from mainline:
497
=== modified file 'config.sub'
--- config.sub 2010-03-23 14:26:40 +0000
+++ config.sub 2011-04-09 13:16:28 +0000
@@ -4,7 +4,7 @@
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 20104# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5# Free Software Foundation, Inc.5# Free Software Foundation, Inc.
66
7timestamp='2010-03-22'7timestamp='2010-04-23'
88
9# This file is (in principle) common to ALL GNU software.9# This file is (in principle) common to ALL GNU software.
10# The presence of a machine in this file suggests that SOME GNU software10# The presence of a machine in this file suggests that SOME GNU software
@@ -124,8 +124,9 @@
124# Here we must recognize all the valid KERNEL-OS combinations.124# Here we must recognize all the valid KERNEL-OS combinations.
125maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`125maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
126case $maybe_os in126case $maybe_os in
127 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \127 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
128 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \128 linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
129 knetbsd*-gnu* | netbsd*-gnu* | \
129 kopensolaris*-gnu* | \130 kopensolaris*-gnu* | \
130 storm-chaos* | os2-emx* | rtmk-nova*)131 storm-chaos* | os2-emx* | rtmk-nova*)
131 os=-$maybe_os132 os=-$maybe_os
@@ -1307,7 +1308,8 @@
1307 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \1308 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1308 | -chorusos* | -chorusrdb* | -cegcc* \1309 | -chorusos* | -chorusrdb* | -cegcc* \
1309 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \1310 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1310 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \1311 | -mingw32* | -linux-gnu* | -linux-android* \
1312 | -linux-newlib* | -linux-uclibc* \
1311 | -uxpv* | -beos* | -mpeix* | -udk* \1313 | -uxpv* | -beos* | -mpeix* | -udk* \
1312 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \1314 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1313 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \1315 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
13141316
=== modified file 'gcc/config.gcc'
--- gcc/config.gcc 2011-02-27 01:06:15 +0000
+++ gcc/config.gcc 2011-04-09 13:16:28 +0000
@@ -513,26 +513,48 @@
513 *-*-gnu*)513 *-*-gnu*)
514 tmake_file="$tmake_file t-gnu";;514 tmake_file="$tmake_file t-gnu";;
515 esac515 esac
516 # glibc / uclibc switch. uclibc isn't usable for GNU/Hurd and neither for516 # Common C libraries.
517 # GNU/k*BSD.517 tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
518 # glibc / uclibc / bionic switch.
519 # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
518 case $target in520 case $target in
519 *linux*)521 *linux*)
520 extra_options="$extra_options linux.opt";;522 extra_options="$extra_options linux.opt";;
521 *)523 *)
522 tm_defines="$tm_defines OPTION_GLIBC=1";;524 tm_defines="$tm_defines OPTION_GLIBC=1";;
523 esac525 esac
524 case ${target} in526 case $target in
527 *-*-*android*)
528 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"
529 ;;
525 *-*-*uclibc*)530 *-*-*uclibc*)
526 tm_defines="${tm_defines} UCLIBC_DEFAULT=1"531 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
527 ;;532 ;;
528 *)533 *)
529 tm_defines="${tm_defines} UCLIBC_DEFAULT=0"534 tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
530 ;;535 ;;
531 esac536 esac
532 # Assume that glibc or uClibc are being used and so __cxa_atexit is provided.537 # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit
538 # is provided.
533 default_use_cxa_atexit=yes539 default_use_cxa_atexit=yes
534 use_gcc_tgmath=no540 use_gcc_tgmath=no
535 use_gcc_stdint=wrap541 use_gcc_stdint=wrap
542 # Add Android userspace support to Linux targets.
543 case $target in
544 *linux*)
545 tm_file="$tm_file linux-android.h"
546 extra_options="$extra_options linux-android.opt"
547 ;;
548 esac
549 # Enable compilation for Android by default for *android* targets.
550 case $target in
551 *-*-*android*)
552 tm_defines="$tm_defines ANDROID_DEFAULT=1"
553 ;;
554 *)
555 tm_defines="$tm_defines ANDROID_DEFAULT=0"
556 ;;
557 esac
536 ;;558 ;;
537*-*-netbsd*)559*-*-netbsd*)
538 tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"560 tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"
@@ -728,7 +750,7 @@
728 use_collect2=yes750 use_collect2=yes
729 ;;751 ;;
730arm*-*-linux*) # ARM GNU/Linux with ELF752arm*-*-linux*) # ARM GNU/Linux with ELF
731 tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"753 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"
732 case $target in754 case $target in
733 arm*b-*)755 arm*b-*)
734 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"756 tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
@@ -739,6 +761,12 @@
739 arm*-*-linux-*eabi)761 arm*-*-linux-*eabi)
740 tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"762 tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
741 tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"763 tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
764 # Define multilib configuration for arm-linux-androideabi.
765 case ${target} in
766 *-androideabi)
767 tmake_file="$tmake_file arm/t-linux-androideabi"
768 ;;
769 esac
742 # The BPABI long long divmod functions return a 128-bit value in770 # The BPABI long long divmod functions return a 128-bit value in
743 # registers r0-r3. Correctly modeling that requires the use of771 # registers r0-r3. Correctly modeling that requires the use of
744 # TImode.772 # TImode.
@@ -785,9 +813,8 @@
785 tmake_file="arm/t-arm arm/t-arm-elf"813 tmake_file="arm/t-arm arm/t-arm-elf"
786 case ${target} in814 case ${target} in
787 arm*-*-eabi*)815 arm*-*-eabi*)
788 tm_file="$tm_file arm/eabi.h newlib-stdint.h"816 tm_file="$tm_file newlib-stdint.h"
789 tmake_file="${tmake_file} arm/t-bpabi"817 tmake_file="${tmake_file} arm/t-bpabi"
790 extra_options="${extra_options} arm/eabi.opt"
791 use_gcc_stdint=wrap818 use_gcc_stdint=wrap
792 ;;819 ;;
793 arm*-*-symbianelf*)820 arm*-*-symbianelf*)
@@ -843,7 +870,7 @@
843bfin*-uclinux*)870bfin*-uclinux*)
844 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h glibc-stdint.h bfin/uclinux.h"871 tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h glibc-stdint.h bfin/uclinux.h"
845 tmake_file=bfin/t-bfin-uclinux872 tmake_file=bfin/t-bfin-uclinux
846 tm_defines="${tm_defines} UCLIBC_DEFAULT=1"873 tm_defines="${tm_defines} DEFAULT_LIBC=LIBC_UCLIBC"
847 extra_options="${extra_options} linux.opt"874 extra_options="${extra_options} linux.opt"
848 use_collect2=no875 use_collect2=no
849 ;;876 ;;
@@ -924,7 +951,7 @@
924 tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h glibc-stdint.h moxie/uclinux.h"951 tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h glibc-stdint.h moxie/uclinux.h"
925 extra_parts="crti.o crtn.o crtbegin.o crtend.o"952 extra_parts="crti.o crtn.o crtbegin.o crtend.o"
926 tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp"953 tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp"
927 tm_defines="${tm_defines} UCLIBC_DEFAULT=1"954 tm_defines="${tm_defines} DEFAULT_LIBC=LIBC_UCLIBC"
928 extra_options="${extra_options} linux.opt"955 extra_options="${extra_options} linux.opt"
929 ;;956 ;;
930h8300-*-rtems*)957h8300-*-rtems*)
@@ -1644,7 +1671,7 @@
1644 default_m68k_cpu=680201671 default_m68k_cpu=68020
1645 default_cf_cpu=52061672 default_cf_cpu=5206
1646 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"1673 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"
1647 tm_defines="${tm_defines} MOTOROLA=1 UCLIBC_DEFAULT=1"1674 tm_defines="${tm_defines} MOTOROLA=1 DEFAULT_LIBC=LIBC_UCLIBC"
1648 extra_options="${extra_options} linux.opt"1675 extra_options="${extra_options} linux.opt"
1649 tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"1676 tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
1650 ;;1677 ;;
16511678
=== modified file 'gcc/config/alpha/linux-elf.h'
--- gcc/config/alpha/linux-elf.h 2007-08-02 09:49:31 +0000
+++ gcc/config/alpha/linux-elf.h 2011-04-09 13:16:28 +0000
@@ -29,10 +29,12 @@
2929
30#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"30#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
31#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"31#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
32#if UCLIBC_DEFAULT32#if DEFAULT_LIBC == LIBC_UCLIBC
33#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"33#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
34#elif DEFAULT_LIBC == LIBC_GLIBC
35#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
34#else36#else
35#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"37#error "Unsupported DEFAULT_LIBC"
36#endif38#endif
37#define LINUX_DYNAMIC_LINKER \39#define LINUX_DYNAMIC_LINKER \
38 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)40 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
3941
=== removed file 'gcc/config/arm/eabi.h'
--- gcc/config/arm/eabi.h 2008-07-14 20:01:42 +0000
+++ gcc/config/arm/eabi.h 1970-01-01 00:00:00 +0000
@@ -1,125 +0,0 @@
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
1260
=== removed file 'gcc/config/arm/eabi.opt'
--- gcc/config/arm/eabi.opt 2008-07-14 20:01:42 +0000
+++ gcc/config/arm/eabi.opt 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
1; EABI specific options for ARM port of the compiler.
2
3; Copyright (C) 2008 Free Software Foundation, Inc.
4;
5; This file is part of GCC.
6;
7; GCC is free software; you can redistribute it and/or modify it under
8; the terms of the GNU General Public License as published by the Free
9; Software Foundation; either version 3, or (at your option) any later
10; version.
11;
12; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13; WARRANTY; without even the implied warranty of MERCHANTABILITY or
14; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15; for more details.
16;
17; You should have received a copy of the GNU General Public License
18; along with GCC; see the file COPYING3. If not see
19; <http://www.gnu.org/licenses/>.
20
21mandroid
22Target Report RejectNegative Mask(ANDROID)
23Generate code for the Android operating system.
240
=== modified file 'gcc/config/arm/linux-eabi.h'
--- gcc/config/arm/linux-eabi.h 2009-10-30 20:03:09 +0000
+++ gcc/config/arm/linux-eabi.h 2011-04-09 13:16:28 +0000
@@ -66,7 +66,30 @@
66/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to66/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
67 use the GNU/Linux version, not the generic BPABI version. */67 use the GNU/Linux version, not the generic BPABI version. */
68#undef LINK_SPEC68#undef LINK_SPEC
69#define LINK_SPEC LINUX_TARGET_LINK_SPEC BE8_LINK_SPEC69#define LINK_SPEC BE8_LINK_SPEC \
70 LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \
71 LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
72
73#undef CC1_SPEC
74#define CC1_SPEC \
75 LINUX_OR_ANDROID_CC (LINUX_TARGET_CC1_SPEC, \
76 LINUX_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
77
78#define CC1PLUS_SPEC \
79 LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC)
80
81#undef LIB_SPEC
82#define LIB_SPEC \
83 LINUX_OR_ANDROID_LD (LINUX_TARGET_LIB_SPEC, \
84 LINUX_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC)
85
86#undef STARTFILE_SPEC
87#define STARTFILE_SPEC \
88 LINUX_OR_ANDROID_LD (LINUX_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC)
89
90#undef ENDFILE_SPEC
91#define ENDFILE_SPEC \
92 LINUX_OR_ANDROID_LD (LINUX_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
7093
71/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we94/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we
72 do not use -lfloat. */95 do not use -lfloat. */
7396
=== added file 'gcc/config/arm/t-linux-androideabi'
--- gcc/config/arm/t-linux-androideabi 1970-01-01 00:00:00 +0000
+++ gcc/config/arm/t-linux-androideabi 2011-04-09 13:16:28 +0000
@@ -0,0 +1,10 @@
1MULTILIB_OPTIONS = march=armv7-a mthumb
2MULTILIB_DIRNAMES = armv7-a thumb
3MULTILIB_EXCEPTIONS =
4MULTILIB_MATCHES =
5MULTILIB_OSDIRNAMES =
6
7# The "special" multilib can be used to build native applications for Android,
8# as opposed to native shared libraries that are then called via JNI.
9#MULTILIB_OPTIONS += tno-android-cc
10#MULTILIB_DIRNAMES += special
011
=== added file 'gcc/config/linux-android.h'
--- gcc/config/linux-android.h 1970-01-01 00:00:00 +0000
+++ gcc/config/linux-android.h 2011-04-09 13:16:28 +0000
@@ -0,0 +1,53 @@
1/* Configuration file for Linux Android targets.
2 Copyright (C) 2010
3 Free Software Foundation, Inc.
4 Contributed by CodeSourcery, Inc.
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#if ANDROID_DEFAULT
23# define NOANDROID "mno-android"
24#else
25# define NOANDROID "!mandroid"
26#endif
27
28#define LINUX_OR_ANDROID_CC(LINUX_SPEC, ANDROID_SPEC) \
29 "%{" NOANDROID "|tno-android-cc:" LINUX_SPEC ";:" ANDROID_SPEC "}"
30
31#define LINUX_OR_ANDROID_LD(LINUX_SPEC, ANDROID_SPEC) \
32 "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}"
33
34#define ANDROID_LINK_SPEC \
35 "%{shared: -Bsymbolic}"
36
37#define ANDROID_CC1_SPEC \
38 "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \
39 "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}"
40
41#define ANDROID_CC1PLUS_SPEC \
42 "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \
43 "%{!frtti:%{!fno-rtti: -fno-rtti}}"
44
45#define ANDROID_LIB_SPEC \
46 "%{!static: -ldl}"
47
48#define ANDROID_STARTFILE_SPEC \
49 "%{!shared:" \
50 " %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}"
51
52#define ANDROID_ENDFILE_SPEC \
53 "%{!shared: crtend_android%O%s}"
054
=== added file 'gcc/config/linux-android.opt'
--- gcc/config/linux-android.opt 1970-01-01 00:00:00 +0000
+++ gcc/config/linux-android.opt 2011-04-09 13:16:28 +0000
@@ -0,0 +1,23 @@
1; Android specific options.
2
3; Copyright (C) 2010 Free Software Foundation, Inc.
4;
5; This file is part of GCC.
6;
7; GCC is free software; you can redistribute it and/or modify it under
8; the terms of the GNU General Public License as published by the Free
9; Software Foundation; either version 3, or (at your option) any later
10; version.
11;
12; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13; WARRANTY; without even the implied warranty of MERCHANTABILITY or
14; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15; for more details.
16;
17; You should have received a copy of the GNU General Public License
18; along with GCC; see the file COPYING3. If not see
19; <http://www.gnu.org/licenses/>.
20
21mandroid
22Target Report Mask(ANDROID) Var(flag_android) Init(ANDROID_DEFAULT ? OPTION_MASK_ANDROID : 0)
23Generate code for the Android platform.
024
=== modified file 'gcc/config/linux.h'
--- gcc/config/linux.h 2009-04-09 14:00:19 +0000
+++ gcc/config/linux.h 2011-04-09 13:16:28 +0000
@@ -1,6 +1,6 @@
1/* Definitions for Linux-based GNU systems with ELF format1/* Definitions for Linux-based GNU systems with ELF format
2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006,2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006,
3 2007, 2009 Free Software Foundation, Inc.3 2007, 2009, 2010 Free Software Foundation, Inc.
4 Contributed by Eric Youngdale.4 Contributed by Eric Youngdale.
5 Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).5 Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
66
@@ -42,16 +42,17 @@
42 provides part of the support for getting C++ file-scope static42 provides part of the support for getting C++ file-scope static
43 object constructed before entering `main'. */43 object constructed before entering `main'. */
44 44
45#undef STARTFILE_SPEC
46#if defined HAVE_LD_PIE45#if defined HAVE_LD_PIE
47#define STARTFILE_SPEC \46#define LINUX_TARGET_STARTFILE_SPEC \
48 "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \47 "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
49 crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"48 crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
50#else49#else
51#define STARTFILE_SPEC \50#define LINUX_TARGET_STARTFILE_SPEC \
52 "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \51 "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \
53 crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"52 crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
54#endif53#endif
54#undef STARTFILE_SPEC
55#define STARTFILE_SPEC LINUX_TARGET_STARTFILE_SPEC
5556
56/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on57/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on
57 the GNU/Linux magical crtend.o file (see crtstuff.c) which58 the GNU/Linux magical crtend.o file (see crtstuff.c) which
@@ -59,33 +60,44 @@
59 object constructed before entering `main', followed by a normal60 object constructed before entering `main', followed by a normal
60 GNU/Linux "finalizer" file, `crtn.o'. */61 GNU/Linux "finalizer" file, `crtn.o'. */
6162
62#undef ENDFILE_SPEC63#define LINUX_TARGET_ENDFILE_SPEC \
63#define ENDFILE_SPEC \
64 "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"64 "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
65#undef ENDFILE_SPEC
66#define ENDFILE_SPEC LINUX_TARGET_ENDFILE_SPEC
6567
66/* This is for -profile to use -lc_p instead of -lc. */68/* This is for -profile to use -lc_p instead of -lc. */
69#define LINUX_TARGET_CC1_SPEC "%{profile:-p}"
67#ifndef CC1_SPEC70#ifndef CC1_SPEC
68#define CC1_SPEC "%{profile:-p}"71#define CC1_SPEC LINUX_TARGET_CC1_SPEC
69#endif72#endif
7073
71/* The GNU C++ standard library requires that these macros be defined. */74/* The GNU C++ standard library requires that these macros be defined. */
72#undef CPLUSPLUS_CPP_SPEC75#undef CPLUSPLUS_CPP_SPEC
73#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"76#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
7477
75#undef LIB_SPEC78#define LINUX_TARGET_LIB_SPEC \
76#define LIB_SPEC \
77 "%{pthread:-lpthread} \79 "%{pthread:-lpthread} \
78 %{shared:-lc} \80 %{shared:-lc} \
79 %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"81 %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}"
82#undef LIB_SPEC
83#define LIB_SPEC LINUX_TARGET_LIB_SPEC
84
85/* C libraries supported on Linux. */
86#define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
87#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
88#define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
8089
81#define LINUX_TARGET_OS_CPP_BUILTINS() \90#define LINUX_TARGET_OS_CPP_BUILTINS() \
82 do { \91 do { \
83 builtin_define ("__gnu_linux__"); \92 if (OPTION_GLIBC) \
93 builtin_define ("__gnu_linux__"); \
84 builtin_define_std ("linux"); \94 builtin_define_std ("linux"); \
85 builtin_define_std ("unix"); \95 builtin_define_std ("unix"); \
86 builtin_assert ("system=linux"); \96 builtin_assert ("system=linux"); \
87 builtin_assert ("system=unix"); \97 builtin_assert ("system=unix"); \
88 builtin_assert ("system=posix"); \98 builtin_assert ("system=posix"); \
99 if (OPTION_ANDROID) \
100 builtin_define ("__ANDROID__"); \
89 } while (0)101 } while (0)
90102
91#if defined(HAVE_LD_EH_FRAME_HDR)103#if defined(HAVE_LD_EH_FRAME_HDR)
@@ -105,13 +117,24 @@
105#endif117#endif
106118
107/* Determine which dynamic linker to use depending on whether GLIBC or119/* Determine which dynamic linker to use depending on whether GLIBC or
108 uClibc is the default C library and whether -muclibc or -mglibc has120 uClibc or Bionic is the default C library and whether
109 been passed to change the default. */121 -muclibc or -mglibc or -mbionic has been passed to change the default. */
110#if UCLIBC_DEFAULT122
111#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"123#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \
124 "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
125
126#if DEFAULT_LIBC == LIBC_GLIBC
127#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
128 CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
129#elif DEFAULT_LIBC == LIBC_UCLIBC
130#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
131 CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
132#elif DEFAULT_LIBC == LIBC_BIONIC
133#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
134 CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
112#else135#else
113#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"136#error "Unsupported DEFAULT_LIBC"
114#endif137#endif /* DEFAULT_LIBC */
115138
116/* For most targets the following definitions suffice;139/* For most targets the following definitions suffice;
117 GLIBC_DYNAMIC_LINKER must be defined for each target using them, or140 GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
@@ -120,18 +143,25 @@
120#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"143#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
121#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"144#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
122#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"145#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
123#define LINUX_DYNAMIC_LINKER \146#define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
124 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)147#define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
125#define LINUX_DYNAMIC_LINKER32 \148#define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
126 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)149
127#define LINUX_DYNAMIC_LINKER64 \150#define LINUX_DYNAMIC_LINKER \
128 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)151 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \
152 BIONIC_DYNAMIC_LINKER)
153#define LINUX_DYNAMIC_LINKER32 \
154 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
155 BIONIC_DYNAMIC_LINKER32)
156#define LINUX_DYNAMIC_LINKER64 \
157 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
158 BIONIC_DYNAMIC_LINKER64)
129159
130/* Determine whether the entire c99 runtime160/* Determine whether the entire c99 runtime
131 is present in the runtime library. */161 is present in the runtime library. */
132#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)162#define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
133163
134/* Whether we have sincos that follows the GNU extension. */164/* Whether we have sincos that follows the GNU extension. */
135#define TARGET_HAS_SINCOS (OPTION_GLIBC)165#define TARGET_HAS_SINCOS (OPTION_GLIBC | OPTION_BIONIC)
136166
137#define TARGET_POSIX_IO167#define TARGET_POSIX_IO
138168
=== modified file 'gcc/config/linux.opt'
--- gcc/config/linux.opt 2009-06-22 15:49:03 +0000
+++ gcc/config/linux.opt 2011-04-09 13:16:28 +0000
@@ -1,6 +1,6 @@
1; Processor-independent options for GNU/Linux.1; Processor-independent options for GNU/Linux.
2;2;
3; Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.3; Copyright (C) 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
4; Contributed by CodeSourcery.4; Contributed by CodeSourcery.
5;5;
6; This file is part of GCC.6; This file is part of GCC.
@@ -19,10 +19,14 @@
19; along with GCC; see the file COPYING3. If not see19; along with GCC; see the file COPYING3. If not see
20; <http://www.gnu.org/licenses/>.20; <http://www.gnu.org/licenses/>.
2121
22mbionic
23Target Report RejectNegative Var(linux_libc,LIBC_BIONIC) Init(DEFAULT_LIBC) Negative(mglibc)
24Use Bionic C library
25
22mglibc26mglibc
23Target RejectNegative Report InverseMask(UCLIBC, GLIBC) Var(linux_uclibc) Init(UCLIBC_DEFAULT ? OPTION_MASK_UCLIBC : 0)27Target Report RejectNegative Var(linux_libc,LIBC_GLIBC) VarExists Negative(muclibc)
24Use GNU libc instead of uClibc28Use GNU C library
2529
26muclibc30muclibc
27Target RejectNegative Report Mask(UCLIBC) Var(linux_uclibc) VarExists31Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) VarExists Negative(mbionic)
28Use uClibc instead of GNU libc32Use uClibc C library
2933
=== modified file 'gcc/config/rs6000/linux64.h'
--- gcc/config/rs6000/linux64.h 2010-11-17 06:09:53 +0000
+++ gcc/config/rs6000/linux64.h 2011-04-09 13:16:28 +0000
@@ -344,10 +344,12 @@
344#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"344#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
345#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"345#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
346#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"346#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
347#if UCLIBC_DEFAULT347#if DEFAULT_LIBC == LIBC_UCLIBC
348#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"348#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
349#elif DEFAULT_LIBC == LIBC_GLIBC
350#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
349#else351#else
350#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"352#error "Unsupported DEFAULT_LIBC"
351#endif353#endif
352#define LINUX_DYNAMIC_LINKER32 \354#define LINUX_DYNAMIC_LINKER32 \
353 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)355 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
354356
=== modified file 'gcc/config/rs6000/sysv4.h'
--- gcc/config/rs6000/sysv4.h 2010-11-03 13:55:26 +0000
+++ gcc/config/rs6000/sysv4.h 2011-04-09 13:16:28 +0000
@@ -901,10 +901,12 @@
901901
902#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"902#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
903#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"903#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
904#if UCLIBC_DEFAULT904#if DEFAULT_LIBC == LIBC_UCLIBC
905#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"905#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
906#elif DEFAULT_LIBC == LIBC_GLIBC
907#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
906#else908#else
907#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"909#error "Unsupported DEFAULT_LIBC"
908#endif910#endif
909#define LINUX_DYNAMIC_LINKER \911#define LINUX_DYNAMIC_LINKER \
910 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)912 CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
911913
=== modified file 'gcc/doc/invoke.texi'
--- gcc/doc/invoke.texi 2011-04-06 12:29:08 +0000
+++ gcc/doc/invoke.texi 2011-04-09 13:16:28 +0000
@@ -565,7 +565,8 @@
565-mcpu=@var{cpu}}565-mcpu=@var{cpu}}
566566
567@emph{GNU/Linux Options}567@emph{GNU/Linux Options}
568@gccoptlist{-muclibc}568@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol
569-tno-android-cc -tno-android-ld}
569570
570@emph{H8/300 Options}571@emph{H8/300 Options}
571@gccoptlist{-mrelax -mh -ms -mn -mint32 -malign-300}572@gccoptlist{-mrelax -mh -ms -mn -mint32 -malign-300}
@@ -11476,13 +11477,41 @@
11476@table @gcctabopt11477@table @gcctabopt
11477@item -mglibc11478@item -mglibc
11478@opindex mglibc11479@opindex mglibc
11479Use the GNU C library instead of uClibc. This is the default except11480Use the GNU C library. This is the default except
11480on @samp{*-*-linux-*uclibc*} targets.11481on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets.
1148111482
11482@item -muclibc11483@item -muclibc
11483@opindex muclibc11484@opindex muclibc
11484Use uClibc instead of the GNU C library. This is the default on11485Use uClibc C library. This is the default on
11485@samp{*-*-linux-*uclibc*} targets.11486@samp{*-*-linux-*uclibc*} targets.
11487
11488@item -mbionic
11489@opindex mbionic
11490Use Bionic C library. This is the default on
11491@samp{*-*-linux-*android*} targets.
11492
11493@item -mandroid
11494@opindex mandroid
11495Compile code compatible with Android platform. This is the default on
11496@samp{*-*-linux-*android*} targets.
11497
11498When compiling, this option enables @option{-mbionic}, @option{-fPIC},
11499@option{-fno-exceptions} and @option{-fno-rtti} by default. When linking,
11500this option makes the GCC driver pass Android-specific options to the linker.
11501Finally, this option causes the preprocessor macro @code{__ANDROID__}
11502to be defined.
11503
11504@item -tno-android-cc
11505@opindex tno-android-cc
11506Disable compilation effects of @option{-mandroid}, i.e., do not enable
11507@option{-mbionic}, @option{-fPIC}, @option{-fno-exceptions} and
11508@option{-fno-rtti} by default.
11509
11510@item -tno-android-ld
11511@opindex tno-android-ld
11512Disable linking effects of @option{-mandroid}, i.e., pass standard Linux
11513linking options to the linker.
11514
11486@end table11515@end table
1148711516
11488@node H8/300 Options11517@node H8/300 Options
1148911518
=== modified file 'gcc/gthr-posix.h'
--- gcc/gthr-posix.h 2011-01-29 20:36:39 +0000
+++ gcc/gthr-posix.h 2011-04-09 13:16:28 +0000
@@ -124,7 +124,9 @@
124__gthrw(pthread_equal)124__gthrw(pthread_equal)
125__gthrw(pthread_self)125__gthrw(pthread_self)
126__gthrw(pthread_detach)126__gthrw(pthread_detach)
127#ifndef __BIONIC__
127__gthrw(pthread_cancel)128__gthrw(pthread_cancel)
129#endif
128__gthrw(sched_yield)130__gthrw(sched_yield)
129131
130__gthrw(pthread_mutex_lock)132__gthrw(pthread_mutex_lock)
@@ -238,7 +240,15 @@
238__gthread_active_p (void)240__gthread_active_p (void)
239{241{
240 static void *const __gthread_active_ptr242 static void *const __gthread_active_ptr
241 = __extension__ (void *) &__gthrw_(pthread_cancel);243 = __extension__ (void *) &__gthrw_(
244/* Android's C library does not provide pthread_cancel, check for
245 `pthread_create' instead. */
246#ifndef __BIONIC__
247 pthread_cancel
248#else
249 pthread_create
250#endif
251 );
242 return __gthread_active_ptr != 0;252 return __gthread_active_ptr != 0;
243}253}
244254
245255
=== removed file 'gcc/testsuite/gcc.dg/glibc-uclibc-1.c'
--- gcc/testsuite/gcc.dg/glibc-uclibc-1.c 2007-06-05 21:30:24 +0000
+++ gcc/testsuite/gcc.dg/glibc-uclibc-1.c 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1/* Test -mglibc and -muclibc not allowed together. */
2/* Origin: Joseph Myers <joseph@codesourcery.com> */
3/* { dg-do link { target *-*-linux* } } */
4/* { dg-options "-mglibc -muclibc" } */
5
6/* { dg-message "-mglibc and -muclibc used together" "" { target *-*-* } 0 } */
70
=== removed file 'gcc/testsuite/gcc.dg/glibc-uclibc-2.c'
--- gcc/testsuite/gcc.dg/glibc-uclibc-2.c 2007-06-05 21:30:24 +0000
+++ gcc/testsuite/gcc.dg/glibc-uclibc-2.c 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
1/* Test -mglibc and -muclibc not allowed together. */
2/* Origin: Joseph Myers <joseph@codesourcery.com> */
3/* { dg-do link { target *-*-linux* } } */
4/* { dg-options "-muclibc -mglibc" } */
5
6/* { dg-message "-mglibc and -muclibc used together" "" { target *-*-* } 0 } */
70
=== modified file 'libstdc++-v3/acinclude.m4'
--- libstdc++-v3/acinclude.m4 2010-10-14 11:27:31 +0000
+++ libstdc++-v3/acinclude.m4 2011-04-09 13:16:28 +0000
@@ -95,7 +95,7 @@
95 ## (Right now, this only matters for enable_wchar_t, but nothing prevents95 ## (Right now, this only matters for enable_wchar_t, but nothing prevents
96 ## other macros from doing the same. This should be automated.) -pme96 ## other macros from doing the same. This should be automated.) -pme
9797
98 # Check for uClibc since Linux platforms use different configuration98 # Check for C library flavor since Linux platforms use different configuration
99 # directories depending on the C library in use.99 # directories depending on the C library in use.
100 AC_EGREP_CPP([_using_uclibc], [100 AC_EGREP_CPP([_using_uclibc], [
101 #include <stdio.h>101 #include <stdio.h>
@@ -104,6 +104,13 @@
104 #endif104 #endif
105 ], uclibc=yes, uclibc=no)105 ], uclibc=yes, uclibc=no)
106106
107 AC_EGREP_CPP([_using_bionic], [
108 #include <stdio.h>
109 #if __BIONIC__
110 _using_bionic
111 #endif
112 ], bionic=yes, bionic=no)
113
107 # Find platform-specific directories containing configuration info.114 # Find platform-specific directories containing configuration info.
108 # Also possibly modify flags used elsewhere, as needed by the platform.115 # Also possibly modify flags used elsewhere, as needed by the platform.
109 GLIBCXX_CHECK_HOST116 GLIBCXX_CHECK_HOST
@@ -2722,7 +2729,7 @@
2722}2729}
2723EOF2730EOF
2724 old_CXXFLAGS="$CXXFLAGS"2731 old_CXXFLAGS="$CXXFLAGS"
2725 CXXFLAGS=-S2732 CXXFLAGS="-S -fexceptions"
2726 if AC_TRY_EVAL(ac_compile); then2733 if AC_TRY_EVAL(ac_compile); then
2727 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then2734 if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
2728 enable_sjlj_exceptions=yes2735 enable_sjlj_exceptions=yes
27292736
=== added directory 'libstdc++-v3/config/os/bionic'
=== added file 'libstdc++-v3/config/os/bionic/ctype_base.h'
--- libstdc++-v3/config/os/bionic/ctype_base.h 1970-01-01 00:00:00 +0000
+++ libstdc++-v3/config/os/bionic/ctype_base.h 2011-04-09 13:16:28 +0000
@@ -0,0 +1,57 @@
1// Locale support -*- C++ -*-
2
3// Copyright (C) 2010 Free Software Foundation, Inc.
4//
5// This file is part of the GNU ISO C++ Library. This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
8// Free Software Foundation; either version 3, or (at your option)
9// any later version.
10
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16// Under Section 7 of GPL version 3, you are granted additional
17// permissions described in the GCC Runtime Library Exception, version
18// 3.1, as published by the Free Software Foundation.
19
20// You should have received a copy of the GNU General Public License and
21// a copy of the GCC Runtime Library Exception along with this program;
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23// <http://www.gnu.org/licenses/>.
24
25//
26// ISO C++ 14882: 22.1 Locales
27//
28
29// Information as gleaned from /usr/include/ctype.h, for solaris2.5.1
30
31// Support for Solaris 2.5.1
32
33_GLIBCXX_BEGIN_NAMESPACE(std)
34
35 /// @brief Base class for ctype.
36 struct ctype_base
37 {
38 // Non-standard typedefs.
39 typedef const int* __to_type;
40
41 // NB: Offsets into ctype<char>::_M_table force a particular size
42 // on the mask type. Because of this, we don't use an enum.
43 typedef char mask;
44 static const mask upper = _U;
45 static const mask lower = _L;
46 static const mask alpha = _U | _L;
47 static const mask digit = _N;
48 static const mask xdigit = _X | _N;
49 static const mask space = _S;
50 static const mask print = _P | _U | _L | _N | _B;
51 static const mask graph = _P | _U | _L | _N;
52 static const mask cntrl = _C;
53 static const mask punct = _P;
54 static const mask alnum = _U | _L | _N;
55 };
56
57_GLIBCXX_END_NAMESPACE
058
=== added file 'libstdc++-v3/config/os/bionic/ctype_inline.h'
--- libstdc++-v3/config/os/bionic/ctype_inline.h 1970-01-01 00:00:00 +0000
+++ libstdc++-v3/config/os/bionic/ctype_inline.h 2011-04-09 13:16:28 +0000
@@ -0,0 +1,71 @@
1// Locale support -*- C++ -*-
2
3// Copyright (C) 2010 Free Software Foundation, Inc.
4//
5// This file is part of the GNU ISO C++ Library. This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
8// Free Software Foundation; either version 3, or (at your option)
9// any later version.
10
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16// Under Section 7 of GPL version 3, you are granted additional
17// permissions described in the GCC Runtime Library Exception, version
18// 3.1, as published by the Free Software Foundation.
19
20// You should have received a copy of the GNU General Public License and
21// a copy of the GCC Runtime Library Exception along with this program;
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23// <http://www.gnu.org/licenses/>.
24
25/** @file ctype_inline.h
26 * This is an internal header file, included by other library headers.
27 * You should not attempt to use it directly.
28 */
29
30//
31// ISO C++ 14882: 22.1 Locales
32//
33
34// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
35// functions go in ctype.cc
36
37_GLIBCXX_BEGIN_NAMESPACE(std)
38
39 bool
40 ctype<char>::
41 is(mask __m, char __c) const
42 { return _M_table[static_cast<unsigned char>(__c)] & __m; }
43
44 const char*
45 ctype<char>::
46 is(const char* __low, const char* __high, mask* __vec) const
47 {
48 while (__low < __high)
49 *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
50 return __high;
51 }
52
53 const char*
54 ctype<char>::
55 scan_is(mask __m, const char* __low, const char* __high) const
56 {
57 while (__low < __high && !this->is(__m, *__low))
58 ++__low;
59 return __low;
60 }
61
62 const char*
63 ctype<char>::
64 scan_not(mask __m, const char* __low, const char* __high) const
65 {
66 while (__low < __high && this->is(__m, *__low) != 0)
67 ++__low;
68 return __low;
69 }
70
71_GLIBCXX_END_NAMESPACE
072
=== added file 'libstdc++-v3/config/os/bionic/ctype_noninline.h'
--- libstdc++-v3/config/os/bionic/ctype_noninline.h 1970-01-01 00:00:00 +0000
+++ libstdc++-v3/config/os/bionic/ctype_noninline.h 2011-04-09 13:16:28 +0000
@@ -0,0 +1,98 @@
1// Locale support -*- C++ -*-
2
3// Copyright (C) 2010 Free Software Foundation, Inc.
4//
5// This file is part of the GNU ISO C++ Library. This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
8// Free Software Foundation; either version 3, or (at your option)
9// any later version.
10
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16// Under Section 7 of GPL version 3, you are granted additional
17// permissions described in the GCC Runtime Library Exception, version
18// 3.1, as published by the Free Software Foundation.
19
20// You should have received a copy of the GNU General Public License and
21// a copy of the GCC Runtime Library Exception along with this program;
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23// <http://www.gnu.org/licenses/>.
24
25/** @file ctype_noninline.h
26 * This is an internal header file, included by other library headers.
27 * You should not attempt to use it directly.
28 */
29
30//
31// ISO C++ 14882: 22.1 Locales
32//
33
34// Information as gleaned from /usr/include/ctype.h
35
36 const ctype_base::mask*
37 ctype<char>::classic_table() throw()
38 { return _ctype_ + 1; }
39
40 ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
41 size_t __refs)
42 : facet(__refs), _M_del(__table != 0 && __del),
43 _M_toupper(NULL), _M_tolower(NULL),
44 _M_table(__table ? __table : classic_table())
45 {
46 memset(_M_widen, 0, sizeof(_M_widen));
47 _M_widen_ok = 0;
48 memset(_M_narrow, 0, sizeof(_M_narrow));
49 _M_narrow_ok = 0;
50 }
51
52 ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
53 : facet(__refs), _M_del(__table != 0 && __del),
54 _M_toupper(NULL), _M_tolower(NULL),
55 _M_table(__table ? __table : classic_table())
56 {
57 memset(_M_widen, 0, sizeof(_M_widen));
58 _M_widen_ok = 0;
59 memset(_M_narrow, 0, sizeof(_M_narrow));
60 _M_narrow_ok = 0;
61 }
62
63 char
64 ctype<char>::do_toupper(char __c) const
65 {
66 int __x = __c;
67 return (this->is(ctype_base::lower, __c) ? (__x - 'a' + 'A') : __x);
68 }
69
70 const char*
71 ctype<char>::do_toupper(char* __low, const char* __high) const
72 {
73 while (__low < __high)
74 {
75 *__low = this->do_toupper(*__low);
76 ++__low;
77 }
78 return __high;
79 }
80
81 char
82 ctype<char>::do_tolower(char __c) const
83 {
84 int __x = __c;
85 return (this->is(ctype_base::upper, __c) ? (__x - 'A' + 'a') : __x);
86 }
87
88 const char*
89 ctype<char>::do_tolower(char* __low, const char* __high) const
90 {
91 while (__low < __high)
92 {
93 *__low = this->do_tolower(*__low);
94 ++__low;
95 }
96 return __high;
97 }
98
099
=== added file 'libstdc++-v3/config/os/bionic/os_defines.h'
--- libstdc++-v3/config/os/bionic/os_defines.h 1970-01-01 00:00:00 +0000
+++ libstdc++-v3/config/os/bionic/os_defines.h 2011-04-09 13:16:28 +0000
@@ -0,0 +1,36 @@
1// Specific definitions for Bionic -*- C++ -*-
2
3// Copyright (C) 2010 Free Software Foundation, Inc.
4//
5// This file is part of the GNU ISO C++ Library. This library is free
6// software; you can redistribute it and/or modify it under the
7// terms of the GNU General Public License as published by the
8// Free Software Foundation; either version 3, or (at your option)
9// any later version.
10
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15
16// Under Section 7 of GPL version 3, you are granted additional
17// permissions described in the GCC Runtime Library Exception, version
18// 3.1, as published by the Free Software Foundation.
19
20// You should have received a copy of the GNU General Public License and
21// a copy of the GCC Runtime Library Exception along with this program;
22// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23// <http://www.gnu.org/licenses/>.
24
25/** @file os_defines.h
26 * This is an internal header file, included by other library headers.
27 * You should not attempt to use it directly.
28 */
29
30#ifndef _GLIBCXX_OS_DEFINES
31#define _GLIBCXX_OS_DEFINES 1
32
33// System-specific #define, typedefs, corrections, etc, go here. This
34// file will come before all others.
35
36#endif
037
=== modified file 'libstdc++-v3/configure'
--- libstdc++-v3/configure 2010-10-14 11:27:31 +0000
+++ libstdc++-v3/configure 2011-04-09 13:16:28 +0000
@@ -5185,7 +5185,7 @@
5185 ## (Right now, this only matters for enable_wchar_t, but nothing prevents5185 ## (Right now, this only matters for enable_wchar_t, but nothing prevents
5186 ## other macros from doing the same. This should be automated.) -pme5186 ## other macros from doing the same. This should be automated.) -pme
51875187
5188 # Check for uClibc since Linux platforms use different configuration5188 # Check for C library flavor since Linux platforms use different configuration
5189 # directories depending on the C library in use.5189 # directories depending on the C library in use.
5190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext5190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5191/* end confdefs.h. */5191/* end confdefs.h. */
@@ -5205,6 +5205,24 @@
5205rm -f conftest*5205rm -f conftest*
52065206
52075207
5208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5209/* end confdefs.h. */
5210
5211 #include <stdio.h>
5212 #if __BIONIC__
5213 _using_bionic
5214 #endif
5215
5216_ACEOF
5217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5218 $EGREP "_using_bionic" >/dev/null 2>&1; then :
5219 bionic=yes
5220else
5221 bionic=no
5222fi
5223rm -f conftest*
5224
5225
5208 # Find platform-specific directories containing configuration info.5226 # Find platform-specific directories containing configuration info.
5209 # Also possibly modify flags used elsewhere, as needed by the platform.5227 # Also possibly modify flags used elsewhere, as needed by the platform.
52105228
@@ -14897,7 +14915,7 @@
14897}14915}
14898EOF14916EOF
14899 old_CXXFLAGS="$CXXFLAGS"14917 old_CXXFLAGS="$CXXFLAGS"
14900 CXXFLAGS=-S14918 CXXFLAGS="-S -fexceptions"
14901 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&514919 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
14902 (eval $ac_compile) 2>&514920 (eval $ac_compile) 2>&5
14903 ac_status=$?14921 ac_status=$?
1490414922
=== modified file 'libstdc++-v3/configure.host'
--- libstdc++-v3/configure.host 2010-12-03 12:46:12 +0000
+++ libstdc++-v3/configure.host 2011-04-09 13:16:28 +0000
@@ -238,6 +238,8 @@
238 gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)238 gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
239 if [ "$uclibc" = "yes" ]; then239 if [ "$uclibc" = "yes" ]; then
240 os_include_dir="os/uclibc"240 os_include_dir="os/uclibc"
241 elif [ "$bionic" = "yes" ]; then
242 os_include_dir="os/bionic"
241 else243 else
242 os_include_dir="os/gnu-linux"244 os_include_dir="os/gnu-linux"
243 fi245 fi

Subscribers

People subscribed via source and target branches