summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Pesavento <pesa@gentoo.org>2012-06-19 22:36:05 +0000
committerDavide Pesavento <pesa@gentoo.org>2012-06-19 22:36:05 +0000
commitaadc668821c6b79a4e433ba76c20058cb2350a4d (patch)
tree1bbde5dbeb0879e0adda331be0f2ad734c9e4244 /x11-libs/qt-phonon
parentAdd patch for x32 support in qatomic asm code (bug 420705). (diff)
downloadgentoo-2-aadc668821c6b79a4e433ba76c20058cb2350a4d.tar.gz
gentoo-2-aadc668821c6b79a4e433ba76c20058cb2350a4d.tar.bz2
gentoo-2-aadc668821c6b79a4e433ba76c20058cb2350a4d.zip
Add patch for x32 support in qatomic asm code (bug 420705).
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
Diffstat (limited to 'x11-libs/qt-phonon')
-rw-r--r--x11-libs/qt-phonon/ChangeLog6
-rw-r--r--x11-libs/qt-phonon/files/4.8.2-qatomic-x32.patch50
-rw-r--r--x11-libs/qt-phonon/qt-phonon-4.8.2.ebuild6
3 files changed, 60 insertions, 2 deletions
diff --git a/x11-libs/qt-phonon/ChangeLog b/x11-libs/qt-phonon/ChangeLog
index 783fb82fff86..6d113386626e 100644
--- a/x11-libs/qt-phonon/ChangeLog
+++ b/x11-libs/qt-phonon/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for x11-libs/qt-phonon
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-phonon/ChangeLog,v 1.116 2012/06/18 23:00:38 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-phonon/ChangeLog,v 1.117 2012/06/19 22:36:05 pesa Exp $
+
+ 19 Jun 2012; Davide Pesavento <pesa@gentoo.org>
+ +files/4.8.2-qatomic-x32.patch, qt-phonon-4.8.2.ebuild:
+ Add patch for x32 support in qatomic asm code (bug 420705).
18 Jun 2012; Davide Pesavento <pesa@gentoo.org> metadata.xml:
Cleanup metadata and add upstream info.
diff --git a/x11-libs/qt-phonon/files/4.8.2-qatomic-x32.patch b/x11-libs/qt-phonon/files/4.8.2-qatomic-x32.patch
new file mode 100644
index 000000000000..5f352b1acc83
--- /dev/null
+++ b/x11-libs/qt-phonon/files/4.8.2-qatomic-x32.patch
@@ -0,0 +1,50 @@
+From 29384815fb74ddfa90007f9ffede77be45e9a0fd Mon Sep 17 00:00:00 2001
+From: Davide Pesavento <davidepesa@gmail.com>
+Date: Thu, 14 Jun 2012 00:44:43 +0200
+Subject: [PATCH] Fix qatomic inline asm for x32 ABI.
+
+Drop the 'q' suffix from x86_64 asm instructions. It's not needed,
+because the assembler can automatically determine the proper size
+based on the target, and it is in fact causing compilation failures
+on x32.
+
+Change-Id: Ie6ff3ddf352a63bc490acce97a3019ce2e48dc70
+Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
+---
+ src/corelib/arch/qatomic_x86_64.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/corelib/arch/qatomic_x86_64.h b/src/corelib/arch/qatomic_x86_64.h
+index c2627c8..dc78140 100644
+--- a/src/corelib/arch/qatomic_x86_64.h
++++ b/src/corelib/arch/qatomic_x86_64.h
+@@ -170,7 +170,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValu
+ {
+ unsigned char ret;
+ asm volatile("lock\n"
+- "cmpxchgq %3,%2\n"
++ "cmpxchg %3,%2\n"
+ "sete %1\n"
+ : "=a" (newValue), "=qm" (ret), "+m" (_q_value)
+ : "r" (newValue), "0" (expectedValue)
+@@ -181,7 +181,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValu
+ template <typename T>
+ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
+ {
+- asm volatile("xchgq %0,%1"
++ asm volatile("xchg %0,%1"
+ : "=r" (newValue), "+m" (_q_value)
+ : "0" (newValue)
+ : "memory");
+@@ -192,7 +192,7 @@ template <typename T>
+ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd)
+ {
+ asm volatile("lock\n"
+- "xaddq %0,%1"
++ "xadd %0,%1"
+ : "=r" (valueToAdd), "+m" (_q_value)
+ : "0" (valueToAdd * sizeof(T))
+ : "memory");
+--
+1.7.10
+
diff --git a/x11-libs/qt-phonon/qt-phonon-4.8.2.ebuild b/x11-libs/qt-phonon/qt-phonon-4.8.2.ebuild
index 10f34a7dd397..1b173a67dc60 100644
--- a/x11-libs/qt-phonon/qt-phonon-4.8.2.ebuild
+++ b/x11-libs/qt-phonon/qt-phonon-4.8.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-phonon/qt-phonon-4.8.2.ebuild,v 1.1 2012/05/22 15:24:08 pesa Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt-phonon/qt-phonon-4.8.2.ebuild,v 1.2 2012/06/19 22:36:05 pesa Exp $
EAPI=4
@@ -28,6 +28,10 @@ DEPEND="
"
RDEPEND="${DEPEND}"
+PATCHES=(
+ "${FILESDIR}/${PV}-qatomic-x32.patch"
+)
+
pkg_setup() {
QT4_TARGET_DIRECTORIES="
src/phonon