summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregorio Guidi <greg_g@gentoo.org>2005-08-22 13:13:47 +0000
committerGregorio Guidi <greg_g@gentoo.org>2005-08-22 13:13:47 +0000
commit0c7c8db70c8d99ecd72080a266b45cce035649db (patch)
tree4f2a2d980b671906f40445b8278ee867c95c5bda /x11-libs
parentUpdated ChangeLog. (diff)
downloadgentoo-2-0c7c8db70c8d99ecd72080a266b45cce035649db.tar.gz
gentoo-2-0c7c8db70c8d99ecd72080a266b45cce035649db.tar.bz2
gentoo-2-0c7c8db70c8d99ecd72080a266b45cce035649db.zip
Add patch to fix miscompilation with gcc4 (#102892).
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'x11-libs')
-rw-r--r--x11-libs/qt/ChangeLog6
-rw-r--r--x11-libs/qt/files/qt-3.3.4-gcc4-volatile.patch77
-rw-r--r--x11-libs/qt/qt-3.3.4-r7.ebuild5
3 files changed, 85 insertions, 3 deletions
diff --git a/x11-libs/qt/ChangeLog b/x11-libs/qt/ChangeLog
index 3be47390909f..ef58aafb0287 100644
--- a/x11-libs/qt/ChangeLog
+++ b/x11-libs/qt/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for x11-libs/qt
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/ChangeLog,v 1.240 2005/08/19 14:52:16 caleb Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/ChangeLog,v 1.241 2005/08/22 13:13:47 greg_g Exp $
+
+ 22 Aug 2005; Gregorio Guidi <greg_g@gentoo.org>
+ +files/qt-3.3.4-gcc4-volatile.patch, qt-3.3.4-r7.ebuild:
+ Add patch to fix miscompilation with gcc4 (#102892).
*qt-4.0.1 (19 Aug 2005)
diff --git a/x11-libs/qt/files/qt-3.3.4-gcc4-volatile.patch b/x11-libs/qt/files/qt-3.3.4-gcc4-volatile.patch
new file mode 100644
index 000000000000..b88792fd7be6
--- /dev/null
+++ b/x11-libs/qt/files/qt-3.3.4-gcc4-volatile.patch
@@ -0,0 +1,77 @@
+diff -Nur qt-x11-free-3.3.4.orig/src/tools/qlocale.cpp qt-x11-free-3.3.4/src/tools/qlocale.cpp
+--- qt-x11-free-3.3.4.orig/src/tools/qlocale.cpp 2005-01-21 18:16:05.000000000 +0100
++++ qt-x11-free-3.3.4/src/tools/qlocale.cpp 2005-08-20 16:05:53.000000000 +0200
+@@ -72,6 +72,12 @@
+ # define NAN DBL_QNAN
+ #endif
+
++#if (defined(Q_CC_GNU) && defined(Q_OS_WIN)) || __GNUC__ == 4 || defined(QT_QLOCALE_NEEDS_VOLATILE)
++# define NEEDS_VOLATILE volatile
++#else
++# define NEEDS_VOLATILE
++#endif
++
+ enum {
+ LittleEndian,
+ BigEndian
+@@ -4068,9 +4074,9 @@
+ #error Exactly one of IEEE_BIG_OR_LITTLE_ENDIAN, VAX, or IBM should be defined.
+ #endif
+
+-inline ULong getWord0(double x)
++inline ULong getWord0(const NEEDS_VOLATILE double x)
+ {
+- uchar *ptr = (uchar *)&x;
++ const NEEDS_VOLATILE uchar *ptr = reinterpret_cast<const NEEDS_VOLATILE uchar *>(&x);
+ if (ByteOrder == BigEndian) {
+ return (ptr[0]<<24) + (ptr[1]<<16) + (ptr[2]<<8) + ptr[3];
+ } else {
+@@ -4078,9 +4084,9 @@
+ }
+ }
+
+-inline void setWord0(double *x, ULong l)
++inline void setWord0(NEEDS_VOLATILE double *x, ULong l)
+ {
+- uchar *ptr = (uchar *)x;
++ NEEDS_VOLATILE uchar *ptr = reinterpret_cast<NEEDS_VOLATILE uchar *>(x);
+ if (ByteOrder == BigEndian) {
+ ptr[0] = (uchar)(l>>24);
+ ptr[1] = (uchar)(l>>16);
+@@ -4094,18 +4100,18 @@
+ }
+ }
+
+-inline ULong getWord1(double x)
++inline ULong getWord1(const NEEDS_VOLATILE double x)
+ {
+- uchar *ptr = (uchar *)&x;
++ const NEEDS_VOLATILE uchar *ptr = reinterpret_cast<const NEEDS_VOLATILE uchar *>(&x);
+ if (ByteOrder == BigEndian) {
+ return (ptr[4]<<24) + (ptr[5]<<16) + (ptr[6]<<8) + ptr[7];
+ } else {
+ return (ptr[3]<<24) + (ptr[2]<<16) + (ptr[1]<<8) + ptr[0];
+ }
+ }
+-inline void setWord1(double *x, ULong l)
++inline void setWord1(NEEDS_VOLATILE double *x, ULong l)
+ {
+- uchar *ptr = (uchar *)x;
++ NEEDS_VOLATILE uchar *ptr = reinterpret_cast<uchar NEEDS_VOLATILE *>(x);
+ if (ByteOrder == BigEndian) {
+ ptr[4] = (uchar)(l>>24);
+ ptr[5] = (uchar)(l>>16);
+@@ -5679,11 +5685,11 @@
+ #ifdef Q_OS_LINUX
+ fesetenv(&envp);
+ #endif
+-
++
+ return s;
+ }
+
+-static char *_qdtoa( double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp)
++static char *_qdtoa( NEEDS_VOLATILE double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp)
+ {
+ /*
+ Arguments ndigits, decpt, sign are similar to those
diff --git a/x11-libs/qt/qt-3.3.4-r7.ebuild b/x11-libs/qt/qt-3.3.4-r7.ebuild
index ec062c36e87f..7fb5d389e8b2 100644
--- a/x11-libs/qt/qt-3.3.4-r7.ebuild
+++ b/x11-libs/qt/qt-3.3.4-r7.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/qt-3.3.4-r7.ebuild,v 1.2 2005/08/08 10:55:51 greg_g Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/qt/qt-3.3.4-r7.ebuild,v 1.3 2005/08/22 13:13:47 greg_g Exp $
inherit eutils flag-o-matic toolchain-funcs
@@ -99,8 +99,9 @@ src_unpack() {
epatch ${FILESDIR}/${P}-0051-qtoolbar_77047.patch
epatch ${FILESDIR}/${P}-0047-fix-kmenu-widget.diff
- # patch for gcc4
+ # patches for gcc4
epatch "${FILESDIR}/${P}-gcc4.patch"
+ epatch "${FILESDIR}/${P}-gcc4-volatile.patch"
if use immqt || use immqt-bc ; then
epatch ../${IMMQT_P}.diff