Hi all,

I took the liberty to create a patch that fixes the runtime error on armel.
This costs us the one arm optimization but makes the library usable on all 
supported arm systems.

As I'm not a DD I'm not able to do an NMU, so if someone could review the 
patch and act accordingly I would be very grateful :-)

Thanks
Heiko
From 403f92f4b54cbe409b84e1b219e1f5d2a617ce2b Mon Sep 17 00:00:00 2001
From: Heiko Stuebner <he...@sntech.de>
Date: Mon, 28 Jun 2010 16:36:10 +0200
Subject: [PATCH] fix armv4t build

---
 debian/changelog                                   |    6 ++
 ...0001-disable-armv5t-specific-optimization.patch |   55 ++++++++++++++++++++
 debian/rules                                       |    4 --
 3 files changed, 61 insertions(+), 4 deletions(-)
 create mode 100644 debian/patches/0001-disable-armv5t-specific-optimization.patch

diff --git a/debian/changelog b/debian/changelog
index 8fe0084..8684235 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+clutter-1.0 (1.0.8-2) unstable; urgency=low
+
+  * Fix armv4t compatiblity (Closes: #580106)
+
+ -- Some One <some...@debian.org>  Mon, 28 Jun 2010 16:33:12 +0200
+
 clutter-1.0 (1.0.8-1) unstable; urgency=low
 
   * New upstream release
diff --git a/debian/patches/0001-disable-armv5t-specific-optimization.patch b/debian/patches/0001-disable-armv5t-specific-optimization.patch
new file mode 100644
index 0000000..9b2a5e5
--- /dev/null
+++ b/debian/patches/0001-disable-armv5t-specific-optimization.patch
@@ -0,0 +1,55 @@
+From 7bed3265be9d58ee11f5860dac0ca6fbcd31f996 Mon Sep 17 00:00:00 2001
+From: Heiko Stuebner <he...@sntech.de>
+Date: Mon, 28 Jun 2010 16:23:09 +0200
+Subject: [PATCH] disable armv5t specific optimization
+
+---
+ clutter/cogl/common/cogl-fixed.c |   18 +++++++++---------
+ 1 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/clutter/cogl/common/cogl-fixed.c b/clutter/cogl/common/cogl-fixed.c
+index 13a9676..fee482c 100644
+--- a/clutter/cogl/common/cogl-fixed.c
++++ b/clutter/cogl/common/cogl-fixed.c
+@@ -626,21 +626,21 @@ cogl_fixed_sqrt (CoglFixed x)
+ 	/*
+ 	 * Find the highest bit set
+ 	 */
+-#if __arm__
++//#if __arm__
+ 	/* This actually requires at least arm v5, but gcc does not seem
+ 	 * to set the architecture defines correctly, and it is I think
+ 	 * very unlikely that anyone will want to use clutter on anything
+ 	 * less than v5.
+ 	 */
+-	int bit;
+-	__asm__ ("clz  %0, %1\n"
+-		 "rsb  %0, %0, #31\n"
+-		 :"=r"(bit)
+-		 :"r" (x));
++//	int bit;
++//	__asm__ ("clz  %0, %1\n"
++//		 "rsb  %0, %0, #31\n"
++//		 :"=r"(bit)
++//		 :"r" (x));
+ 
+ 	/* make even (2n) */
+-	bit &= 0xfffffffe;
+-#else
++//	bit &= 0xfffffffe;
++//#else
+ 	/* TODO -- add i386 branch using bshr
+ 	 *
+ 	 * NB: it's been said that the bshr instruction is poorly implemented
+@@ -656,7 +656,7 @@ cogl_fixed_sqrt (CoglFixed x)
+ 	    mask = (mask >> 1 | mask >> 2);
+ 	    bit -= 2;
+ 	}
+-#endif
++//#endif
+ 
+ 	/* now bit indicates the highest bit set; there are two scenarios
+ 	 *
+-- 
+1.7.1
+
diff --git a/debian/rules b/debian/rules
index 9a3dc64..96667ed 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,10 +9,6 @@ LDFLAGS += -Wl,-O1 -Wl,--as-needed
 DEB_COMPRESS_EXCLUDE += .c
 DEB_CONFIGURE_EXTRA_FLAGS += --enable-gtk-doc --enable-introspection=yes
 
-CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
-ifeq ($(CPU),arm)
-CFLAGS += -march=armv5t
-endif
 
 $(patsubst %,binary-predeb/%,$(DEB_ALL_PACKAGES)) ::
 	dh_girepository -p$(cdbs_curpkg)
-- 
1.7.1

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to