Merge "Refresh X86 GCC 4.7 toolchain (darwin)"
diff --git a/SOURCES b/SOURCES
index 0eedd95..2f40afc 100644
--- a/SOURCES
+++ b/SOURCES
@@ -1,12 +1,15 @@
-toolchain/build.git              7fe9b270f1b1f0feccee11937216be5fabe94950 Fix 64-bit build of GCC 4.6/4.7 with graphite support
+toolchain/build.git              de36c1312eaf8d1b23a8d79244675f395c361e73 Avoid race condition by "make install -j1" in canadian build->target
 toolchain/gmp.git                e6b9669dafc6a5f83c80b4b4176359b78bccdc90 Add gmp-5.0.5.tar.bz2
-toolchain/mpfr.git               bde731396c38c8d5b0bca800aace6a690d0d2978 add mpfr-2.4.2.tar.bz2
-toolchain/mpc.git                a4109ccc6e07f72f41c397a17fdfbed3e5e19c66 Add mpc-0.8.1 package to toolchain source.
-toolchain/cloog.git              9efba6d305fabb9ecd29dde95c48f27010832824 add cloog-0.16.3.tar.gz
-toolchain/ppl.git                0cdb5d04fefa404debc1bddbb94322f46eb4fd69 Add ppl-0.11.2.tar.bz2
+toolchain/mpfr.git               bfcf1bfa38469208aaad8873cd4c68781061d90f add mpfr-3.1.1.tar.bz2
+toolchain/mpc.git                835d16e92eed875638a8b5d552034c3b1aae045b add mpc-1.0.1.tar.gz
+toolchain/cloog.git              b522eced5dd70c8536c15f044078498658fb9219 add cloog-0.17.0.tar.gz
+toolchain/ppl.git                8ba1875b4c5341d902321761022a6d2a0b5b19a4 add ppl-1.0.tar.bz2
 toolchain/expat.git              40172a0ae9d40a068f1e1a48ffcf6a1ccf765ed5 expat package for building gdb-7.3
