Patchwork [v2] gcc-4.5: added thumb2 build patch

login
register
mail settings
Submitter Enrico Scholz
Date Feb. 7, 2011, 5:25 p.m.
Message ID <1297099538-25968-1-git-send-email-enrico.scholz@sigma-chemnitz.de>
Download mbox | patch
Permalink /patch/483/
State Accepted
Delegated to: Khem Raj
Headers show

Comments

Enrico Scholz - Feb. 7, 2011, 5:25 p.m.
Fix for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43999 and is
required to build gcc for Thumb2 only architectures (e.g. Cortex-M3).

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
---
 recipes/gcc/gcc-4.5.inc                |    3 ++-
 recipes/gcc/gcc-4.5/thumb2-build.patch |   16 ++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletions(-)
 create mode 100644 recipes/gcc/gcc-4.5/thumb2-build.patch

Patch

diff --git a/recipes/gcc/gcc-4.5.inc b/recipes/gcc/gcc-4.5.inc
index b630528..9ba2e22 100644
--- a/recipes/gcc/gcc-4.5.inc
+++ b/recipes/gcc/gcc-4.5.inc
@@ -8,7 +8,7 @@  DEPENDS = "mpfr gmp libmpc libelf"
 NATIVEDEPS = "mpfr-native gmp-native libmpc-native"
 
 
-INC_PR = "r31"
+INC_PR = "r32"
 
 SRCREV = "168622"
 PV = "4.5"
@@ -166,6 +166,7 @@  SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH} \
 #	   file://linaro/gcc-4.5-linaro-r99457.patch \
 	   file://gcc-scalar-widening-pr45847.patch \
 	   file://gcc-arm-volatile-bitfield-fix.patch \
+	   file://thumb2-build.patch \
 	  "
 
 SRC_URI_append_mips64 = " file://mips64-nomultilib.patch "
diff --git a/recipes/gcc/gcc-4.5/thumb2-build.patch b/recipes/gcc/gcc-4.5/thumb2-build.patch
new file mode 100644
index 0000000..75e765e
--- /dev/null
+++ b/recipes/gcc/gcc-4.5/thumb2-build.patch
@@ -0,0 +1,16 @@ 
+Fix for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43999
+
+Patch was taken from comment #3 (Jing Yu) there; the patch attached
+to the named bugreport is wrong.
+
+Index: gcc/config/arm/lib1funcs.asm
+===================================================================
+--- a/gcc/config/arm/lib1funcs.asm	(revision 163231)
++++ b/gcc/config/arm/lib1funcs.asm	(working copy)
+@@ -642,5 +642,5 @@
+ 	cmp	\dividend, #0			@ Early termination?
+-	do_it	hs, t
++	do_it	ne, t
+ 	movnes	\curbit,   \curbit,  lsr #4	@ No, any more bits to do?
+ 	movne	\divisor,  \divisor, lsr #4
+ 	bne	1b