Add gcc-4.6. Synced to @180989

Change-Id: Ie3676586e1d8e3c8cd9f07d022f450d05fa08439
svn://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6-mobile
Backport two upstream patches for bitfield volatile bug.

r171347 and r181549
http://gcc.gnu.org/viewcvs?view=revision&revision=181549
http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01477.html

Change-Id: I3f0a433e32eb26015be6173a3b52aac0f6fecf7d
Sync down FSF r184235@google/gcc-4_6_2-mobile branch

1) Get mostly new patches from FSF gcc-4.6 branch
2) Fix PR52129
3) Insert GNU-stack note for all ARM targets

Change-Id: I2b9926981210e517e4021242908074319a91d6bd
.init_array/.fini_array patch for Android/x86

Backport from gcc mainline r177933, r175181, r177963, r178116, r183299.
Fix broken toolchain build on mac.

2012-03-01  Jing Yu  <jingyu@google.com>
       Backport r184577 from google/gcc-4_6 branch.

       2012-02-25  Sriraman Tallam  <tmsriram@google.com>
       * function_reordering_plugin.c: Check for presence of elf.h.
       Otherwise, redefine the elf macros used.
Backport r184061 from gcc-4_6-branch to fix PR52060.
Modifications to enable OpenMP in Android.

This patch enables OpenMP support in the Android NDK by modifying the following:

Specify that pthreads are supported in -lc instead of -lpthread (linux-android.h)
Change the order of ANDROID_LIB_SPEC and LINUX_TARGET_LIB_SPEC so the above change will take precedence (linux-eabi.h)

Modified autoconf for libgomp to check to see if the pthread libraries exist in libc (configure.ac)

Added include to env.c so PAGE_SIZE is defined.

To enable these changes, add "--enable-libgomp" to configure command under build-gcc.sh.

Change-Id: I8b460159b768f64f5198ef5494346cdf75510250
Signed-off-by: Keith Obenschain <obenschaink@gmail.com>
Backport r184357 from trunk

2012-02-17 Doug Kwan <dougkwan@google.com>

	* contrib/testsuite-management/validate_failures.py
	(GetMakefileValue): Check for cross compilers.

Change-Id: Ibb7878370eaa61ce61a9517dc69dfe9c189cf580
2012-05-07  Jing Yu  <jingyu@google.com>

       Backport r186560 and r185958 from gcc trunk
       2012-05-03  Enkovich Ilya  <ilya.enkovich@intel.com>

       * config/linux-android.h (ANDROID_STARTFILE_SPEC): Fix
       shared case.
       (ANDROID_ENDFILE_SPEC): Likewise.
       * config/i386/linux.h (TARGET_OS_CPP_BUILTINS): Add Android
       builtins.
       (LINUX_TARGET_CC1_SPEC): New.
       (CC1_SPEC): Support Android.
       (LINUX_TARGET_LINK_SPEC): New.
       (LINK_SPEC): Support Android.
       (LIB_SPEC): New.
       (STARTFILE_SPEC): New.
       (LINUX_TARGET_ENDFILE_SPEC): New.
       (ENDFILE_SPEC): Support Android.
       * config/i386/linux64.h: Likewise.

Change-Id: I0cda19435822a3a3bb0ef1ece16ce0b282a0322b
2012-05-18   Jing Yu  <jingyu@google.com>

       Backport from trunk r187586:
       2012-05-16  Igor Zamyatin  <igor.zamyatin@intel.com>

       * configure.ac: Stack protector enabling for Android targets.
       * configure: Regenerate.

Change-Id: I3ccde181a343994525b29edd9dd2df4789acf7b7
Backport from trunk r189840: stack-protector runtime fix

        2012-07-25 Sergey Melnikov <sergey.melnikov@intel.com>

        * config/i386/i386.md (stack_protect_set): Disable the pattern
        for Android since Android libc (bionic) does not provide random
        value for stack protection guard at gs:0x14. Guard value
        will be provided from external symbol (default implementation).
        (stack_protect_set_<mode>): Likewise.
        (stack_protect_test): Likewise.
        (stack_protect_test_<mode>): Likewise.
        * gcc/defaults.h: Define macro TARGET_HAS_BIONIC to 0 - target
        * does
        not have Bionic by default
        * config/linux.h: Redefine macro TARGET_HAS_BIONIC to
        * (OPTION_BIONIC)
        Macro OPTION_BIONIC is defined in this file and provides Bionic
        accessibility status

Change-Id: I56ae8fd7fef7c21977072e7f3c24b93030f0b813
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Backport fix to bug 50380: cc1 hangs eating 100% CPU

