* Tue Mar 03 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.2.1-3

- better fix for #485968 (fix aliasing instead of using -fno-strict-aliasing)
This commit is contained in:
Kevin Kofler 2009-03-03 19:40:15 +00:00
parent 2cb08dfb71
commit f75244b041
3 changed files with 36 additions and 15 deletions

View File

@ -1,12 +0,0 @@
diff -ur kdelibs-4.2.0/kjs/CMakeLists.txt kdelibs-4.2.0-kjs-gcc44-crash/kjs/CMakeLists.txt
--- kdelibs-4.2.0/kjs/CMakeLists.txt 2008-11-19 11:20:10.000000000 +0100
+++ kdelibs-4.2.0-kjs-gcc44-crash/kjs/CMakeLists.txt 2009-02-18 19:43:20.000000000 +0100
@@ -183,6 +183,8 @@
CompileState.cpp
)
+set_source_files_properties(dtoa.cpp PROPERTIES COMPILE_FLAGS -fno-strict-aliasing)
+
if (NOT DEFINED QT_ONLY)
set(KJSLIBNAME kjs)
else (NOT DEFINED QT_ONLY)

View File

@ -0,0 +1,30 @@
diff -ur kdelibs-4.2.1/kjs/dtoa.cpp kdelibs-4.2.1-kjs-gcc44-crash/kjs/dtoa.cpp
--- kdelibs-4.2.1/kjs/dtoa.cpp 2008-05-21 13:06:47.000000000 +0200
+++ kdelibs-4.2.1-kjs-gcc44-crash/kjs/dtoa.cpp 2009-03-03 20:18:46.000000000 +0100
@@ -299,6 +299,15 @@
#define word0(x) ((ULong *)&x)[0]
#define word1(x) ((ULong *)&x)[1]
#endif
+#elif defined __GNUC__
+#define dval(x) x
+#ifdef IEEE_8087
+#define word0(x) (__extension__ ((U) { d: (x) }).L[1])
+#define word1(x) (__extension__ ((U) { d: (x) }).L[0])
+#else
+#define word0(x) (__extension__ ((U) { d: (x) }).L[0])
+#define word1(x) (__extension__ ((U) { d: (x) }).L[1])
+#endif
#else
#ifdef IEEE_8087
#define word0(x) ((U*)&x)->L[1]
@@ -314,7 +323,9 @@
* An alternative that might be better on some machines is
* #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
*/
-#if defined(IEEE_8087) + defined(VAX)
+#if !defined(YES_ALIAS) && defined(__GNUC__)
+#define Storeinc(a,b,c) (*a++ = b << 16 | (c & 0xffff))
+#elif defined(IEEE_8087) + defined(VAX)
#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
((unsigned short *)a)[0] = (unsigned short)c, a++)
#else

View File

@ -1,6 +1,6 @@
Summary: K Desktop Environment 4 - Libraries
Version: 4.2.1
Release: 2%{?dist}
Release: 3%{?dist}
%if 0%{?fedora} > 8
Name: kdelibs
@ -79,8 +79,8 @@ Patch18: kdelibs-4.1.72-kstandarddirs.patch
Patch20: kdelibs-4.1.70-cmake.patch
Patch22: kdelibs-4.1.96-cmake.patch
Patch23: kdelibs-4.2.0-gcc44-workaround.patch
# disable strict aliasing in kjs/dtoa.cpp (GCC 4.4 x86_64 crash) (#485968)
Patch24: kdelibs-4.2.0-kjs-gcc44-crash.patch
# fix aliasing problems in kjs/dtoa.cpp (GCC 4.4 crash) (#485968)
Patch24: kdelibs-4.2.1-kjs-gcc44-crash.patch
Patch25: kdelibs-4.2.0-gcc44-misc.patch
# upstream
@ -401,6 +401,9 @@ rm -rf %{buildroot}
%changelog
* Tue Mar 03 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.2.1-3
- better fix for #485968 (fix aliasing instead of using -fno-strict-aliasing)
* Sun Mar 01 2009 Than Ngo <than@redhat.com> - 4.2.1-2
- respin