From 110ec9baedae910012046e1ad32eb00cdccc0c83 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 19 Aug 2020 13:10:01 -0600 Subject: [PATCH] - Add support for gcc-11 - Fix ordered pointer comparison against zero problems --- qt-everywhere-opensource-src-4.8.7-gcc6.patch | 4 +-- qt-gcc11.patch | 26 +++++++++++++++++++ qt.spec | 10 ++++++- 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 qt-gcc11.patch diff --git a/qt-everywhere-opensource-src-4.8.7-gcc6.patch b/qt-everywhere-opensource-src-4.8.7-gcc6.patch index e0e0f63..e4c1c6b 100644 --- a/qt-everywhere-opensource-src-4.8.7-gcc6.patch +++ b/qt-everywhere-opensource-src-4.8.7-gcc6.patch @@ -6,7 +6,7 @@ diff -up qt-everywhere-opensource-src-4.8.7/configure.gcc6 qt-everywhere-opensou # Check gcc's version case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in - 5*|4*|3.4*) -+ 10*|9*|8*|7*|6*|5*|4*|3.4*) ++ 11*|10*|9*|8*|7*|6*|5*|4*|3.4*) ;; 3.3*) canBuildWebKit="no" @@ -15,7 +15,7 @@ diff -up qt-everywhere-opensource-src-4.8.7/configure.gcc6 qt-everywhere-opensou COMPILER_VERSION="3.*" ;; - 5*|4.*) -+ 10*|9*|8*|7*|6*|5*|4.*) ++ 11*|10*|9*|8*|7*|6*|5*|4.*) COMPILER_VERSION="4" ;; *) diff --git a/qt-gcc11.patch b/qt-gcc11.patch new file mode 100644 index 0000000..94764d6 --- /dev/null +++ b/qt-gcc11.patch @@ -0,0 +1,26 @@ +diff --git a/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp b/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp +index d66075e4..b51a27ad 100644 +--- a/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp ++++ b/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp +@@ -74,7 +74,7 @@ PassRefPtr HTMLImageElement::createForJSConstructor(Document* + RefPtr image = adoptRef(new HTMLImageElement(imgTag, document)); + if (optionalWidth) + image->setWidth(*optionalWidth); +- if (optionalHeight > 0) ++ if (optionalHeight != 0) + image->setHeight(*optionalHeight); + return image.release(); + } +diff --git a/tools/linguist/linguist/messagemodel.cpp b/tools/linguist/linguist/messagemodel.cpp +index 61c5389f..8d43d14b 100644 +--- a/tools/linguist/linguist/messagemodel.cpp ++++ b/tools/linguist/linguist/messagemodel.cpp +@@ -183,7 +183,7 @@ static int calcMergeScore(const DataModel *one, const DataModel *two) + if (ContextItem *c = one->findContext(oc->context())) { + for (int j = 0; j < oc->messageCount(); ++j) { + MessageItem *m = oc->messageItem(j); +- if (c->findMessage(m->text(), m->comment()) >= 0) ++ if (c->findMessage(m->text(), m->comment()) != 0) + ++inBoth; + } + } diff --git a/qt.spec b/qt.spec index 23640d8..31ee67f 100644 --- a/qt.spec +++ b/qt.spec @@ -43,7 +43,7 @@ Summary: Qt toolkit Name: qt Epoch: 1 Version: 4.8.7 -Release: 55%{?dist} +Release: 56%{?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 @@ -219,6 +219,9 @@ Patch180: qt-aarch64.patch # https://github.com/qt/qtbase/commit/c35a3f519007af44c3b364b9af86f6a336f6411b.patch Patch181: qt-everywhere-opensource-src-4.8.7-qforeach.patch +# Fix ordered pointer comparison against zero problem reported by gcc-11 +Patch200: qt-gcc11.patch + ## upstream git ## security patches @@ -654,6 +657,7 @@ rm -rf src/3rdparty/clucene %patch180 -p1 -b .aarch64 %patch181 -p1 -b .qforeach +%patch200 -p1 -b .gcc11 # upstream git @@ -1382,6 +1386,10 @@ fi %changelog +* Wed Aug 19 2020 Jeff Law - 4.8.7-56 +- Add support for gcc-11 +- Fix ordered pointer comparison against zero problems + * Thu Aug 13 2020 Than Ngo - 4.8.7-55 - fixed #1868534 - CVE-2020-17507