-toolchain/binutils.git           dc51c7a5e0e2620dc85e6c9c46027dce94a85e1f Fix gold issue on fsck_msdos build when objects built by ICC
-toolchain/gcc.git                92da119a900b1f73fb7f23fbe1c044a237986741 Merge "Fix ARM GCC 4.6/4.7 fail to links code using 64-bit atomic built-in"
-toolchain/gdb.git                534e6066a5c9ecbac5df305092ab197ada6bb8d0 Re-ISA-tize Thumb dynsyms to fix solib bp SIGILL
-toolchain/clang.git              f2f5aff7d1b9c946946b084faa080dde1d74d706 Add workaround for libstdc++ for C++0x.
-toolchain/llvm.git               95b8007dded354d15113cc0038f12ec62fa2b596 Update the live-ins after lowering tMOVCCr_pseudo.
+toolchain/binutils.git           8415ff0aaeb157307bb01a45373dba81919882fc Merge "Fix the "DIV usage mismatch between blah.o and output" error"
+toolchain/gcc.git                7f9f4477cbebb22723af8c0fac55aefc1228e02c Fix x86 GCC4.7 segfault in i386.c distance_non_agu_define_in_bb()
+toolchain/gdb.git                87c2a8617d772060c22533ed1626fca7f0649ca0 Merge "Fix default isatized_symbol_value handler"
+toolchain/python.git             88d9000040cfe698e8e32e071880ed8b41e11216 Remove *.info
+toolchain/clang.git (release_32) 9d4223132b17b9f647203b886fe09e7555ab9ab6 Misc fixes
+toolchain/llvm.git (release_32)  9854c4870dfec924c4c2fca0b6d406dc1eff4e32 Fix gnustl-shared-1 unit test failure.
+toolchain/clang.git (release_31) 4ee97488c51806ac044ff5b6c70f07d1be8dc339 Leave -fexception alone since it's enabled by default
+toolchain/llvm.git (release_31)  9e9a074a457f0db61a0f7977bbf5e3c4afebe2e0 Fix canadian build
diff --git a/bin/i686-linux-android-addr2line b/bin/i686-linux-android-addr2line
index 265650f..d592cf0 100755
--- a/bin/i686-linux-android-addr2line
+++ b/bin/i686-linux-android-addr2line
Binary files differ
diff --git a/bin/i686-linux-android-ar b/bin/i686-linux-android-ar
index a5ce9c2..566f74d 100755
--- a/bin/i686-linux-android-ar
+++ b/bin/i686-linux-android-ar
Binary files differ
diff --git a/bin/i686-linux-android-as b/bin/i686-linux-android-as
index c315e1c..fff55fc 100755
--- a/bin/i686-linux-android-as
+++ b/bin/i686-linux-android-as
Binary files differ
diff --git a/bin/i686-linux-android-c++ b/bin/i686-linux-android-c++
index 3de5d9c..b9b00cf 100755
--- a/bin/i686-linux-android-c++
+++ b/bin/i686-linux-android-c++
Binary files differ
diff --git a/bin/i686-linux-android-c++filt b/bin/i686-linux-android-c++filt
index ca97b8e..2e23bc9 100755
--- a/bin/i686-linux-android-c++filt
+++ b/bin/i686-linux-android-c++filt
Binary files differ
diff --git a/bin/i686-linux-android-cpp b/bin/i686-linux-android-cpp
index 6af4f01..bc56dd8 100755
--- a/bin/i686-linux-android-cpp
+++ b/bin/i686-linux-android-cpp
Binary files differ
diff --git a/bin/i686-linux-android-elfedit b/bin/i686-linux-android-elfedit
index 13e0d1d..619552a 100755
--- a/bin/i686-linux-android-elfedit
+++ b/bin/i686-linux-android-elfedit
Binary files differ
diff --git a/bin/i686-linux-android-g++ b/bin/i686-linux-android-g++
index 3de5d9c..7b0cf44 100755
--- a/bin/i686-linux-android-g++
+++ b/bin/i686-linux-android-g++
Binary files differ
diff --git a/bin/i686-linux-android-gcc b/bin/i686-linux-android-gcc
index 7d65c0b..7cb9940 100755
--- a/bin/i686-linux-android-gcc
+++ b/bin/i686-linux-android-gcc
Binary files differ
diff --git a/bin/i686-linux-android-gcc-4.7 b/bin/i686-linux-android-gcc-4.7
index 5ea3eca..a6c8b0f 100755
--- a/bin/i686-linux-android-gcc-4.7
+++ b/bin/i686-linux-android-gcc-4.7
Binary files differ
diff --git a/bin/i686-linux-android-gcc-ar b/bin/i686-linux-android-gcc-ar
index db96c43..074d60e 100755
--- a/bin/i686-linux-android-gcc-ar
+++ b/bin/i686-linux-android-gcc-ar
Binary files differ
diff --git a/bin/i686-linux-android-gcc-nm b/bin/i686-linux-android-gcc-nm
index e6f5509..f1c6c6e 100755
--- a/bin/i686-linux-android-gcc-nm
+++ b/bin/i686-linux-android-gcc-nm
Binary files differ
diff --git a/bin/i686-linux-android-gcc-ranlib b/bin/i686-linux-android-gcc-ranlib
index 8a3eed3..0101b0b 100755
--- a/bin/i686-linux-android-gcc-ranlib
+++ b/bin/i686-linux-android-gcc-ranlib
Binary files differ
diff --git a/bin/i686-linux-android-gcov b/bin/i686-linux-android-gcov
index b90bd8e..0220958 100755
--- a/bin/i686-linux-android-gcov
+++ b/bin/i686-linux-android-gcov
Binary files differ
diff --git a/bin/i686-linux-android-gdb b/bin/i686-linux-android-gdb
index 983c8a3..41f4a85 100755
--- a/bin/i686-linux-android-gdb
+++ b/bin/i686-linux-android-gdb
Binary files differ
diff --git a/bin/i686-linux-android-gdbtui b/bin/i686-linux-android-gdbtui
index 2293914..9ce4eb8 100755
--- a/bin/i686-linux-android-gdbtui
+++ b/bin/i686-linux-android-gdbtui
Binary files differ
diff --git a/bin/i686-linux-android-gprof b/bin/i686-linux-android-gprof
index 07acca1..2f4aaed 100755
--- a/bin/i686-linux-android-gprof
+++ b/bin/i686-linux-android-gprof
Binary files differ
diff --git a/bin/i686-linux-android-ld b/bin/i686-linux-android-ld
index 9f33a73..c3042d7 100755
--- a/bin/i686-linux-android-ld
+++ b/bin/i686-linux-android-ld
Binary files differ
diff --git a/bin/i686-linux-android-ld.bfd b/bin/i686-linux-android-ld.bfd
index a01fbe8..f1f9c1f 100755
--- a/bin/i686-linux-android-ld.bfd
+++ b/bin/i686-linux-android-ld.bfd
Binary files differ
diff --git a/bin/i686-linux-android-ld.gold b/bin/i686-linux-android-ld.gold
index 9f33a73..c3042d7 100755
--- a/bin/i686-linux-android-ld.gold
+++ b/bin/i686-linux-android-ld.gold
Binary files differ
diff --git a/bin/i686-linux-android-nm b/bin/i686-linux-android-nm
index cf372f8..3a56c51 100755
--- a/bin/i686-linux-android-nm
+++ b/bin/i686-linux-android-nm
Binary files differ
diff --git a/bin/i686-linux-android-objcopy b/bin/i686-linux-android-objcopy
index dff8925..6be5675 100755
--- a/bin/i686-linux-android-objcopy
+++ b/bin/i686-linux-android-objcopy
Binary files differ
diff --git a/bin/i686-linux-android-objdump b/bin/i686-linux-android-objdump
index 9cb2d32..a85dc6c 100755
--- a/bin/i686-linux-android-objdump
+++ b/bin/i686-linux-android-objdump
Binary files differ
diff --git a/bin/i686-linux-android-ranlib b/bin/i686-linux-android-ranlib
index dfb2bc0..3a5ce4a 100755
--- a/bin/i686-linux-android-ranlib
+++ b/bin/i686-linux-android-ranlib
Binary files differ
diff --git a/bin/i686-linux-android-readelf b/bin/i686-linux-android-readelf
index 2f058da..203ed10 100755
--- a/bin/i686-linux-android-readelf
+++ b/bin/i686-linux-android-readelf
Binary files differ
diff --git a/bin/i686-linux-android-size b/bin/i686-linux-android-size
index ecc2bc6..e4bfb13 100755
--- a/bin/i686-linux-android-size
+++ b/bin/i686-linux-android-size
Binary files differ
diff --git a/bin/i686-linux-android-strings b/bin/i686-linux-android-strings
index 29a3f2a..568304c 100755
--- a/bin/i686-linux-android-strings
+++ b/bin/i686-linux-android-strings
Binary files differ
diff --git a/bin/i686-linux-android-strip b/bin/i686-linux-android-strip
index 0780758..9fe4595 100755
--- a/bin/i686-linux-android-strip
+++ b/bin/i686-linux-android-strip
Binary files differ
diff --git a/i686-linux-android/bin/ar b/i686-linux-android/bin/ar
index a5ce9c2..566f74d 100755
--- a/i686-linux-android/bin/ar
+++ b/i686-linux-android/bin/ar
Binary files differ
diff --git a/i686-linux-android/bin/as b/i686-linux-android/bin/as
index c315e1c..ea43a0a 100755
--- a/i686-linux-android/bin/as
+++ b/i686-linux-android/bin/as
Binary files differ
diff --git a/i686-linux-android/bin/c++ b/i686-linux-android/bin/c++
index 77d71ab..a2cdfed 100755
--- a/i686-linux-android/bin/c++
+++ b/i686-linux-android/bin/c++
Binary files differ
diff --git a/i686-linux-android/bin/g++ b/i686-linux-android/bin/g++
index 3de5d9c..d2c4aa2 100755
--- a/i686-linux-android/bin/g++
+++ b/i686-linux-android/bin/g++
Binary files differ
diff --git a/i686-linux-android/bin/gcc b/i686-linux-android/bin/gcc
index 5ea3eca..2aaa371 100755
--- a/i686-linux-android/bin/gcc
+++ b/i686-linux-android/bin/gcc
Binary files differ
diff --git a/i686-linux-android/bin/ld b/i686-linux-android/bin/ld
index 9f33a73..c3042d7 100755
--- a/i686-linux-android/bin/ld
+++ b/i686-linux-android/bin/ld
Binary files differ
diff --git a/i686-linux-android/bin/ld.bfd b/i686-linux-android/bin/ld.bfd
index a01fbe8..f1f9c1f 100755
--- a/i686-linux-android/bin/ld.bfd
+++ b/i686-linux-android/bin/ld.bfd
Binary files differ
diff --git a/i686-linux-android/bin/ld.gold b/i686-linux-android/bin/ld.gold
index 9f33a73..c3042d7 100755
--- a/i686-linux-android/bin/ld.gold
+++ b/i686-linux-android/bin/ld.gold
Binary files differ
diff --git a/i686-linux-android/bin/nm b/i686-linux-android/bin/nm
index cf372f8..3a56c51 100755
--- a/i686-linux-android/bin/nm
+++ b/i686-linux-android/bin/nm
Binary files differ
diff --git a/i686-linux-android/bin/objcopy b/i686-linux-android/bin/objcopy
index 4e7def2..6be5675 100755
--- a/i686-linux-android/bin/objcopy
+++ b/i686-linux-android/bin/objcopy
Binary files differ
diff --git a/i686-linux-android/bin/objdump b/i686-linux-android/bin/objdump
index 9cb2d32..a85dc6c 100755
--- a/i686-linux-android/bin/objdump
+++ b/i686-linux-android/bin/objdump
Binary files differ
diff --git a/i686-linux-android/bin/ranlib b/i686-linux-android/bin/ranlib
index 922486c..3a5ce4a 100755
--- a/i686-linux-android/bin/ranlib
+++ b/i686-linux-android/bin/ranlib
Binary files differ
diff --git a/i686-linux-android/bin/strip b/i686-linux-android/bin/strip
index 0d799b9..70af9cc 100755
--- a/i686-linux-android/bin/strip
+++ b/i686-linux-android/bin/strip
Binary files differ
diff --git a/i686-linux-android/lib/libgomp.a b/i686-linux-android/lib/libgomp.a
new file mode 100644
index 0000000..b43fe2c
--- /dev/null
+++ b/i686-linux-android/lib/libgomp.a
Binary files differ
diff --git a/i686-linux-android/lib/libgomp.spec b/i686-linux-android/lib/libgomp.spec
new file mode 100644
index 0000000..ec773a8
--- /dev/null
+++ b/i686-linux-android/lib/libgomp.spec
@@ -0,0 +1,3 @@
+# This spec file is read by gcc when linking.  It is used to specify the
+# standard libraries we need in order to link with -fopenmp.
+*link_gomp: -lgomp 
diff --git a/include/bfd.h b/include/bfd.h
index 1c5f96d..193cb92 100644
--- a/include/bfd.h
+++ b/include/bfd.h
@@ -80,7 +80,7 @@
 #define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
 
 
