- Add support for gcc-11

- Fix ordered pointer comparison against zero problems
This commit is contained in:
Jeff Law 2020-08-19 13:10:01 -06:00
parent 39f6a0510d
commit 110ec9baed
3 changed files with 37 additions and 3 deletions

View File

@ -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"
;;
*)

26
qt-gcc11.patch Normal file
View File

@ -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> HTMLImageElement::createForJSConstructor(Document*
RefPtr<HTMLImageElement> 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;
}
}

10
qt.spec
View File

@ -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 <law@redhat.com> - 4.8.7-56
- Add support for gcc-11
- Fix ordered pointer comparison against zero problems
* Thu Aug 13 2020 Than Ngo <than@redhat.com> - 4.8.7-55
- fixed #1868534 - CVE-2020-17507