--- old/build/gcc48/patches/ld_eh_frame_hdr.patch	Tue Jun 16 09:31:03 2015
+++ /dev/null	Tue Jun 16 09:31:03 2015
@@ -1,56 +0,0 @@
---- gcc-4.7.2.orig/gcc/configure	Tue Apr  2 18:55:16 2013
-+++ gcc-4.7.2/gcc/configure	Tue Apr  2 18:56:47 2013
-@@ -22265,6 +22265,7 @@
- 	    -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'`
- 	  ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
- 	  ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
-+	  ld_vers_variant=`echo "$ld_ver" | sed -n -e 's,.*(\(illumos\)),\1,p'`
- 	fi
- 	;;
-     esac
-@@ -26315,7 +26316,8 @@
-     case "$target" in
-       *-*-solaris2*)
-         # Sun ld has various bugs in .eh_frame_hdr support before version 1.2251.
--        if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2251; then
-+        if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2251 \
-+	  || "$ld_vers_variant" = "illumos" ; then
-           gcc_cv_ld_eh_frame_hdr=yes
-         fi
-         ;;
-@@ -26322,6 +26324,7 @@
-     esac
-   fi
- fi
-+gcc_cv_ld_eh_frame_hdr=yes
- 
- if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
- 
---- gcc-4.7.2.orig/gcc/configure.ac	Tue Apr  2 18:55:21 2013
-+++ gcc-4.7.2/gcc/configure.ac	Tue Apr  2 18:57:11 2013
-@@ -2323,6 +2323,7 @@
- 	    -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'`
- 	  ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
- 	  ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
-+	  ld_vers_variant=`echo "$ld_ver" | sed -n -e 's,.*(\(illumos\)),\1,p'`
- 	fi
- 	;;
-     esac
-@@ -4263,7 +4264,8 @@
-     case "$target" in
-       *-*-solaris2*)
-         # Sun ld has various bugs in .eh_frame_hdr support before version 1.2251.
--        if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2251; then
-+        if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2251 \
-+	  || "$ld_vers_variant" = "illumos" ; then
-           gcc_cv_ld_eh_frame_hdr=yes
-         fi
-         ;;
-@@ -4270,6 +4272,7 @@
-     esac
-   fi
- fi
-+gcc_cv_ld_eh_frame_hdr=yes
- GCC_TARGET_TEMPLATE([HAVE_LD_EH_FRAME_HDR])
- if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
- 	AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1,
--- /dev/null	Tue Jun 16 09:31:03 2015
+++ new/build/gcc51/patches/ld_eh_frame_hdr.patch	Tue Jun 16 09:31:03 2015
@@ -0,0 +1,56 @@
+--- gcc-4.7.2.orig/gcc/configure	Tue Apr  2 18:55:16 2013
++++ gcc-4.7.2/gcc/configure	Tue Apr  2 18:56:47 2013
+@@ -22265,6 +22265,7 @@
+ 	    -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'`
+ 	  ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
+ 	  ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
++	  ld_vers_variant=`echo "$ld_ver" | sed -n -e 's,.*(\(illumos\)),\1,p'`
+ 	fi
+ 	;;
+     esac
+@@ -26315,7 +26316,8 @@
+     case "$target" in
+       *-*-solaris2*)
+         # Sun ld has various bugs in .eh_frame_hdr support before version 1.2251.
+-        if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2251; then
++        if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2251 \
++	  || "$ld_vers_variant" = "illumos" ; then
+           gcc_cv_ld_eh_frame_hdr=yes
+         fi
+         ;;
+@@ -26322,6 +26324,7 @@
+     esac
+   fi
+ fi
++gcc_cv_ld_eh_frame_hdr=yes
+ 
+ if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
+ 
+--- gcc-4.7.2.orig/gcc/configure.ac	Tue Apr  2 18:55:21 2013
++++ gcc-4.7.2/gcc/configure.ac	Tue Apr  2 18:57:11 2013
+@@ -2323,6 +2323,7 @@
+ 	    -e 's,^.*: 5\.[0-9][0-9]*-\([0-9]\.[0-9][0-9]*\).*$,\1,p'`
+ 	  ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
+ 	  ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
++	  ld_vers_variant=`echo "$ld_ver" | sed -n -e 's,.*(\(illumos\)),\1,p'`
+ 	fi
+ 	;;
+     esac
+@@ -4263,7 +4264,8 @@
+     case "$target" in
+       *-*-solaris2*)
+         # Sun ld has various bugs in .eh_frame_hdr support before version 1.2251.
+-        if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2251; then
++        if test "$ld_vers_major" -gt 1 || test "$ld_vers_minor" -ge 2251 \
++	  || "$ld_vers_variant" = "illumos" ; then
+           gcc_cv_ld_eh_frame_hdr=yes
+         fi
+         ;;
+@@ -4270,6 +4272,7 @@
+     esac
+   fi
+ fi
++gcc_cv_ld_eh_frame_hdr=yes
+ GCC_TARGET_TEMPLATE([HAVE_LD_EH_FRAME_HDR])
+ if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
+ 	AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1,