-#define BFD_SUPPORTS_PLUGINS 0
+#define BFD_SUPPORTS_PLUGINS 1
 
 /* The word size used by BFD on the host.  This may be 64 with a 32
    bit target if the host is 64 bit, or if other 64 bit targets have
diff --git a/include/plugin-api.h b/include/plugin-api.h
new file mode 100644
index 0000000..3220142
--- /dev/null
+++ b/include/plugin-api.h
@@ -0,0 +1,401 @@
+/* plugin-api.h -- External linker plugin API.  */
+
+/* Copyright 2009, 2010 Free Software Foundation, Inc.
+   Written by Cary Coutant <ccoutant@google.com>.
+
+   This file is part of binutils.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
+
+/* This file defines the interface for writing a linker plugin, which is
+   described at < http://gcc.gnu.org/wiki/whopr/driver >.  */
+
+#ifndef PLUGIN_API_H
+#define PLUGIN_API_H
+
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#elif defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
+#endif
+#include <sys/types.h>
+#if !defined(HAVE_STDINT_H) && !defined(HAVE_INTTYPES_H) && \
+    !defined(UINT64_MAX) && !defined(uint64_t)
+#error can not find uint64_t type
+#endif
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/* Status code returned by most API routines.  */
+
+enum ld_plugin_status
+{
+  LDPS_OK = 0,
+  LDPS_NO_SYMS,         /* Attempt to get symbols that haven't been added. */
+  LDPS_BAD_HANDLE,      /* No claimed object associated with given handle. */
+  LDPS_ERR
+  /* Additional Error codes TBD.  */
+};
+
+/* The version of the API specification.  */
+
+enum ld_plugin_api_version
+{
+  LD_PLUGIN_API_VERSION = 1
+};
+
+/* The type of output file being generated by the linker.  */
+
+enum ld_plugin_output_file_type
+{
+  LDPO_REL,
+  LDPO_EXEC,
+  LDPO_DYN,
+  LDPO_PIE
+};
+
+/* An input file managed by the plugin library.  */
+
+struct ld_plugin_input_file
+{
+  const char *name;
+  int fd;
+  off_t offset;
+  off_t filesize;
+  void *handle;
+};
+
+/* A symbol belonging to an input file managed by the plugin library.  */
+
+struct ld_plugin_symbol
+{
+  char *name;
+  char *version;
+  int def;
+  int visibility;
+  uint64_t size;
+  char *comdat_key;
+  int resolution;
+};
+
+/* An object's section.  */
+
+struct ld_plugin_section
+{
+  const void* handle;
+  unsigned int shndx;
+};
+
+/* Whether the symbol is a definition, reference, or common, weak or not.  */
+
+enum ld_plugin_symbol_kind
+{
+  LDPK_DEF,
+  LDPK_WEAKDEF,
+  LDPK_UNDEF,
+  LDPK_WEAKUNDEF,
+  LDPK_COMMON
+};
+
+/* The visibility of the symbol.  */
+
+enum ld_plugin_symbol_visibility
+{
+  LDPV_DEFAULT,
+  LDPV_PROTECTED,
+  LDPV_INTERNAL,
+  LDPV_HIDDEN
+};
+
+/* How a symbol is resolved.  */
+
+enum ld_plugin_symbol_resolution
+{
+  LDPR_UNKNOWN = 0,
+
+  /* Symbol is still undefined at this point.  */
+  LDPR_UNDEF,
+
+  /* This is the prevailing definition of the symbol, with references from
+     regular object code.  */
+  LDPR_PREVAILING_DEF,
+
+  /* This is the prevailing definition of the symbol, with no
+     references from regular objects.  It is only referenced from IR
+     code.  */
+  LDPR_PREVAILING_DEF_IRONLY,
+
+  /* This definition was pre-empted by a definition in a regular
+     object file.  */
+  LDPR_PREEMPTED_REG,
+
+  /* This definition was pre-empted by a definition in another IR file.  */
+  LDPR_PREEMPTED_IR,
+
+  /* This symbol was resolved by a definition in another IR file.  */
+  LDPR_RESOLVED_IR,
+
+  /* This symbol was resolved by a definition in a regular object
+     linked into the main executable.  */
+  LDPR_RESOLVED_EXEC,
+
+  /* This symbol was resolved by a definition in a shared object.  */
+  LDPR_RESOLVED_DYN,
+
+  /* This is the prevailing definition of the symbol, with no
+     references from regular objects.  It is only referenced from IR
+     code, but the symbol is exported and may be referenced from
+     a dynamic object (not seen at link time).  */
+  LDPR_PREVAILING_DEF_IRONLY_EXP
+};
+
+/* The plugin library's "claim file" handler.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_claim_file_handler) (
+  const struct ld_plugin_input_file *file, int *claimed);
+
+/* The plugin library's "all symbols read" handler.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_all_symbols_read_handler) (void);
+
+/* The plugin library's cleanup handler.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_cleanup_handler) (void);
+
+/* The linker's interface for registering the "claim file" handler.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_register_claim_file) (ld_plugin_claim_file_handler handler);
+
+/* The linker's interface for registering the "all symbols read" handler.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_register_all_symbols_read) (
+  ld_plugin_all_symbols_read_handler handler);
+
+/* The linker's interface for registering the cleanup handler.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_register_cleanup) (ld_plugin_cleanup_handler handler);
+
+/* The linker's interface for adding symbols from a claimed input file.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_add_symbols) (void *handle, int nsyms,
+                          const struct ld_plugin_symbol *syms);
+
+/* The linker's interface for getting the input file information with
+   an open (possibly re-opened) file descriptor.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_get_input_file) (const void *handle,
+                             struct ld_plugin_input_file *file);
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_get_view) (const void *handle, const void **viewp);
+
+/* The linker's interface for releasing the input file.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_release_input_file) (const void *handle);
+
+/* The linker's interface for retrieving symbol resolution information.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_get_symbols) (const void *handle, int nsyms,
+                          struct ld_plugin_symbol *syms);
+
+/* The linker's interface for adding a compiled input file.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_add_input_file) (const char *pathname);
+
+/* The linker's interface for adding a library that should be searched.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_add_input_library) (const char *libname);
+
+/* The linker's interface for adding a library path that should be searched.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_set_extra_library_path) (const char *path);
+
+/* The linker's interface for issuing a warning or error message.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_message) (int level, const char *format, ...);
+
+/* The linker's interface for retrieving the number of sections in an object.
+   The handle is obtained in the claim_file handler.  This interface should
+   only be invoked in the claim_file handler.   This function sets *COUNT to
+   the number of sections in the object.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_get_input_section_count) (const void* handle, unsigned int *count);
+
+/* The linker's interface for retrieving the section type of a specific
+   section in an object.  This interface should only be invoked in the
+   claim_file handler.  This function sets *TYPE to an ELF SHT_xxx value.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_get_input_section_type) (const struct ld_plugin_section section,
+                                     unsigned int *type);
+
+/* The linker's interface for retrieving the name of a specific section in
+   an object. This interface should only be invoked in the claim_file handler.
+   This function sets *SECTION_NAME_PTR to a null-terminated buffer allocated
+   by malloc.  The plugin must free *SECTION_NAME_PTR.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_get_input_section_name) (const struct ld_plugin_section section,
+                                     char **section_name_ptr);
+
+/* The linker's interface for retrieving the contents of a specific section
+   in an object.  This interface should only be invoked in the claim_file
+   handler.  This function sets *SECTION_CONTENTS to point to a buffer that is
+   valid until clam_file handler returns.  It sets *LEN to the size of the
+   buffer.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_get_input_section_contents) (const struct ld_plugin_section section,
+                                         const unsigned char **section_contents,
+                                         size_t* len);
+
+/* The linker's interface for specifying the desired order of sections.
+   The sections should be specifed using the array SECTION_LIST in the
+   order in which they should appear in the final layout.  NUM_SECTIONS
+   specifies the number of entries in each array.  This should be invoked
+   in the all_symbols_read handler.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_update_section_order) (const struct ld_plugin_section *section_list,
+				   unsigned int num_sections);
+
+/* The linker's interface for specifying that reordering of sections is
+   desired so that the linker can prepare for it.  This should be invoked
+   before update_section_order, preferably in the claim_file handler.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_allow_section_ordering) (void);
+
+enum ld_plugin_level
+{
+  LDPL_INFO,
+  LDPL_WARNING,
+  LDPL_ERROR,
+  LDPL_FATAL
+};
+
+/* Values for the tv_tag field of the transfer vector.  */
+
+enum ld_plugin_tag
+{
+  LDPT_NULL = 0,
+  LDPT_API_VERSION,
+  LDPT_GOLD_VERSION,
+  LDPT_LINKER_OUTPUT,
+  LDPT_OPTION,
+  LDPT_REGISTER_CLAIM_FILE_HOOK,
+  LDPT_REGISTER_ALL_SYMBOLS_READ_HOOK,
+  LDPT_REGISTER_CLEANUP_HOOK,
+  LDPT_ADD_SYMBOLS,
+  LDPT_GET_SYMBOLS,
+  LDPT_ADD_INPUT_FILE,
+  LDPT_MESSAGE,
+  LDPT_GET_INPUT_FILE,
+  LDPT_RELEASE_INPUT_FILE,
+  LDPT_ADD_INPUT_LIBRARY,
+  LDPT_OUTPUT_NAME,
+  LDPT_SET_EXTRA_LIBRARY_PATH,
+  LDPT_GNU_LD_VERSION,
+  LDPT_GET_VIEW,
+  LDPT_GET_INPUT_SECTION_COUNT,
+  LDPT_GET_INPUT_SECTION_TYPE,
+  LDPT_GET_INPUT_SECTION_NAME,
+  LDPT_GET_INPUT_SECTION_CONTENTS,
+  LDPT_UPDATE_SECTION_ORDER,
+  LDPT_ALLOW_SECTION_ORDERING,
+  LDPT_GET_SYMBOLS_V2
+};
+
+/* The plugin transfer vector.  */
+
+struct ld_plugin_tv
+{
+  enum ld_plugin_tag tv_tag;
+  union
+  {
+    int tv_val;
+    const char *tv_string;
+    ld_plugin_register_claim_file tv_register_claim_file;
+    ld_plugin_register_all_symbols_read tv_register_all_symbols_read;
+    ld_plugin_register_cleanup tv_register_cleanup;
+    ld_plugin_add_symbols tv_add_symbols;
+    ld_plugin_get_symbols tv_get_symbols;
+    ld_plugin_add_input_file tv_add_input_file;
+    ld_plugin_message tv_message;
+    ld_plugin_get_input_file tv_get_input_file;
+    ld_plugin_get_view tv_get_view;
+    ld_plugin_release_input_file tv_release_input_file;
+    ld_plugin_add_input_library tv_add_input_library;
+    ld_plugin_set_extra_library_path tv_set_extra_library_path;
+    ld_plugin_get_input_section_count tv_get_input_section_count;
+    ld_plugin_get_input_section_type tv_get_input_section_type;
+    ld_plugin_get_input_section_name tv_get_input_section_name;
+    ld_plugin_get_input_section_contents tv_get_input_section_contents;
+    ld_plugin_update_section_order tv_update_section_order;
+    ld_plugin_allow_section_ordering tv_allow_section_ordering;
+  } tv_u;
+};
+
+/* The plugin library's "onload" entry point.  */
+
+typedef
+enum ld_plugin_status
+(*ld_plugin_onload) (struct ld_plugin_tv *tv);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined(PLUGIN_API_H) */
diff --git a/lib/gcc/i686-linux-android/4.7/include-fixed/stdio.h b/lib/gcc/i686-linux-android/4.7/include-fixed/stdio.h
index 3656425..6de467d 100644
--- a/lib/gcc/i686-linux-android/4.7/include-fixed/stdio.h
+++ b/lib/gcc/i686-linux-android/4.7/include-fixed/stdio.h
@@ -48,7 +48,7 @@
 #define	_STDIO_H_
 
 #include <sys/cdefs.h>
