aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicola Lunghi <25422924+nicola-lunghi@users.noreply.github.com>2020-02-05 16:18:22 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2020-02-06 14:00:41 +0100
commitf18d5948bb9d53e07241ef7f2b399e485e170d07 (patch)
tree72587976e8491f0b84c234053895bc37e5401d28
parentc8cd55b03097c96f46a6e5e364cf0ca0ee590875 (diff)
qtbase: fix build with platform where FE macro are not defined
see added patch Signed-off-by: Nicola Lunghi <nick83ola@gmail.com>
-rw-r--r--recipes-qt/qt5/qtbase/0022-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch123
-rw-r--r--recipes-qt/qt5/qtbase_git.bb1
2 files changed, 124 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase/0022-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch b/recipes-qt/qt5/qtbase/0022-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch
new file mode 100644
index 00000000..8aeca2ef
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0022-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch
@@ -0,0 +1,123 @@
+From 9b192df7e06992b256eb49af5a213c1b0d3e341a Mon Sep 17 00:00:00 2001
+From: Nicola Lunghi <nick83ola@gmail.com>
+Date: Wed, 5 Feb 2020 15:32:25 +0000
+Subject: [PATCH] tst_qpainter: FE_ macros are not defined for every platform
+
+the FE_INEXACT, FE_UNDERFLOW, FE_OVERFLOW, FE_DIVBYZERO, FE_INVALID are defined
+only for platforms with fp engine.
+
+Signed-off-by: Nicola Lunghi <nick83ola@gmail.com>
+Upstream-Status: submitted [https://codereview.qt-project.org/c/qt/qtbase/+/289447]
+---
+ .../gui/painting/qpainter/tst_qpainter.cpp | 50 ++++++++++++++-----
+ 1 file changed, 37 insertions(+), 13 deletions(-)
+
+diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+index 6e48439944..3566ef24be 100644
+--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
++++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
+@@ -2890,19 +2890,43 @@ void tst_QPainter::monoImages()
+ #if !defined(Q_OS_AIX) && !defined(Q_CC_MSVC) && !defined(Q_OS_SOLARIS) && !defined(__UCLIBC__)
+ #include <fenv.h>
+
++#if defined(FE_INEXACT)
++ #define QP_FE_INEXACT (FE_INEXACT)
++#else
++ #define QP_FE_INEXACT 0
++#endif
++#if defined(FE_UNDERFLOW)
++ #define QP_FE_UNDERFLOW (FE_UNDERFLOW)
++#else
++ #define QP_FE_UNDERFLOW 0
++#endif
++#if defined(FE_OVERFLOW)
++ #define QP_FE_OVERFLOW (FE_OVERFLOW)
++#else
++ #define QP_FE_OVERFLOW 0
++#endif
++#if defined(FE_DIVBYZERO)
++ #define QP_FE_DIVBYZERO (FE_DIVBYZERO)
++#else
++ #define QP_FE_DIVBYZERO 0
++#endif
++#if defined(FE_INVALID)
++ #define QP_FE_INVALID (FE_INVALID)
++#else
++ #define QP_FE_INVALID 0
++#endif
++
+ static const QString fpeExceptionString(int exception)
+ {
+-#ifdef FE_INEXACT
+- if (exception & FE_INEXACT)
++ if (exception & QP_FE_INEXACT)
+ return QLatin1String("Inexact result");
+-#endif
+- if (exception & FE_UNDERFLOW)
++ if (exception & QP_FE_UNDERFLOW)
+ return QLatin1String("Underflow");
+- if (exception & FE_OVERFLOW)
++ if (exception & QP_FE_OVERFLOW)
+ return QLatin1String("Overflow");
+- if (exception & FE_DIVBYZERO)
++ if (exception & QP_FE_DIVBYZERO)
+ return QLatin1String("Divide by zero");
+- if (exception & FE_INVALID)
++ if (exception & QP_FE_INVALID)
+ return QLatin1String("Invalid operation");
+ return QLatin1String("No exception");
+ }
+@@ -2928,7 +2952,7 @@ private:
+
+ void fpe_rasterizeLine_task232012()
+ {
+- FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO);
++ FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO);
+ QImage img(128, 128, QImage::Format_ARGB32_Premultiplied);
+ img.fill(0x0);
+ QPainter p(&img);
+@@ -2940,7 +2964,7 @@ void fpe_rasterizeLine_task232012()
+
+ void fpe_pixmapTransform()
+ {
+- FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO);
++ FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO);
+
+ QImage img(128, 128, QImage::Format_ARGB32_Premultiplied);
+
+@@ -2968,7 +2992,7 @@ void fpe_pixmapTransform()
+
+ void fpe_zeroLengthLines()
+ {
+- FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO);
++ FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO);
+
+ QImage img(128, 128, QImage::Format_ARGB32_Premultiplied);
+
+@@ -2980,7 +3004,7 @@ void fpe_zeroLengthLines()
+
+ void fpe_divByZero()
+ {
+- FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO);
++ FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO);
+
+ QImage img(128, 128, QImage::Format_ARGB32_Premultiplied);
+
+@@ -3003,7 +3027,7 @@ void fpe_divByZero()
+
+ void fpe_steepSlopes()
+ {
+- FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO);
++ FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO);
+
+ QImage img(1024, 1024, QImage::Format_ARGB32_Premultiplied);
+
+@@ -3022,7 +3046,7 @@ void fpe_steepSlopes()
+
+ void fpe_radialGradients()
+ {
+- FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO);
++ FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO);
+
+ QImage img(21, 21, QImage::Format_ARGB32_Premultiplied);
+ img.fill(0);
diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
index cda7f5d3..4de47ca4 100644
--- a/recipes-qt/qt5/qtbase_git.bb
+++ b/recipes-qt/qt5/qtbase_git.bb
@@ -34,6 +34,7 @@ SRC_URI += "\
file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
file://0017-qfloat16-check-for-__ARM_FP-2.patch \
file://0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch \
+ file://0022-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \
"
# for syncqt