From d252dd3d2e19995b87c9928493d9a3652cc5ff82 Mon Sep 17 00:00:00 2001
From: Imre Kaloz <kaloz@openwrt.org>
Date: Sun, 12 Feb 2012 09:48:39 +0000
Subject: [PATCH] upgrade vanilla gcc to 4.6.2

SVN-Revision: 30470
---
 toolchain/gcc/Config.in                                     | 4 ++--
 toolchain/gcc/Config.version                                | 4 ++--
 toolchain/gcc/common.mk                                     | 4 ++--
 .../gcc/patches/{4.6.1 => 4.6.2}/100-uclibc-conf.patch      | 0
 .../patches/{4.6.1 => 4.6.2}/301-missing-execinfo_h.patch   | 0
 .../gcc/patches/{4.6.1 => 4.6.2}/302-c99-snprintf.patch     | 0
 .../{4.6.1 => 4.6.2}/305-libmudflap-susv3-legacy.patch      | 0
 .../gcc/patches/{4.6.1 => 4.6.2}/600-ubicom_support.patch   | 6 +++---
 .../patches/{4.6.1 => 4.6.2}/810-arm-softfloat-libgcc.patch | 0
 toolchain/gcc/patches/{4.6.1 => 4.6.2}/820-libgcc_pic.patch | 0
 .../patches/{4.6.1 => 4.6.2}/830-arm_unbreak_armv4t.patch   | 0
 .../{4.6.1 => 4.6.2}/840-armv4_pass_fix-v4bx_to_ld.patch    | 0
 toolchain/gcc/patches/{4.6.1 => 4.6.2}/910-mbsd_multi.patch | 4 ++--
 .../993-arm_insn-opinit-RTX_CODE-fixup.patch                | 0
 toolchain/gcc/patches/{4.6.1 => 4.6.2}/999-coldfire.patch   | 2 +-
 15 files changed, 12 insertions(+), 12 deletions(-)
 rename toolchain/gcc/patches/{4.6.1 => 4.6.2}/100-uclibc-conf.patch (100%)
 rename toolchain/gcc/patches/{4.6.1 => 4.6.2}/301-missing-execinfo_h.patch (100%)
 rename toolchain/gcc/patches/{4.6.1 => 4.6.2}/302-c99-snprintf.patch (100%)
 rename toolchain/gcc/patches/{4.6.1 => 4.6.2}/305-libmudflap-susv3-legacy.patch (100%)
 rename toolchain/gcc/patches/{4.6.1 => 4.6.2}/600-ubicom_support.patch (99%)
 rename toolchain/gcc/patches/{4.6.1 => 4.6.2}/810-arm-softfloat-libgcc.patch (100%)
 rename toolchain/gcc/patches/{4.6.1 => 4.6.2}/820-libgcc_pic.patch (100%)
 rename toolchain/gcc/patches/{4.6.1 => 4.6.2}/830-arm_unbreak_armv4t.patch (100%)
 rename toolchain/gcc/patches/{4.6.1 => 4.6.2}/840-armv4_pass_fix-v4bx_to_ld.patch (100%)
 rename toolchain/gcc/patches/{4.6.1 => 4.6.2}/910-mbsd_multi.patch (98%)
 rename toolchain/gcc/patches/{4.6.1 => 4.6.2}/993-arm_insn-opinit-RTX_CODE-fixup.patch (100%)
 rename toolchain/gcc/patches/{4.6.1 => 4.6.2}/999-coldfire.patch (79%)

diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index b027953c1f..f5ea89896f 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -11,8 +11,8 @@ choice
 		bool "gcc 4.4.6"
 		depends (avr32 || ubicom32)
 
-	config GCC_VERSION_4_6_1
-		bool "gcc 4.6.1"
+	config GCC_VERSION_4_6_2
+		bool "gcc 4.6.2"
 
 	config GCC_VERSION_4_5_LINARO
 		bool "gcc 4.5.x with Linaro enhancements"
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 288ffa4495..e565bc571c 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -14,7 +14,7 @@ config GCC_DEFAULT_VERSION_4_6_LINARO
 config GCC_VERSION
 	string
 	default "4.4.6"	    if GCC_VERSION_4_4_6
-	default "4.6.1"	    if GCC_VERSION_4_6_1
+	default "4.6.2"	    if GCC_VERSION_4_6_2
 	default "4.5-linaro"    if GCC_VERSION_4_5_LINARO
 	default "4.6-linaro"    if GCC_VERSION_4_6_LINARO
 	default "llvm"	    if GCC_VERSION_LLVM
