summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2010-04-12 01:11:17 +0300
committerModestas Vainius <modestas@vainius.eu>2010-04-12 01:11:17 +0300
commit4e041219423cdd1fdc6468265794e9358c4f4a9c (patch)
tree1856115794e41f65dc86ef47bc89d9cf9e7e79c9
parentb72e86aeff0d0fc3cebcf49e47568952492862c6 (diff)
downloadqt4-x11-4e041219423cdd1fdc6468265794e9358c4f4a9c.tar.gz
Steal patch from upstream 4.6 branch to fix s390 atomic ops related crashes.
One of them made the package to FTBFS. Upstream commit: cdf4701f442149546043b155cddcc53116875f1c.
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches/0003_s390_fix_atomic_ops_related_crashes.diff66
-rw-r--r--debian/patches/series1
3 files changed, 70 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 891bacb..8e435ea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ qt4-x11 (4:4.6.2-4~pre1) UNRELEASED; urgency=low
FTBFS on s390 caused by internal linker error which is due to bugs when
processing UString.o and some others (built with -ffunction-sections).
Implemented in the 96_webkit_no_gc_sections.diff patch.
+ * Steal patch from upstream 4.6 branch to fix s390 atomic ops related
+ crashes. One of them made the package to FTBFS. Upstream commit:
+ cdf4701f442149546043b155cddcc53116875f1c
-- Modestas Vainius <modax@debian.org> Sun, 11 Apr 2010 19:06:59 +0300
diff --git a/debian/patches/0003_s390_fix_atomic_ops_related_crashes.diff b/debian/patches/0003_s390_fix_atomic_ops_related_crashes.diff
new file mode 100644
index 0000000..4331807
--- /dev/null
+++ b/debian/patches/0003_s390_fix_atomic_ops_related_crashes.diff
@@ -0,0 +1,66 @@
+From cdf4701f442149546043b155cddcc53116875f1c Mon Sep 17 00:00:00 2001
+From: Dirk Mueller <dmueller@suse.de>
+Date: Wed, 17 Feb 2010 23:17:36 +0100
+Subject: [PATCH] Fix s390(x) atomic ops related crashes
+
+The s390 implementation of the pointer related atomic ops
+never worked before, and the memory barrier was mixed up
+between the Acquire and the Relaxed variant. This fixes
+both.
+
+Merge-request: 2312
+Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
+
+Origin: upstream, http://qt.gitorious.org/qt/qt/commit/cdf4701f442149546043b155cddcc53116875f1c
+
+---
+ src/corelib/arch/qatomic_s390.h | 16 ++++++----------
+ 1 files changed, 6 insertions(+), 10 deletions(-)
+
+diff --git a/src/corelib/arch/qatomic_s390.h b/src/corelib/arch/qatomic_s390.h
+index 21f5037..273c17b 100644
+--- a/src/corelib/arch/qatomic_s390.h
++++ b/src/corelib/arch/qatomic_s390.h
+@@ -366,11 +366,9 @@ template <typename T>
+ Q_INLINE_TEMPLATE T* QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
+ {
+ #ifndef __s390x__
+- return (T*)__CS_OLD_LOOP(reinterpret_cast<volatile long*>(_q_value), (int)newValue, "lr",
+- "", "bcr 15,0\n");
++ return (T*)__CS_OLD_LOOP(&_q_value, (int)newValue, "lr", "", "");
+ #else
+- return (T*)__CSG_OLD_LOOP(reinterpret_cast<volatile long*>(_q_value), (long)newValue, "lgr",
+- "", "bcr 15,0\n");
++ return (T*)__CSG_OLD_LOOP(&_q_value, (long)newValue, "lgr", "", "");
+ #endif
+ }
+
+@@ -378,9 +376,9 @@ template <typename T>
+ Q_INLINE_TEMPLATE T* QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
+ {
+ #ifndef __s390x__
+- return (T*)__CS_OLD_LOOP(reinterpret_cast<volatile long*>(_q_value), (int)newValue, "lr", "", "");
++ return (T*)__CS_OLD_LOOP(&_q_value, (int)newValue, "lr", "", "bcr 15,0 \n");
+ #else
+- return (T*)__CSG_OLD_LOOP(reinterpret_cast<volatile long*>(_q_value), (long)newValue, "lgr", "", "");
++ return (T*)__CSG_OLD_LOOP(&_q_value, (long)newValue, "lgr", "", "bcr 15,0 \n");
+ #endif
+ }
+
+@@ -388,11 +386,9 @@ template <typename T>
+ Q_INLINE_TEMPLATE T* QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
+ {
+ #ifndef __s390x__
+- return (T*)__CS_OLD_LOOP(reinterpret_cast<volatile long*>(_q_value), (int)newValue, "lr",
+- "bcr 15,0 \n", "");
++ return (T*)__CS_OLD_LOOP(&_q_value, (int)newValue, "lr", "bcr 15,0 \n", "");
+ #else
+- return (T*)__CSG_OLD_LOOP(reinterpret_cast<volatile long*>(_q_value), (long)newValue, "lgr",
+- "bcr 15,0\n", "");
++ return (T*)__CSG_OLD_LOOP(&_q_value, (long)newValue, "lgr", "bcr 15,0\n", "");
+ #endif
+ }
+
+--
+1.6.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 3c69cc8..19abe42 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,7 @@
# upstream patches
0001_qpixmap_load_no_modify_referenced_copies.diff
0002_qmake_qfileinfo_absolutepath.diff
+0003_s390_fix_atomic_ops_related_crashes.diff
# qt-copy patches
0180-window-role.diff