      GLIBCXX_CHECK_LINKER_FEATURES
      GLIBCXX_CHECK_MATH_SUPPORT
 diff -urN gcc-old/libstdc++-v3/include/std/type_traits gcc/libstdc++-v3/include/std/type_traits
---- gcc-old/libstdc++-v3/include/std/type_traits  2015-01-08 21:54:55.000000000 +0530
-+++ gcc/libstdc++-v3/include/std/type_traits  2016-09-25 15:05:42.603159000 +0530
+--- gcc-old/libstdc++-v3/include/std/type_traits	2015-01-08 21:54:55.000000000 +0530
++++ gcc/libstdc++-v3/include/std/type_traits	2016-09-25 15:05:42.603159000 +0530
 @@ -38,7 +38,7 @@
  #include <bits/c++config.h>
  

+
+/* Files that are linked before user code.
+   The %s tells gcc to look for these files in the library directory. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "crt0.o%s crtbegin.o%s"
+
+/* Files that are linked after user code. */
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "crtend.o%s"
+
+/* Don't automatically add extern "C" { } around header files. */

   gas=yes
   gnu_ld=yes
@@ -909,6 +914,12 @@
 	done
 	TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'`
 	;;
+i[34567]86-*-atomos*)
+	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h glibc-stdint.h i386/i386elf.h atomos.h"
+	;;
+x86_64-*-atomos*)
+	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h glibc-stdint.h i386/i386elf.h i386/x86-64.h atomos.h"
+	;;
 aarch64*-*-linux*)
 	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
 	tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
diff -urN gcc-old/libgcc/config.host gcc/libgcc/config.host
--- gcc-old/libgcc/config.host	2015-10-01 17:31:18.000000000 +0530
+++ gcc/libgcc/config.host	2016-09-24 14:15:31.471812000 +0530
@@ -328,6 +328,14 @@
 	tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
 	tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
 	;;
+i[34567]86-*-atomos*)
+	extra_parts="$extra_parts crtbegin.o crtend.o"
+	tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
+	;;
+x86_64-*-atomos*)
+	extra_parts="$extra_parts crtbegin.o crtend.o"
+	tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
+	;;
 aarch64*-*-linux*)
 	extra_parts="$extra_parts crtfastmath.o"
 	md_unwind_header=aarch64/linux-unwind.h
diff -urN gcc-old/libstdc++-v3/crossconfig.m4 gcc/libstdc++-v3/crossconfig.m4
--- gcc-old/libstdc++-v3/crossconfig.m4	2014-04-22 18:00:59.000000000 +0530
+++ gcc/libstdc++-v3/crossconfig.m4	2016-09-24 17:22:40.323493000 +0530
@@ -36,6 +36,13 @@
     AM_ICONV
     ;;
