From 1d0b9ed302ae8b2d8227c80a1057cbc0f4b32e8a Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 27 Sep 2022 23:02:48 +0200 Subject: [PATCH] qt5: fix build errors with GCC 11 host tool chain Fixes #4621 --- repos/libports/ports/qt5-host.hash | 2 +- repos/libports/ports/qt5-host.port | 3 + repos/libports/ports/qt5.hash | 2 +- repos/libports/ports/qt5.port | 2 +- .../src/lib/qt5-host/qt5-qtbase-gcc11.patch | 175 ++++++++++++++++++ 5 files changed, 181 insertions(+), 3 deletions(-) create mode 100644 repos/libports/src/lib/qt5-host/qt5-qtbase-gcc11.patch diff --git a/repos/libports/ports/qt5-host.hash b/repos/libports/ports/qt5-host.hash index 8bc77acb3a..451b4d34f3 100644 --- a/repos/libports/ports/qt5-host.hash +++ b/repos/libports/ports/qt5-host.hash @@ -1 +1 @@ -51940aa0054325a33ca2e1286dbb2b8c7e006b69 +baf211394cbf3981c3d03ed4c68bc9b266f768df diff --git a/repos/libports/ports/qt5-host.port b/repos/libports/ports/qt5-host.port index e57f207e64..82e0889968 100644 --- a/repos/libports/ports/qt5-host.port +++ b/repos/libports/ports/qt5-host.port @@ -18,3 +18,6 @@ DIR(${QTDECLARATIVE}) := src/lib/qtdeclarative URL(${QTTOOLS}) := https://download.qt.io/archive/qt/5.15/$(VERSION)/submodules/$(QTTOOLS).tar.xz SHA(${QTTOOLS}) := c189d0ce1ff7c739db9a3ace52ac3e24cb8fd6dbf234e49f075249b38f43c1cc DIR(${QTTOOLS}) := src/lib/qttools + +PATCHES := src/lib/qt5-host/qt5-qtbase-gcc11.patch +PATCH_OPT := -p1 -d $(DIR(${QTBASE})) diff --git a/repos/libports/ports/qt5.hash b/repos/libports/ports/qt5.hash index 0ed81e1d76..9e579599f1 100644 --- a/repos/libports/ports/qt5.hash +++ b/repos/libports/ports/qt5.hash @@ -1 +1 @@ -aca39e23d0911602ac6281935df726f32db05b3d +42324c0a611d86fbfdaf5ded294650807038421e diff --git a/repos/libports/ports/qt5.port b/repos/libports/ports/qt5.port index 5be6cc9ae5..23538678b0 100644 --- a/repos/libports/ports/qt5.port +++ b/repos/libports/ports/qt5.port @@ -4,5 +4,5 @@ VERSION := 5.15.2 DOWNLOADS := qt5.git URL(qt5) := https://github.com/cproc/qt5.git -REV(qt5) := issue4595 +REV(qt5) := issue4621 DIR(qt5) := src/lib/qt5 diff --git a/repos/libports/src/lib/qt5-host/qt5-qtbase-gcc11.patch b/repos/libports/src/lib/qt5-host/qt5-qtbase-gcc11.patch new file mode 100644 index 0000000000..2f29de0fc5 --- /dev/null +++ b/repos/libports/src/lib/qt5-host/qt5-qtbase-gcc11.patch @@ -0,0 +1,175 @@ +qt5-qtbase-gcc11.patch + +Source: https://github.com/OpenMandrivaAssociation/qt5-qtbase/blob/master/qt5-qtbase-gcc11.patch + +diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp +index 06fd88da..dbff3239 100644 +--- a/src/corelib/codecs/qtextcodec.cpp ++++ b/src/corelib/codecs/qtextcodec.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qplatformdefs.h" + + #include "qtextcodec.h" +diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp +index 8561f908..8128d3cf 100644 +--- a/src/corelib/codecs/qutfcodec.cpp ++++ b/src/corelib/codecs/qutfcodec.cpp +@@ -38,6 +38,8 @@ + ** + ****************************************************************************/ + ++#include ++ + #include "qutfcodec_p.h" + #include "qlist.h" + #include "qendian.h" +diff --git a/src/corelib/global/qendian.cpp b/src/corelib/global/qendian.cpp +index eb08b2f8..6b41b3dd 100644 +--- a/src/corelib/global/qendian.cpp ++++ b/src/corelib/global/qendian.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qendian.h" + + #include "qalgorithms.h" +diff --git a/src/corelib/global/qfloat16.cpp b/src/corelib/global/qfloat16.cpp +index c9733174..c62a1972 100644 +--- a/src/corelib/global/qfloat16.cpp ++++ b/src/corelib/global/qfloat16.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qfloat16.h" + #include "private/qsimd_p.h" + #include // for fpclassify()'s return values +diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp +index 10672c1f..6d5fd63e 100644 +--- a/src/corelib/global/qrandom.cpp ++++ b/src/corelib/global/qrandom.cpp +@@ -40,6 +40,7 @@ + // for rand_s + #define _CRT_RAND_S + ++#include + #include "qrandom.h" + #include "qrandom_p.h" + #include +diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp +index 13eee353..9e7a7a41 100644 +--- a/src/corelib/plugin/qelfparser_p.cpp ++++ b/src/corelib/plugin/qelfparser_p.cpp +@@ -37,6 +37,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qelfparser_p.h" + + #if defined (Q_OF_ELF) && defined(Q_CC_GNU) +diff --git a/src/corelib/plugin/qmachparser.cpp b/src/corelib/plugin/qmachparser.cpp +index 11670caf..39f5596b 100644 +--- a/src/corelib/plugin/qmachparser.cpp ++++ b/src/corelib/plugin/qmachparser.cpp +@@ -37,6 +37,8 @@ + ** + ****************************************************************************/ + ++#include ++ + #include "qmachparser_p.h" + + #if defined(Q_OF_MACH_O) +diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp +index 83873edf..5aafb4e5 100644 +--- a/src/corelib/plugin/quuid.cpp ++++ b/src/corelib/plugin/quuid.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include + #include "quuid.h" + + #include "qcryptographichash.h" +diff --git a/src/corelib/serialization/qdatastream.cpp b/src/corelib/serialization/qdatastream.cpp +index 5082a8cb..7eecfcca 100644 +--- a/src/corelib/serialization/qdatastream.cpp ++++ b/src/corelib/serialization/qdatastream.cpp +@@ -40,6 +40,8 @@ + #include "qdatastream.h" + #include "qdatastream_p.h" + ++#include ++ + #if !defined(QT_NO_DATASTREAM) || defined(QT_BOOTSTRAPPED) + #include "qbuffer.h" + #include "qfloat16.h" +diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp +index 9a72df58..6651ee98 100644 +--- a/src/corelib/text/qbytearray.cpp ++++ b/src/corelib/text/qbytearray.cpp +@@ -39,6 +39,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qbytearray.h" + #include "qbytearraymatcher.h" + #include "private/qtools_p.h" +diff --git a/src/corelib/text/qbytearraymatcher.cpp b/src/corelib/text/qbytearraymatcher.cpp +index 72e09226..80511cb5 100644 +--- a/src/corelib/text/qbytearraymatcher.cpp ++++ b/src/corelib/text/qbytearraymatcher.cpp +@@ -37,6 +37,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qbytearraymatcher.h" + + #include +diff --git a/src/corelib/tools/qbitarray.cpp b/src/corelib/tools/qbitarray.cpp +index ab3054d5..22efb3a0 100644 +--- a/src/corelib/tools/qbitarray.cpp ++++ b/src/corelib/tools/qbitarray.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qbitarray.h" + #include + #include +diff --git a/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp +index fa8d21e0..cd85956d 100644 +--- a/src/corelib/tools/qcryptographichash.cpp ++++ b/src/corelib/tools/qcryptographichash.cpp +@@ -38,6 +38,7 @@ + ** + ****************************************************************************/ + ++#include + #include + #include + +diff --git a/src/gui/text/qfontengine_qpf2.cpp b/src/gui/text/qfontengine_qpf2.cpp +index e00f9d05..917ab5f9 100644 +--- a/src/gui/text/qfontengine_qpf2.cpp ++++ b/src/gui/text/qfontengine_qpf2.cpp +@@ -37,6 +37,7 @@ + ** + ****************************************************************************/ + ++#include + #include "qfontengine_qpf2_p.h" + + #include