drop workaround and add upstream patch to fix crash on big endian machine

This commit is contained in:
Than Ngo 2012-05-16 14:56:56 +02:00
parent 04f02f196f
commit bacb87c899
3 changed files with 34 additions and 26 deletions

View File

@ -0,0 +1,26 @@
diff -up qt-everywhere-opensource-src-4.8.1/src/corelib/plugin/qelfparser_p.cpp.me qt-everywhere-opensource-src-4.8.1/src/corelib/plugin/qelfparser_p.cpp
--- qt-everywhere-opensource-src-4.8.1/src/corelib/plugin/qelfparser_p.cpp.me 2012-05-16 14:45:30.542709580 +0200
+++ qt-everywhere-opensource-src-4.8.1/src/corelib/plugin/qelfparser_p.cpp 2012-05-16 14:49:02.266017265 +0200
@@ -61,8 +61,8 @@ const char *QElfParser::parseSectionHead
+ sizeof(qelfaddr_t); // sh_addr
sh->offset = read<qelfoff_t>(data);
data += sizeof(qelfoff_t); // sh_offset
- sh->size = read<qelfword_t>(data);
- data += sizeof(qelfword_t); // sh_size
+ sh->size = read<qelfoff_t>(data);
+ data += sizeof(qelfoff_t); // sh_size
return data;
}
diff -up qt-everywhere-opensource-src-4.8.1/src/corelib/plugin/qelfparser_p.h.me qt-everywhere-opensource-src-4.8.1/src/corelib/plugin/qelfparser_p.h
--- qt-everywhere-opensource-src-4.8.1/src/corelib/plugin/qelfparser_p.h.me 2012-05-16 14:45:41.006724793 +0200
+++ qt-everywhere-opensource-src-4.8.1/src/corelib/plugin/qelfparser_p.h 2012-05-16 14:47:49.017910811 +0200
@@ -80,7 +80,7 @@ public:
qelfword_t name;
qelfword_t type;
qelfoff_t offset;
- qelfword_t size;
+ qelfoff_t size;
};
int m_endian;

View File

@ -1,21 +0,0 @@
diff -up qt-4.8/src/corelib/plugin/qlibrary.cpp.crash_ppc qt-4.8/src/corelib/plugin/qlibrary.cpp
--- qt-4.8/src/corelib/plugin/qlibrary.cpp.crash_ppc 2011-10-04 05:44:32.000000000 +0200
+++ qt-4.8/src/corelib/plugin/qlibrary.cpp 2011-11-30 15:49:44.185001452 +0100
@@ -371,7 +371,7 @@ static bool qt_unix_query(const QString
long pos = 0;
const char pattern[] = "pattern=QT_PLUGIN_VERIFICATION_DATA";
const ulong plen = qstrlen(pattern);
-#if defined (Q_OF_ELF) && defined(Q_CC_GNU)
+#if defined (Q_OF_ELF) && defined(Q_CC_GNU) && !(defined(__powerpc64__) || defined(__ppc64__))
int r = QElfParser().parse(filedata, fdlen, library, lib, &pos, &fdlen);
if (r == QElfParser::NoQtSection) {
if (pos > 0) {
@@ -393,7 +393,7 @@ static bool qt_unix_query(const QString
}
#else
pos = qt_find_pattern(filedata, fdlen, pattern, plen);
-#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU)
+#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU) && !(defined(__powerpc64__) || defined(__ppc64__))
bool ret = false;
if (pos >= 0)
ret = qt_parse_pattern(filedata + pos, version, debug, key);

13
qt.spec
View File

@ -16,7 +16,7 @@ Summary: Qt toolkit
Name: qt
Epoch: 1
Version: 4.8.1
Release: 12%{?dist}
Release: 13%{?dist}
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
License: (LGPLv2 with exceptions or GPLv3 with exceptions) and ASL 2.0 and BSD and FTL and MIT
@ -102,9 +102,6 @@ Patch73: qt-everywhere-opensource-src-4.8.0-qtwebkit-glib231.patch
# sql/drivers/tds/qsql_tds.cpp:341:49: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
Patch74: qt-everywhere-opensource-src-4.7.4-tds_no_strict_aliasing.patch
# workaround crash on ppc64
Patch75: qt-ppc64-crash.patch
# add missing method for QBasicAtomicPointer on s390(x)
Patch76: qt-everywhere-opensource-src-4.8.0-s390-atomic.patch
@ -126,6 +123,9 @@ Patch100: qt-everywhere-opensource-src-4.8.1-qtgahandle.patch
# Fix a crash in cursorToX() when new block is added
# http://codereview.qt-project.org/22142
Patch101: qt-everywhere-opensource-src-4.8.1-QTBUG-24718.patch
# fix crash on big endian machines
# https://bugreports.qt-project.org/browse/QTBUG-22960
Patch102: qt-everywhere-opensource-src-4.8.1-type.patch
# security patches
# CVE-2011-3922 qt: Stack-based buffer overflow in embedded harfbuzz code
@ -458,7 +458,6 @@ rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags
%patch73 -p1 -b .qtwebkit-glib231
%endif
%patch74 -p1 -b .tds_no_strict_aliasing
%patch75 -p1 -b .ppc64-crash
%patch76 -p1 -b .s390-atomic
%patch77 -p1 -b .icu_no_debug
%patch79 -p1 -b .qvfb
@ -468,6 +467,7 @@ rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags
# upstream patches
%patch100 -p1 -b .QTgaHandler
%patch101 -p1 -b .QTBUG-24718
%patch102 -p1 -b .bigendian
# security fixes
%patch200 -p1 -b .CVE-2011-3922
@ -1100,6 +1100,9 @@ fi
%changelog
* Wed May 16 2012 Than Ngo <than@redhat.com> - 4.8.1-13
- add upstream patch to fix crash on big endian machine
* Fri May 11 2012 Rex Dieter <rdieter@fedoraproject.org> 4.8.1-12
- enable debuginfo in libQt3Support