summaryrefslogtreecommitdiffstats
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)
downloadmeta-qt5-f18d5948bb9d53e07241ef7f2b399e485e170d07.tar.gz
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 @@
1From 9b192df7e06992b256eb49af5a213c1b0d3e341a Mon Sep 17 00:00:00 2001
2From: Nicola Lunghi <nick83ola@gmail.com>
3Date: Wed, 5 Feb 2020 15:32:25 +0000
4Subject: [PATCH] tst_qpainter: FE_ macros are not defined for every platform
5
6the FE_INEXACT, FE_UNDERFLOW, FE_OVERFLOW, FE_DIVBYZERO, FE_INVALID are defined
7only for platforms with fp engine.
8
9Signed-off-by: Nicola Lunghi <nick83ola@gmail.com>
10Upstream-Status: submitted [https://codereview.qt-project.org/c/qt/qtbase/+/289447]
11---
12 .../gui/painting/qpainter/tst_qpainter.cpp | 50 ++++++++++++++-----
13 1 file changed, 37 insertions(+), 13 deletions(-)
14
15diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
16index 6e48439944..3566ef24be 100644
17--- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
18+++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp
19@@ -2890,19 +2890,43 @@ void tst_QPainter::monoImages()
20 #if !defined(Q_OS_AIX) && !defined(Q_CC_MSVC) && !defined(Q_OS_SOLARIS) && !defined(__UCLIBC__)
21 #include <fenv.h>
22
23+#if defined(FE_INEXACT)
24+ #define QP_FE_INEXACT (FE_INEXACT)
25+#else
26+ #define QP_FE_INEXACT 0
27+#endif
28+#if defined(FE_UNDERFLOW)
29+ #define QP_FE_UNDERFLOW (FE_UNDERFLOW)
30+#else
31+ #define QP_FE_UNDERFLOW 0
32+#endif
33+#if defined(FE_OVERFLOW)
34+ #define QP_FE_OVERFLOW (FE_OVERFLOW)
35+#else
36+ #define QP_FE_OVERFLOW 0
37+#endif
38+#if defined(FE_DIVBYZERO)
39+ #define QP_FE_DIVBYZERO (FE_DIVBYZERO)
40+#else
41+ #define QP_FE_DIVBYZERO 0
42+#endif
43+#if defined(FE_INVALID)
44+ #define QP_FE_INVALID (FE_INVALID)
45+#else
46+ #define QP_FE_INVALID 0
47+#endif
48+
49 static const QString fpeExceptionString(int exception)
50 {
51-#ifdef FE_INEXACT
52- if (exception & FE_INEXACT)
53+ if (exception & QP_FE_INEXACT)
54 return QLatin1String("Inexact result");
55-#endif
56- if (exception & FE_UNDERFLOW)
57+ if (exception & QP_FE_UNDERFLOW)
58 return QLatin1String("Underflow");
59- if (exception & FE_OVERFLOW)
60+ if (exception & QP_FE_OVERFLOW)
61 return QLatin1String("Overflow");
62- if (exception & FE_DIVBYZERO)
63+ if (exception & QP_FE_DIVBYZERO)
64 return QLatin1String("Divide by zero");
65- if (exception & FE_INVALID)
66+ if (exception & QP_FE_INVALID)
67 return QLatin1String("Invalid operation");
68 return QLatin1String("No exception");
69 }
70@@ -2928,7 +2952,7 @@ private:
71
72 void fpe_rasterizeLine_task232012()
73 {
74- FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO);
75+ FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO);
76 QImage img(128, 128, QImage::Format_ARGB32_Premultiplied);
77 img.fill(0x0);
78 QPainter p(&img);
79@@ -2940,7 +2964,7 @@ void fpe_rasterizeLine_task232012()
80
81 void fpe_pixmapTransform()
82 {
83- FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO);
84+ FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO);
85
86 QImage img(128, 128, QImage::Format_ARGB32_Premultiplied);
87
88@@ -2968,7 +2992,7 @@ void fpe_pixmapTransform()
89
90 void fpe_zeroLengthLines()
91 {
92- FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO);
93+ FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO);
94
95 QImage img(128, 128, QImage::Format_ARGB32_Premultiplied);
96
97@@ -2980,7 +3004,7 @@ void fpe_zeroLengthLines()
98
99 void fpe_divByZero()
100 {
101- FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO);
102+ FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO);
103
104 QImage img(128, 128, QImage::Format_ARGB32_Premultiplied);
105
106@@ -3003,7 +3027,7 @@ void fpe_divByZero()
107
108 void fpe_steepSlopes()
109 {
110- FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO);
111+ FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO);
112
113 QImage img(1024, 1024, QImage::Format_ARGB32_Premultiplied);
114
115@@ -3022,7 +3046,7 @@ void fpe_steepSlopes()
116
117 void fpe_radialGradients()
118 {
119- FpExceptionChecker checker(FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID | FE_DIVBYZERO);
120+ FpExceptionChecker checker(QP_FE_UNDERFLOW | QP_FE_OVERFLOW | QP_FE_INVALID | QP_FE_DIVBYZERO);
121
122 QImage img(21, 21, QImage::Format_ARGB32_Premultiplied);
123 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 += "\
34 file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \ 34 file://0016-Define-QMAKE_CXX.COMPILER_MACROS-for-clang-on-linux.patch \
35 file://0017-qfloat16-check-for-__ARM_FP-2.patch \ 35 file://0017-qfloat16-check-for-__ARM_FP-2.patch \
36 file://0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch \ 36 file://0018-input-Make-use-of-timeval-portable-for-64bit-time_t.patch \
37 file://0022-tst_qpainter-FE_-macros-are-not-defined-for-every-pl.patch \
37" 38"
38 39
39# for syncqt 40# for syncqt