From 5f0892c0e31b7874dd3de6616fee1bf2bd994ffe Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 2 Mar 2021 14:03:06 -0800 Subject: qtbase: Fix build with gcc-11 Signed-off-by: Khem Raj --- recipes-qt/qt5/nativesdk-qtbase_git.bb | 1 + recipes-qt/qt5/qtbase-native_git.bb | 1 + .../0021-qfloat16-Include-limits-header.patch | 48 ++++++++++++++++++++++ recipes-qt/qt5/qtbase_git.bb | 1 + 4 files changed, 51 insertions(+) create mode 100644 recipes-qt/qt5/qtbase/0021-qfloat16-Include-limits-header.patch (limited to 'recipes-qt') diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb index b769c9fa..594173aa 100644 --- a/recipes-qt/qt5/nativesdk-qtbase_git.bb +++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb @@ -43,6 +43,7 @@ SRC_URI += "\ file://0018-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \ file://0019-Define-__NR_futex-if-it-does-not-exist.patch \ file://0020-Revert-Fix-workaround-in-pthread-destructor.patch \ + file://0021-qfloat16-Include-limits-header.patch \ " # common for qtbase-native and nativesdk-qtbase diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb index 8effb0af..d210e222 100644 --- a/recipes-qt/qt5/qtbase-native_git.bb +++ b/recipes-qt/qt5/qtbase-native_git.bb @@ -38,6 +38,7 @@ SRC_URI += "\ file://0018-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \ file://0019-Define-__NR_futex-if-it-does-not-exist.patch \ file://0020-Revert-Fix-workaround-in-pthread-destructor.patch \ + file://0021-qfloat16-Include-limits-header.patch \ " # common for qtbase-native and nativesdk-qtbase diff --git a/recipes-qt/qt5/qtbase/0021-qfloat16-Include-limits-header.patch b/recipes-qt/qt5/qtbase/0021-qfloat16-Include-limits-header.patch new file mode 100644 index 00000000..e781392d --- /dev/null +++ b/recipes-qt/qt5/qtbase/0021-qfloat16-Include-limits-header.patch @@ -0,0 +1,48 @@ +From f680222892b44b3c1de129dc086613c6fe025c2d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 2 Mar 2021 13:18:47 -0800 +Subject: [PATCH] qfloat16: Include header + +gcc11 complains + error: 'numeric_limits' is not a class template + | 344 | template<> class numeric_limits + +This is because its missing right header which perhaps is included +implicitly in older compilers + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + src/corelib/global/qfloat16.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/src/corelib/global/qfloat16.h ++++ b/src/corelib/global/qfloat16.h +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + + #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__) + // All processors that support AVX2 do support F16C too. That doesn't mean +--- a/src/corelib/text/qbytearraymatcher.h ++++ b/src/corelib/text/qbytearraymatcher.h +@@ -40,6 +40,7 @@ + #ifndef QBYTEARRAYMATCHER_H + #define QBYTEARRAYMATCHER_H + ++#include + #include + + QT_BEGIN_NAMESPACE +--- a/src/corelib/tools/qoffsetstringarray_p.h ++++ b/src/corelib/tools/qoffsetstringarray_p.h +@@ -55,6 +55,7 @@ + + #include + #include ++#include + + QT_BEGIN_NAMESPACE + diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb index daaa1dce..e845dfe0 100644 --- a/recipes-qt/qt5/qtbase_git.bb +++ b/recipes-qt/qt5/qtbase_git.bb @@ -34,6 +34,7 @@ SRC_URI += "\ file://0018-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \ file://0019-Define-__NR_futex-if-it-does-not-exist.patch \ file://0020-Revert-Fix-workaround-in-pthread-destructor.patch \ + file://0021-qfloat16-Include-limits-header.patch \ " # Disable LTO for now, QT5 patches are being worked upstream, perhaps revisit with -- cgit v1.2.3-54-g00ecf