summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRoy.Li <rongqing.li@windriver.com>2013-06-14 16:37:58 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-14 12:44:34 +0100
commiteba5d155f2598fb5de2a11b9946dac53cb23503d (patch)
tree541b0d713cc07ff735754800c363e36e2b926588 /meta
parent23fd4d2a0991f862eb35531d996d27fdbc45e00b (diff)
downloadpoky-eba5d155f2598fb5de2a11b9946dac53cb23503d.tar.gz
cogl: make cogl be able to build on ARM arch
1. Fix asm() register constraints in cogl when building for ARM. 2. Fix cogl to handle Thumb builds. (From OE-Core rev: cdfea71ff1c4f80ff3a0ade1d7514cbf3c22abde) Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-graphics/cogl/cogl-1.0.inc4
-rw-r--r--meta/recipes-graphics/cogl/files/cogl-fixed-thumb.patch30
-rw-r--r--meta/recipes-graphics/cogl/files/cogl_fixed_mul-constraint.patch22
3 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-graphics/cogl/cogl-1.0.inc b/meta/recipes-graphics/cogl/cogl-1.0.inc
index a44e6c40aa..c9c6165a88 100644
--- a/meta/recipes-graphics/cogl/cogl-1.0.inc
+++ b/meta/recipes-graphics/cogl/cogl-1.0.inc
@@ -2,6 +2,10 @@ DESCRIPTION = "a modern 3D graphics API with associated utility APIs"
2HOMEPAGE = "http://wiki.clutter-project.org/wiki/Cogl" 2HOMEPAGE = "http://wiki.clutter-project.org/wiki/Cogl"
3LICENSE = "LGPLv2.1+" 3LICENSE = "LGPLv2.1+"
4 4
5SRC_URI += "file://cogl_fixed_mul-constraint.patch \
6 file://cogl-fixed-thumb.patch \
7 "
8
5inherit clutter 9inherit clutter
6 10
7DEPENDS = "pango glib-2.0 gdk-pixbuf" 11DEPENDS = "pango glib-2.0 gdk-pixbuf"
diff --git a/meta/recipes-graphics/cogl/files/cogl-fixed-thumb.patch b/meta/recipes-graphics/cogl/files/cogl-fixed-thumb.patch
new file mode 100644
index 0000000000..1825e88f1d
--- /dev/null
+++ b/meta/recipes-graphics/cogl/files/cogl-fixed-thumb.patch
@@ -0,0 +1,30 @@
1Upstream-Status: Backport
2
3There are two asm() statements in cogl-fixed.c that can't be assembled
4in Thumb mode. Add a patch to switch to the generic code in Thumb mode.
5
6Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
7---
8 cogl/cogl-fixed.c | 4 ++--
9 1 file changed, 2 insertions(+), 2 deletions(-)
10
11--- a/cogl/cogl-fixed.c
12+++ b/cogl/cogl-fixed.c
13@@ -626,7 +626,7 @@ cogl_fixed_sqrt (CoglFixed x)
14 /*
15 * Find the highest bit set
16 */
17-#if defined (__arm__) && !defined(__ARM_ARCH_4T__)
18+#if defined (__arm__) && !defined(__ARM_ARCH_4T__) && !defined(__thumb__)
19 /* This actually requires at least arm v5, but gcc does not seem
20 * to set the architecture defines correctly, and it is I think
21 * very unlikely that anyone will want to use clutter on anything
22@@ -804,7 +804,7 @@ CoglFixed
23 cogl_fixed_mul (CoglFixed a,
24 CoglFixed b)
25 {
26-#ifdef __arm__
27+#if defined(__arm__) && !defined(__thumb__)
28 /* This provides about 12% speedeup on the gcc -O2 optimised
29 * C version
30 *
diff --git a/meta/recipes-graphics/cogl/files/cogl_fixed_mul-constraint.patch b/meta/recipes-graphics/cogl/files/cogl_fixed_mul-constraint.patch
new file mode 100644
index 0000000000..179533ae80
--- /dev/null
+++ b/meta/recipes-graphics/cogl/files/cogl_fixed_mul-constraint.patch
@@ -0,0 +1,22 @@
1Upstream-Status: Backport
2
3Add register constraints to prevent asm statement complaints like:
4
5 {standard input}:382: rdhi, rdlo and rm must all be different
6
7Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
8---
9 cogl/cogl-fixed.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12--- a/cogl/cogl-fixed.c
13+++ b/cogl/cogl-fixed.c
14@@ -816,7 +816,7 @@ cogl_fixed_mul (CoglFixed a,
15 __asm__ ("smull %0, %1, %2, %3 \n"
16 "mov %0, %0, lsr %4 \n"
17 "add %1, %0, %1, lsl %5 \n"
18- : "=r"(res_hi), "=r"(res_low) \
19+ : "=&r"(res_hi), "=&r"(res_low) \
20 : "r"(a), "r"(b), "i"(COGL_FIXED_Q), "i"(32 - COGL_FIXED_Q));
21
22 return (CoglFixed) res_low;