@@ -30,7 +30,7 @@ config GCC_VERSION_4_5
 
 config GCC_VERSION_4_6
 	bool
-	default y       if (GCC_VERSION_4_6_1 || GCC_VERSION_4_6_LINARO)
+	default y       if (GCC_VERSION_4_6_2 || GCC_VERSION_4_6_LINARO)
 
 if !TOOLCHAINOPTS
 
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index ac33c3b867..73d63ba9a2 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -60,8 +60,8 @@ else
   ifeq ($(PKG_VERSION),4.4.6)
     PKG_MD5SUM:=ab525d429ee4425050a554bc9247d6c4
   endif
-  ifeq ($(PKG_VERSION),4.6.1)
-    PKG_MD5SUM:=c57a9170c677bf795bdc04ed796ca491
+  ifeq ($(PKG_VERSION),4.6.2)
+    PKG_MD5SUM:=028115c4fbfb6cfd75d6369f4a90d87e
   endif
 endif
 endif
diff --git a/toolchain/gcc/patches/4.6.1/100-uclibc-conf.patch b/toolchain/gcc/patches/4.6.2/100-uclibc-conf.patch
similarity index 100%
rename from toolchain/gcc/patches/4.6.1/100-uclibc-conf.patch
rename to toolchain/gcc/patches/4.6.2/100-uclibc-conf.patch
diff --git a/toolchain/gcc/patches/4.6.1/301-missing-execinfo_h.patch b/toolchain/gcc/patches/4.6.2/301-missing-execinfo_h.patch
similarity index 100%
rename from toolchain/gcc/patches/4.6.1/301-missing-execinfo_h.patch
rename to toolchain/gcc/patches/4.6.2/301-missing-execinfo_h.patch
diff --git a/toolchain/gcc/patches/4.6.1/302-c99-snprintf.patch b/toolchain/gcc/patches/4.6.2/302-c99-snprintf.patch
similarity index 100%
rename from toolchain/gcc/patches/4.6.1/302-c99-snprintf.patch
rename to toolchain/gcc/patches/4.6.2/302-c99-snprintf.patch
diff --git a/toolchain/gcc/patches/4.6.1/305-libmudflap-susv3-legacy.patch b/toolchain/gcc/patches/4.6.2/305-libmudflap-susv3-legacy.patch
similarity index 100%
rename from toolchain/gcc/patches/4.6.1/305-libmudflap-susv3-legacy.patch
rename to toolchain/gcc/patches/4.6.2/305-libmudflap-susv3-legacy.patch
diff --git a/toolchain/gcc/patches/4.6.1/600-ubicom_support.patch b/toolchain/gcc/patches/4.6.2/600-ubicom_support.patch
similarity index 99%
rename from toolchain/gcc/patches/4.6.1/600-ubicom_support.patch
rename to toolchain/gcc/patches/4.6.2/600-ubicom_support.patch
index 8268b5e922..6b6816157b 100644
--- a/toolchain/gcc/patches/4.6.1/600-ubicom_support.patch
+++ b/toolchain/gcc/patches/4.6.2/600-ubicom_support.patch
@@ -1,8 +1,8 @@
 --- a/configure
 +++ b/configure
-@@ -3608,6 +3608,9 @@ case "${target}" in
+@@ -3602,6 +3602,9 @@ case "${target}" in
    ip2k-*-*)
-     noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
+     noconfigdirs="$noconfigdirs target-libstdc++-v3 ${libgcj}"
      ;;
 +  ubicom32-*-*)
 +    noconfigdirs="$noconfigdirs target-libffi"
@@ -9313,7 +9313,7 @@
 +#define FATAL_EXIT_CODE 33
 --- a/gcc/config.gcc
 +++ b/gcc/config.gcc
-@@ -2662,6 +2662,34 @@ spu-*-elf*)
+@@ -2675,6 +2675,34 @@ spu-*-elf*)
  	c_target_objs="${c_target_objs} spu-c.o"
  	cxx_target_objs="${cxx_target_objs} spu-c.o"
  	;;
