diff options
3 files changed, 58 insertions, 3 deletions
diff --git a/dev-libs/DirectFB/ChangeLog b/dev-libs/DirectFB/ChangeLog index 742994bbf8ad..6cd8d2155120 100644 --- a/dev-libs/DirectFB/ChangeLog +++ b/dev-libs/DirectFB/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-libs/DirectFB # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/DirectFB/ChangeLog,v 1.131 2013/02/09 16:10:36 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/DirectFB/ChangeLog,v 1.132 2013/03/19 20:13:40 vapier Exp $ + + 19 Mar 2013; Mike Frysinger <vapier@gentoo.org> +files/DirectFB-1.6.3-atomic-f + ix-compiler-error-when-building-for-thumb2.patch, DirectFB-1.6.3-r1.ebuild: + Add fix from ChromiumOS for building on arm targets. *DirectFB-1.6.3-r1 (09 Feb 2013) diff --git a/dev-libs/DirectFB/DirectFB-1.6.3-r1.ebuild b/dev-libs/DirectFB/DirectFB-1.6.3-r1.ebuild index 0798f734089b..7a609ea305e7 100644 --- a/dev-libs/DirectFB/DirectFB-1.6.3-r1.ebuild +++ b/dev-libs/DirectFB/DirectFB-1.6.3-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/DirectFB/DirectFB-1.6.3-r1.ebuild,v 1.1 2013/02/09 16:10:36 hasufell Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/DirectFB/DirectFB-1.6.3-r1.ebuild,v 1.2 2013/03/19 20:13:40 vapier Exp $ EAPI=5 inherit autotools eutils toolchain-funcs @@ -60,7 +60,8 @@ src_prepare() { "${FILESDIR}"/${P}-flags.patch \ "${FILESDIR}"/${P}-pkgconfig.patch \ "${FILESDIR}"/${P}-build.patch \ - "${FILESDIR}"/${P}-setregion.patch + "${FILESDIR}"/${P}-setregion.patch \ + "${FILESDIR}"/${P}-atomic-fix-compiler-error-when-building-for-thumb2.patch mv configure.{in,ac} || die eautoreconf diff --git a/dev-libs/DirectFB/files/DirectFB-1.6.3-atomic-fix-compiler-error-when-building-for-thumb2.patch b/dev-libs/DirectFB/files/DirectFB-1.6.3-atomic-fix-compiler-error-when-building-for-thumb2.patch new file mode 100644 index 000000000000..06f56fed39d7 --- /dev/null +++ b/dev-libs/DirectFB/files/DirectFB-1.6.3-atomic-fix-compiler-error-when-building-for-thumb2.patch @@ -0,0 +1,50 @@ +From 253e1d0d10bdece158f8f68dc48c19ab57d2da29 Mon Sep 17 00:00:00 2001 +From: Mandeep Singh Baines <msb@chromium.org> +Date: Mon, 18 Mar 2013 19:03:36 -0700 +Subject: [PATCH] atomic: fix compiler error when building for thumb2 + +Fixed the following error: + +{standard input}: Assembler messages: +{standard input}:179: Error: thumb conditional instruction should be in IT block +-- `strexeq r4,r1,[r2]' +{standard input}:283: Error: thumb conditional instruction should be in IT block +-- `strexeq r1,r4,[r2]' +{standard input}:379: Error: thumb conditional instruction should be in IT block +-- `strexeq r1,r2,[r0]' +make[4]: *** [fifo.lo] Error 1 + +Fix was to add the appropriate it block. + +While I was at it, I optimized the code a bit by: + +1) Moved the mov instruction above the ldrex to minimize the number +of instructions between the ldex and strex as recommeded here: +http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABFFBJB.html +2) Saved 4 bytes by replacing mov with movs and teq with cmp. + +Signed-off-by: Mandeep Singh Baines <msb@chromium.org> +--- + lib/direct/atomic.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/lib/direct/atomic.h b/lib/direct/atomic.h +index 94cb0c9..8dc0dfb 100644 +--- a/lib/direct/atomic.h ++++ b/lib/direct/atomic.h +@@ -191,9 +191,10 @@ static inline int _D__atomic_cmpxchg(volatile int *ptr, int old, int _new) + + do { + __asm__ __volatile__("@ atomic_cmpxchg\n" ++ "movs %0, #0\n" + "ldrex %1, [%2]\n" +- "mov %0, #0\n" +- "teq %1, %3\n" ++ "cmp %1, %3\n" ++ "it eq\n" + "strexeq %0, %4, [%2]\n" + : "=&r" (res), "=&r" (oldval) + : "r" (ptr), "Ir" (old), "r" (_new) +-- +1.7.12.4 + |