From 19016ae735a92f3d1c829dbdc18faa04cfde4f48359f9d7577d9ea64469dcb12 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 31 May 2016 10:11:39 +0000 Subject: [PATCH] Accepting request 398282 from KDE:Qt5 - Added Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch to prevent issues with GCC 6 OBS-URL: https://build.opensuse.org/request/show/398282 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtdeclarative?expand=0&rev=30 --- ...-code-relating-to-null-this-pointers.patch | 37 +++++++++++++++++++ libqt5-qtdeclarative.changes | 6 +++ libqt5-qtdeclarative.spec | 3 ++ 3 files changed, 46 insertions(+) create mode 100644 Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch diff --git a/Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch b/Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch new file mode 100644 index 0000000..288fd80 --- /dev/null +++ b/Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch @@ -0,0 +1,37 @@ +From 18e77550f149722e0554f24ddfa326e03a9fef10 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Thu, 19 May 2016 15:56:10 -0700 +Subject: [PATCH] Workaround for crashes in QtQml code relating to null this + pointers + +When compiled in release mode with GCC 6, QtQml crashes. This option +gets works around the issue by instructing the compiler not to delete +null pointer checks for pointers that the standard says cannot be null, +yet apparently are. + +This is a temporary workaround until a proper solution is found. + +Change-Id: Id3aab65533904562a6cbfffd14501a185fc91179 +Reviewed-by: Lars Knoll +--- + src/qml/qml.pro | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/qml/qml.pro b/src/qml/qml.pro +index e30c39c..f4862a1 100644 +--- a/src/qml/qml.pro ++++ b/src/qml/qml.pro +@@ -16,6 +16,11 @@ exists("qqml_enable_gcov") { + LIBS_PRIVATE += -lgcov + } + ++greaterThan(QT_GCC_MAJOR_VERSION, 5) { ++ # Our code is bad. Temporary workaround. ++ QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks ++} ++ + QMAKE_DOCS = $$PWD/doc/qtqml.qdocconf + + # 2415: variable "xx" of static storage duration was declared but never referenced +-- +2.7.4 diff --git a/libqt5-qtdeclarative.changes b/libqt5-qtdeclarative.changes index 2aff45a..e60e2d9 100644 --- a/libqt5-qtdeclarative.changes +++ b/libqt5-qtdeclarative.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 26 15:49:35 UTC 2016 - hrvoje.senjan@gmail.com + +- Added Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch + to prevent issues with GCC 6 + ------------------------------------------------------------------- Fri Mar 18 19:03:05 UTC 2016 - hrvoje.senjan@gmail.com diff --git a/libqt5-qtdeclarative.spec b/libqt5-qtdeclarative.spec index c66b4a9..4b96176 100644 --- a/libqt5-qtdeclarative.spec +++ b/libqt5-qtdeclarative.spec @@ -35,6 +35,8 @@ Source: %{tar_version}.tar.xz Source1: baselibs.conf # PATCH-FIX-OPENSUSE overflow.patch -- Statement might be overflowing a buffer Patch0: overflow.patch +# PATCH-FIX-UPSTREAM Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch +Patch1: Workaround-for-crashes-in-QtQml-code-relating-to-null-this-pointers.patch BuildRequires: fdupes BuildRequires: libQt5Core-private-headers-devel >= %{version} BuildRequires: libQt5Gui-private-headers-devel >= %{version} @@ -72,6 +74,7 @@ handling. %prep %setup -q -n qtdeclarative-opensource-src-%{real_version} %patch0 -p1 +%patch1 -p1 %package -n %libname Summary: Qt 5 Declarative Library