summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtbase/0019-qendian-Adding-Q_DECL_CONSTEXPR-to-float-conversion-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-qt/qt5/qtbase/0019-qendian-Adding-Q_DECL_CONSTEXPR-to-float-conversion-.patch')
-rw-r--r--recipes-qt/qt5/qtbase/0019-qendian-Adding-Q_DECL_CONSTEXPR-to-float-conversion-.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase/0019-qendian-Adding-Q_DECL_CONSTEXPR-to-float-conversion-.patch b/recipes-qt/qt5/qtbase/0019-qendian-Adding-Q_DECL_CONSTEXPR-to-float-conversion-.patch
new file mode 100644
index 00000000..42c3d2fb
--- /dev/null
+++ b/recipes-qt/qt5/qtbase/0019-qendian-Adding-Q_DECL_CONSTEXPR-to-float-conversion-.patch
@@ -0,0 +1,49 @@
1From c10b4df78f56f4ad3db563fe73d0ebece3e5284c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 24 Dec 2018 00:05:06 -0800
4Subject: [PATCH] qendian: Adding Q_DECL_CONSTEXPR to float conversion
5 specializations
6
7This fixes build failures seen with gcc 4.8
8Fixes https://bugreports.qt.io/browse/QTBUG-71945
9
10Upstream-Status: Pending
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/corelib/global/qendian.h | 8 ++++----
14 1 file changed, 4 insertions(+), 4 deletions(-)
15
16diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
17index 0e67a1ab8e..75f109f26c 100644
18--- a/src/corelib/global/qendian.h
19+++ b/src/corelib/global/qendian.h
20@@ -153,7 +153,7 @@ template <> inline Q_DECL_CONSTEXPR qint8 qbswap<qint8>(qint8 source)
21 }
22
23 // floating specializations
24-template<typename Float>
25+template<typename Float> Q_DECL_CONSTEXPR
26 Float qbswapFloatHelper(Float source)
27 {
28 // memcpy call in qFromUnaligned is recognized by optimizer as a correct way of type prunning
29@@ -162,17 +162,17 @@ Float qbswapFloatHelper(Float source)
30 return qFromUnaligned<Float>(&temp);
31 }
32
33-template <> inline qfloat16 qbswap<qfloat16>(qfloat16 source)
34+template <> inline Q_DECL_CONSTEXPR qfloat16 qbswap<qfloat16>(qfloat16 source)
35 {
36 return qbswapFloatHelper(source);
37 }
38
39-template <> inline float qbswap<float>(float source)
40+template <> inline Q_DECL_CONSTEXPR float qbswap<float>(float source)
41 {
42 return qbswapFloatHelper(source);
43 }
44
45-template <> inline double qbswap<double>(double source)
46+template <> inline Q_DECL_CONSTEXPR double qbswap<double>(double source)
47 {
48 return qbswapFloatHelper(source);
49 }