-#include <sys/_types.h>
+#include <sys/types.h>
 
 /* __gnuc_va_list and size_t must be defined by stdio.h according to Posix */
 #define __need___va_list
@@ -58,30 +58,9 @@
 #define __need_size_t
 #include <stddef.h>
 
+#define __need_NULL
 #include <stddef.h>
 
-#if __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE
-#include <sys/types.h>	/* XXX should be removed */
-#endif
-
-#ifndef	_SIZE_T_DEFINED_
-#define	_SIZE_T_DEFINED_
-typedef	unsigned long    size_t;
-#endif
-
-#ifndef	_OFF_T_DEFINED_
-#define	_OFF_T_DEFINED_
-typedef	long    off_t;
-#endif
-
-#ifndef NULL
-#ifdef 	__GNUG__
-#define	NULL	__null
-#else
-#define	NULL	0L
-#endif
-#endif
-
 #define	_FSTDIO			/* Define for new stdio with functions. */
 
 typedef off_t fpos_t;		/* stdio file position type */
diff --git a/lib/gcc/i686-linux-android/4.7/include-fixed/sys/types.h b/lib/gcc/i686-linux-android/4.7/include-fixed/sys/types.h
deleted file mode 100644
index e36e0d8..0000000
--- a/lib/gcc/i686-linux-android/4.7/include-fixed/sys/types.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*  DO NOT EDIT THIS FILE.
-
-    It has been auto-edited by fixincludes from:
-
-	"/tmp/ndk-User/build/toolchain/prefix/sysroot/usr/include/sys/types.h"
-
-    This had to be done to correct non-standard usages in the
-    original, manufacturer supplied header file.  */
-
-/*
- * Copyright (C) 2008 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *  * Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *  * Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef _SYS_TYPES_H_
-#define _SYS_TYPES_H_
-
-#define __need_size_t
-#define __need_ptrdiff_t
-#include <stddef.h>
-#include <stdint.h>
-#include <sys/cdefs.h>
-
-#include <linux/posix_types.h>
-#include <asm/types.h>
-#include <linux/types.h>
-#include <machine/kernel.h>
-
-typedef __u32    __kernel_dev_t;
-
-/* be careful with __kernel_gid_t and __kernel_uid_t
- * these are defined as 16-bit for legacy reason, but
- * the kernel uses 32-bits instead.
- *
- * 32-bit valuea are required for Android, so use
- * __kernel_uid32_t and __kernel_gid32_t
- */
-
-typedef __kernel_blkcnt_t    blkcnt_t;
-typedef __kernel_blksize_t   blksize_t;
-typedef __kernel_clock_t     clock_t;
-typedef __kernel_clockid_t   clockid_t;
-typedef __kernel_dev_t       dev_t;
-typedef __kernel_fsblkcnt_t  fsblkcnt_t;
-typedef __kernel_fsfilcnt_t  fsfilcnt_t;
-typedef __kernel_gid32_t     gid_t;
-typedef __kernel_id_t        id_t;
-typedef __kernel_ino_t       ino_t;
-typedef __kernel_key_t       key_t;
-typedef __kernel_mode_t      mode_t;
-typedef __kernel_nlink_t	 nlink_t;
-#ifndef _OFF_T_DEFINED_
-#define _OFF_T_DEFINED_
-typedef __kernel_off_t       off_t;
-#endif
-typedef __kernel_loff_t      loff_t;
-typedef loff_t               off64_t;  /* GLibc-specific */
-
-typedef __kernel_pid_t		 pid_t;
-
-/* while POSIX wants these in <sys/types.h>, we
- * declare then in <pthread.h> instead */
-#if 0
-typedef  .... pthread_attr_t;
-typedef  .... pthread_cond_t;
-typedef  .... pthread_condattr_t;
-typedef  .... pthread_key_t;
-typedef  .... pthread_mutex_t;
-typedef  .... pthread_once_t;
-typedef  .... pthread_rwlock_t;
-typedef  .... pthread_rwlock_attr_t;
-typedef  .... pthread_t;
-#endif
-
-#ifndef _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED_
-#if !defined(_GCC_SIZE_T)
-#define _GCC_SIZE_T
-typedef __SIZE_TYPE__ size_t;
-#endif
-
-#endif
-
-/* size_t is defined by the GCC-specific <stddef.h> */
-#ifndef _SSIZE_T_DEFINED_
-#define _SSIZE_T_DEFINED_
-typedef long int  ssize_t;
-#endif
-
-typedef __kernel_suseconds_t  suseconds_t;
-typedef __kernel_time_t       time_t;
-typedef __kernel_uid32_t        uid_t;
-typedef signed long           useconds_t;
-
-typedef __kernel_daddr_t	daddr_t;
-typedef __kernel_timer_t	timer_t;
-typedef __kernel_mqd_t		mqd_t;
-
-typedef __kernel_caddr_t    caddr_t;
-typedef unsigned int        uint_t;
-typedef unsigned int        uint;
-
-/* for some applications */
-#include <sys/sysmacros.h>
-
-#ifdef __BSD_VISIBLE
-typedef	unsigned char	u_char;
-typedef	unsigned short	u_short;
-typedef	unsigned int	u_int;
-typedef	unsigned long	u_long;
-
-typedef uint32_t       u_int32_t;
-typedef uint16_t       u_int16_t;
-typedef uint8_t        u_int8_t;
-typedef uint64_t       u_int64_t;
-#endif
-
-#endif
diff --git a/lib/gcc/i686-linux-android/4.7/include/omp.h b/lib/gcc/i686-linux-android/4.7/include/omp.h
new file mode 100644
index 0000000..f0bb026
--- /dev/null
+++ b/lib/gcc/i686-linux-android/4.7/include/omp.h
@@ -0,0 +1,107 @@
+/* Copyright (C) 2005, 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
+   Contributed by Richard Henderson <rth@redhat.com>.
+
+   This file is part of the GNU OpenMP Library (libgomp).
+
+   Libgomp is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
+   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+   FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+   more details.
+
+   Under Section 7 of GPL version 3, you are granted additional
+   permissions described in the GCC Runtime Library Exception, version
+   3.1, as published by the Free Software Foundation.
+
+   You should have received a copy of the GNU General Public License and
+   a copy of the GCC Runtime Library Exception along with this program;
+   see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef OMP_H
+#define OMP_H 1
+
+#ifndef _LIBGOMP_OMP_LOCK_DEFINED
+#define _LIBGOMP_OMP_LOCK_DEFINED 1
+/* These two structures get edited by the libgomp build process to 
+   reflect the shape of the two types.  Their internals are private
+   to the library.  */
+
+typedef struct
+{
+  unsigned char _x[4] 
+    __attribute__((__aligned__(4)));
+} omp_lock_t;
+
+typedef struct
+{
+  unsigned char _x[12] 
+    __attribute__((__aligned__(4)));
+} omp_nest_lock_t;
+#endif
+
+typedef enum omp_sched_t
+{
+  omp_sched_static = 1,
+  omp_sched_dynamic = 2,
+  omp_sched_guided = 3,
+  omp_sched_auto = 4
+} omp_sched_t;
+
+#ifdef __cplusplus
+extern "C" {
+# define __GOMP_NOTHROW throw ()
+#else
+# define __GOMP_NOTHROW __attribute__((__nothrow__))
+#endif
+
+extern void omp_set_num_threads (int) __GOMP_NOTHROW;
+extern int omp_get_num_threads (void) __GOMP_NOTHROW;
+extern int omp_get_max_threads (void) __GOMP_NOTHROW;
+extern int omp_get_thread_num (void) __GOMP_NOTHROW;
+extern int omp_get_num_procs (void) __GOMP_NOTHROW;
+
+extern int omp_in_parallel (void) __GOMP_NOTHROW;
+
+extern void omp_set_dynamic (int) __GOMP_NOTHROW;
+extern int omp_get_dynamic (void) __GOMP_NOTHROW;
+
+extern void omp_set_nested (int) __GOMP_NOTHROW;
+extern int omp_get_nested (void) __GOMP_NOTHROW;
+
+extern void omp_init_lock (omp_lock_t *) __GOMP_NOTHROW;
+extern void omp_destroy_lock (omp_lock_t *) __GOMP_NOTHROW;
+extern void omp_set_lock (omp_lock_t *) __GOMP_NOTHROW;
+extern void omp_unset_lock (omp_lock_t *) __GOMP_NOTHROW;
+extern int omp_test_lock (omp_lock_t *) __GOMP_NOTHROW;
+
+extern void omp_init_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
+extern void omp_destroy_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
+extern void omp_set_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
+extern void omp_unset_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
+extern int omp_test_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW;
+
+extern double omp_get_wtime (void) __GOMP_NOTHROW;
+extern double omp_get_wtick (void) __GOMP_NOTHROW;
+
+void omp_set_schedule (omp_sched_t, int) __GOMP_NOTHROW;
+void omp_get_schedule (omp_sched_t *, int *) __GOMP_NOTHROW;
+int omp_get_thread_limit (void) __GOMP_NOTHROW;
+void omp_set_max_active_levels (int) __GOMP_NOTHROW;
+int omp_get_max_active_levels (void) __GOMP_NOTHROW;
+int omp_get_level (void) __GOMP_NOTHROW;
+int omp_get_ancestor_thread_num (int) __GOMP_NOTHROW;
+int omp_get_team_size (int) __GOMP_NOTHROW;
+int omp_get_active_level (void) __GOMP_NOTHROW;
+
+int omp_in_final (void) __GOMP_NOTHROW;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* OMP_H */
diff --git a/lib/gcc/i686-linux-android/4.7/libgcc.a b/lib/gcc/i686-linux-android/4.7/libgcc.a
index bbd5446..8cb6640 100644
--- a/lib/gcc/i686-linux-android/4.7/libgcc.a
+++ b/lib/gcc/i686-linux-android/4.7/libgcc.a
Binary files differ
diff --git a/lib/gcc/i686-linux-android/4.7/libgcov.a b/lib/gcc/i686-linux-android/4.7/libgcov.a
index f71004e..b0eb493 100644
--- a/lib/gcc/i686-linux-android/4.7/libgcov.a
+++ b/lib/gcc/i686-linux-android/4.7/libgcov.a
Binary files differ
diff --git a/lib/x86_64/libiberty.a b/lib/x86_64/libiberty.a
index 8272d86..e2337e0 100644
--- a/lib/x86_64/libiberty.a
+++ b/lib/x86_64/libiberty.a
Binary files differ
diff --git a/lib32/libbfd.a b/lib32/libbfd.a
index 4616fb1..8fcd465 100644
--- a/lib32/libbfd.a
+++ b/lib32/libbfd.a
Binary files differ
diff --git a/lib32/libbfd.la b/lib32/libbfd.la
deleted file mode 100755
index 0d4b504..0000000
--- a/lib32/libbfd.la
+++ /dev/null
@@ -1,41 +0,0 @@
-# libbfd.la - a libtool library file
-# Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname=''
-
-# Names of this library.
-library_names=''
-
-# The name of the static archive.
-old_library='libbfd.a'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags=' '
-
-# Libraries that this one depends upon.
-dependency_libs=' -lz'
-
-# Names of additional weak libraries provided by this library
-weak_library_names=''
-
-# Version information for libbfd.
-current=0
-age=0
-revision=0
-
-# Is this an already installed library?
-installed=yes
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=no
-
-# Files to dlopen/dlpreopen
-dlopen=''
-dlpreopen=''
-
-# Directory that this library needs to be installed in:
-libdir='/tmp/ndk-User/build/toolchain/prefix/x86_64-apple-darwin/i686-linux-android/lib'
diff --git a/lib32/libiberty.a b/lib32/libiberty.a
index f20cf57..34ad6d1 100644
--- a/lib32/libiberty.a
+++ b/lib32/libiberty.a
Binary files differ
diff --git a/lib32/libintl.a b/lib32/libintl.a
index dad3896..f42090d 100644
--- a/lib32/libintl.a
+++ b/lib32/libintl.a
Binary files differ
diff --git a/libexec/gcc/i686-linux-android/4.7/cc1 b/libexec/gcc/i686-linux-android/4.7/cc1
index e09c350..fdf9341 100755
--- a/libexec/gcc/i686-linux-android/4.7/cc1
+++ b/libexec/gcc/i686-linux-android/4.7/cc1
Binary files differ
diff --git a/libexec/gcc/i686-linux-android/4.7/cc1plus b/libexec/gcc/i686-linux-android/4.7/cc1plus
index 8d93289..2dcd50e 100755
--- a/libexec/gcc/i686-linux-android/4.7/cc1plus
+++ b/libexec/gcc/i686-linux-android/4.7/cc1plus
Binary files differ
diff --git a/libexec/gcc/i686-linux-android/4.7/collect2 b/libexec/gcc/i686-linux-android/4.7/collect2
index 91fb60c..90d3ce0 100755
--- a/libexec/gcc/i686-linux-android/4.7/collect2
+++ b/libexec/gcc/i686-linux-android/4.7/collect2
Binary files differ
diff --git a/libexec/gcc/i686-linux-android/4.7/liblto_plugin.0.so b/libexec/gcc/i686-linux-android/4.7/liblto_plugin.0.so
index 64dc55f..81df509 100755
--- a/libexec/gcc/i686-linux-android/4.7/liblto_plugin.0.so
+++ b/libexec/gcc/i686-linux-android/4.7/liblto_plugin.0.so
Binary files differ
diff --git a/libexec/gcc/i686-linux-android/4.7/liblto_plugin.la b/libexec/gcc/i686-linux-android/4.7/liblto_plugin.la
deleted file mode 100755
index 27c50ad..0000000
--- a/libexec/gcc/i686-linux-android/4.7/liblto_plugin.la
+++ /dev/null
@@ -1,41 +0,0 @@
-# liblto_plugin.la - a libtool library file
-# Generated by libtool (GNU libtool 1.3134 2009-11-29) 2.2.7a
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='liblto_plugin.0.so'
-
-# Names of this library.
-library_names='liblto_plugin.0.so liblto_plugin.so'
-
-# The name of the static archive.
-old_library=''
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags=' '
-
-# Libraries that this one depends upon.
-dependency_libs=''
-
-# Names of additional weak libraries provided by this library
-weak_library_names=''
-
-# Version information for liblto_plugin.
-current=0
-age=0
-revision=0
-
-# Is this an already installed library?
-installed=yes
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=yes
-
-# Files to dlopen/dlpreopen
-dlopen=''
-dlpreopen=''
-
-# Directory that this library needs to be installed in:
-libdir='/tmp/ndk-User/build/toolchain/prefix/libexec/gcc/i686-linux-android/4.7'
diff --git a/libexec/gcc/i686-linux-android/4.7/lto-wrapper b/libexec/gcc/i686-linux-android/4.7/lto-wrapper
index b947f11..9d855c8 100755
--- a/libexec/gcc/i686-linux-android/4.7/lto-wrapper
+++ b/libexec/gcc/i686-linux-android/4.7/lto-wrapper
Binary files differ
diff --git a/libexec/gcc/i686-linux-android/4.7/lto1 b/libexec/gcc/i686-linux-android/4.7/lto1
index e9f6268..93f22e6 100755
--- a/libexec/gcc/i686-linux-android/4.7/lto1
+++ b/libexec/gcc/i686-linux-android/4.7/lto1
Binary files differ
diff --git a/libexec/gcc/i686-linux-android/4.7/plugin/gengtype b/libexec/gcc/i686-linux-android/4.7/plugin/gengtype
new file mode 100755
index 0000000..ec181c9
--- /dev/null
+++ b/libexec/gcc/i686-linux-android/4.7/plugin/gengtype
Binary files differ