diff --git a/toolchain/gcc/patches/4.6.1/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/4.6.2/810-arm-softfloat-libgcc.patch
similarity index 100%
rename from toolchain/gcc/patches/4.6.1/810-arm-softfloat-libgcc.patch
rename to toolchain/gcc/patches/4.6.2/810-arm-softfloat-libgcc.patch
diff --git a/toolchain/gcc/patches/4.6.1/820-libgcc_pic.patch b/toolchain/gcc/patches/4.6.2/820-libgcc_pic.patch
similarity index 100%
rename from toolchain/gcc/patches/4.6.1/820-libgcc_pic.patch
rename to toolchain/gcc/patches/4.6.2/820-libgcc_pic.patch
diff --git a/toolchain/gcc/patches/4.6.1/830-arm_unbreak_armv4t.patch b/toolchain/gcc/patches/4.6.2/830-arm_unbreak_armv4t.patch
similarity index 100%
rename from toolchain/gcc/patches/4.6.1/830-arm_unbreak_armv4t.patch
rename to toolchain/gcc/patches/4.6.2/830-arm_unbreak_armv4t.patch
diff --git a/toolchain/gcc/patches/4.6.1/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/4.6.2/840-armv4_pass_fix-v4bx_to_ld.patch
similarity index 100%
rename from toolchain/gcc/patches/4.6.1/840-armv4_pass_fix-v4bx_to_ld.patch
rename to toolchain/gcc/patches/4.6.2/840-armv4_pass_fix-v4bx_to_ld.patch
diff --git a/toolchain/gcc/patches/4.6.1/910-mbsd_multi.patch b/toolchain/gcc/patches/4.6.2/910-mbsd_multi.patch
similarity index 98%
rename from toolchain/gcc/patches/4.6.1/910-mbsd_multi.patch
rename to toolchain/gcc/patches/4.6.2/910-mbsd_multi.patch
index 5a1adc971e..3623d38722 100644
--- a/toolchain/gcc/patches/4.6.1/910-mbsd_multi.patch
+++ b/toolchain/gcc/patches/4.6.2/910-mbsd_multi.patch
@@ -209,7 +209,7 @@
  -Wfatal-errors  -Wfloat-equal  -Wformat  -Wformat=2 @gol
  -Wno-format-contains-nul -Wno-format-extra-args -Wformat-nonliteral @gol
  -Wformat-security  -Wformat-y2k @gol
-@@ -4495,6 +4495,22 @@ This option is only supported for C and
+@@ -4497,6 +4497,22 @@ This option is only supported for C and
  @option{-Wall} and by @option{-pedantic}, which can be disabled with
  @option{-Wno-pointer-sign}.
  
@@ -232,7 +232,7 @@
  @item -Wstack-protector
  @opindex Wstack-protector
  @opindex Wno-stack-protector
-@@ -6317,7 +6333,7 @@ so, the first branch is redirected to ei
+@@ -6319,7 +6335,7 @@ so, the first branch is redirected to ei
  second branch or a point immediately following it, depending on whether
  the condition is known to be true or false.
  
diff --git a/toolchain/gcc/patches/4.6.1/993-arm_insn-opinit-RTX_CODE-fixup.patch b/toolchain/gcc/patches/4.6.2/993-arm_insn-opinit-RTX_CODE-fixup.patch
similarity index 100%
rename from toolchain/gcc/patches/4.6.1/993-arm_insn-opinit-RTX_CODE-fixup.patch
rename to toolchain/gcc/patches/4.6.2/993-arm_insn-opinit-RTX_CODE-fixup.patch
diff --git a/toolchain/gcc/patches/4.6.1/999-coldfire.patch b/toolchain/gcc/patches/4.6.2/999-coldfire.patch
similarity index 79%
rename from toolchain/gcc/patches/4.6.1/999-coldfire.patch
rename to toolchain/gcc/patches/4.6.2/999-coldfire.patch
index cda4237b43..6083e0bf82 100644
--- a/toolchain/gcc/patches/4.6.1/999-coldfire.patch
+++ b/toolchain/gcc/patches/4.6.2/999-coldfire.patch
@@ -1,6 +1,6 @@
 --- a/gcc/config.gcc
 +++ b/gcc/config.gcc
-@@ -1791,6 +1791,7 @@ m68k-*-linux*)		# Motorola m68k's runnin
+@@ -1804,6 +1804,7 @@ m68k-*-linux*)		# Motorola m68k's runnin
  	if test x$sjlj != x1; then
  	    tmake_file="$tmake_file m68k/t-slibgcc-elf-ver"
  	fi
-- 
GitLab