From 3f8559bce624f64e738e817cca17eb91575ea604 Mon Sep 17 00:00:00 2001 From: lizhenhua Date: Fri, 22 May 2020 16:11:09 +0800 Subject: [PATCH 1/2] Add yaml file --- ...CH-loop-control-without-GCC-statemen.patch | 46 +++++++++++++++++++ qt.spec | 1 + qt.yaml | 4 ++ 3 files changed, 51 insertions(+) create mode 100644 0001-Redo-the-Q_FOREACH-loop-control-without-GCC-statemen.patch create mode 100644 qt.yaml diff --git a/0001-Redo-the-Q_FOREACH-loop-control-without-GCC-statemen.patch b/0001-Redo-the-Q_FOREACH-loop-control-without-GCC-statemen.patch new file mode 100644 index 0000000..b797e81 --- /dev/null +++ b/0001-Redo-the-Q_FOREACH-loop-control-without-GCC-statemen.patch @@ -0,0 +1,46 @@ +From 4c052f763fbc799cebb08273a3bb9de3a03b1f27 Mon Sep 17 00:00:00 2001 +From: lizhenhua +Date: Fri, 22 May 2020 15:58:42 +0800 +Subject: [PATCH] Redo the Q_FOREACH loop control without GCC statement + expressions + +--- + src/corelib/global/qglobal.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h +index 3c3bc32a..48f105b1 100644 +--- a/src/corelib/global/qglobal.h ++++ b/src/corelib/global/qglobal.h +@@ -2482,22 +2482,22 @@ typedef uint Flags; + + #endif /* Q_NO_TYPESAFE_FLAGS */ + +-#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_RVCT) ++#if (defined(Q_CC_GNU) && !defined(Q_CC_RVCT)) + /* make use of typeof-extension */ + template + class QForeachContainer { + public: +- inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { } ++ inline QForeachContainer(const T& t) : c(t), i(c.begin()), e(c.end()), control(1) { } + const T c; +- int brk; + typename T::const_iterator i, e; ++ int control; + }; + + #define Q_FOREACH(variable, container) \ + for (QForeachContainer<__typeof__(container)> _container_(container); \ +- !_container_.brk && _container_.i != _container_.e; \ +- __extension__ ({ ++_container_.brk; ++_container_.i; })) \ +- for (variable = *_container_.i;; __extension__ ({--_container_.brk; break;})) ++ _container_.control && _container_.i != _container_.e; \ ++ ++_container_.i, _container_.control ^= 1) \ ++ for (variable = *_container_.i; _container_.control; _container_.control = 0) + + #else + +-- +2.23.0 + diff --git a/qt.spec b/qt.spec index 5b7cc5f..716de87 100644 --- a/qt.spec +++ b/qt.spec @@ -72,6 +72,7 @@ Patch40: qt-aarch64.patch Patch41: qt-everywhere-opensource-src-4.8.5-QTBUG-35459.patch Patch42: qt-everywhere-opensource-src-4.8.6-systemtrayicon.patch Patch43: stack-protector.patch +Patch44: 0001-Redo-the-Q_FOREACH-loop-control-without-GCC-statemen.patch Patch6000: CVE-2018-19869.patch Patch6001: CVE-2018-19872.patch Patch6002: CVE-2018-19871.patch diff --git a/qt.yaml b/qt.yaml new file mode 100644 index 0000000..f0e875e --- /dev/null +++ b/qt.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://code.qt.io/qt/qt.git +tag_prefix: ^v +seperator: . -- Gitee From e2b2bfee63c7e3fbc2f210f13872b93e34fd4ec3 Mon Sep 17 00:00:00 2001 From: lizhenhua Date: Tue, 26 May 2020 09:02:00 +0800 Subject: [PATCH 2/2] Add yaml file --- qt.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt.spec b/qt.spec index 716de87..023659e 100644 --- a/qt.spec +++ b/qt.spec @@ -13,7 +13,7 @@ Name: qt Epoch: 1 Version: 4.8.7 -Release: 47 +Release: 48 Summary: A software toolkit for developing applications License: (LGPLv2 with exceptions or GPLv3 with exceptions) and ASL 2.0 and BSD and FTL and MIT URL: http://qt-project.org/ @@ -444,6 +444,9 @@ fi %{_qt4_prefix}/examples/ %changelog +* Mon May 25 2020 lizhenhua - 1:4.8.7-48 +- Fix compile errors for gcc 9 + * Thu Mar 19 2020 yanglijin - 1:4.8.7-47 - add stack protector -- Gitee