This seems to affect MIPS GCC 4.6 only

Change-Id: Idb1cf411396d909a40e1b6fcbfb5729879b6cf59
Related:
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50380
  http://gcc.gnu.org/viewcvs/trunk/gcc/cse.c?r1=177852&r2=182498&pathrev=182498
Fix ARM internal compiler error with negative shift amount

Back port fix of ARM ICE compiling the following code with
int foo(int a, int b)
{
    return a | (b << -3);
}

See http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00594.html

Change-Id: Ic4c675a3830d7f213d8abdcf158ca296a836851b
Fix ARM internal compiler error reload1.c:3633 compiling Earth

ARM GCC 4.6 experiences ICE when compiles Earth in debug build
  libs/evll/database/quadtreecachetype.cc:237:1: internal compiler
     error: in elimination_costs_in_insn, at reload1.c:3633

The reason is that ARM back-end expects wrong operand type
sign-extend from char.

Back port fix from
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50099

Change-Id: Ia235b76c6f0bada472a741a763d087789a41db8e
Merge "Fix ARM internal compiler error reload1.c:3633 compiling Earth"
Add correct predicates.md for previous commit

Add Correct predicates.md for previous commit
7e597b08eb15a88ef0e309f2e59df18a636b0c40.

Change-Id: I3047d5276318d3b6fbf66e4c45d0a2f55978ff64
Backport from trunk r190598 and r190599: 64-bit long double for bionic

    2012-08-22  H.J. Lu  <hongjiu.lu@intel.com>

    Replace REAL_VALUE_TO_TARGET_LONG_DOUBLE with real_to_target

        PR target/54347
        * config/i386/i386.c (ix86_split_to_parts): Replace
        REAL_VALUE_TO_TARGET_LONG_DOUBLE with real_to_target.

    2012-08-22  H.J. Lu  <hongjiu.lu@intel.com>

    Add -mlong-double-64/-mlong-double-80 to i386

    gcc/

        * doc/invoke.texi: Document -mlong-double-64/-mlong-double-80.

        * config/i386/i386.c (flag_opts): Add -mlong-double-64.
        (TARGET_HAS_BIONIC): Default long double to 64-bit for Bionic.

        * config/i386/i386.h (LONG_DOUBLE_TYPE_SIZE): Use 64 if
        TARGET_LONG_DOUBLE_64 is true.
        (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): New macro.
        (WIDEST_HARDWARE_FP_SIZE): Defined to 80.

        * config/i386/i386.opt (mlong-double-80): New option.
        (mlong-double-64): Likewise.

        * config/i386/i386-c.c (ix86_target_macros): Define
        __LONG_DOUBLE_64__ for TARGET_LONG_DOUBLE_64.

    gcc/testsuite/

        * gcc.target/i386/long-double-64-1.c: New file.
        * gcc.target/i386/long-double-64-2.c: Likewise.
        * gcc.target/i386/long-double-64-3.c: Likewise.
        * gcc.target/i386/long-double-64-4.c: Likewise.
        * gcc.target/i386/long-double-80-1.c: Likewise.
        * gcc.target/i386/long-double-80-2.c: Likewise.
        * gcc.target/i386/long-double-80-3.c: Likewise.
        * gcc.target/i386/long-double-80-4.c: Likewise.
        * gcc.target/i386/long-double-80-5.c: Likewise.
        * gcc.target/i386/long-double-80-6.c: Likewise.
        * gcc.target/i386/long-double-80-7.c: Likewise.

    libgcc/

        * config/i386/t-linux (HOST_LIBGCC2_CFLAGS): New.

Change-Id: I85b1e7105e24272e6d43115797b4914b93c2a598
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Backport from trunk r186788: Define USE_PT_GNU_EH_FRAME.

    2012-04-24  Chao-ying Fu  <fu@mips.com>

        * unwind-dw2-fde-dip.c: Define USE_PT_GNU_EH_FRAME for BIONIC.

Change-Id: I5b5bb47386302a76cd69f45f40445fa7f5d77665
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Change gcc-4.6 BASE-VER to 4.6

The original 4.6.x-google makes it harder for NDK
make-standalone-toolchain.sh and clang to look for C++ include

Change-Id: Ie2b745540ea290716816395b34f5619c20c08b3a
Fix compilation with GCC 4.7

See

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51969

	PR bootstrap/51969
	Backported from mainline
	2011-11-08  Michael Matz  <matz@suse.de>

	* gengtype.c (write_field_root): Avoid out-of-scope access of newv.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@184239 138bc75d-0d04-0410-961f-82ee72b054a4