diff options
Diffstat (limited to 'recipes-qt/qt5/qtbase/0017-qfloat16-check-for-__ARM_FP-2.patch')
-rw-r--r-- | recipes-qt/qt5/qtbase/0017-qfloat16-check-for-__ARM_FP-2.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase/0017-qfloat16-check-for-__ARM_FP-2.patch b/recipes-qt/qt5/qtbase/0017-qfloat16-check-for-__ARM_FP-2.patch new file mode 100644 index 00000000..8411b83d --- /dev/null +++ b/recipes-qt/qt5/qtbase/0017-qfloat16-check-for-__ARM_FP-2.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From b938d809624660a2998ea7f844aba715e40acfc6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 5 Oct 2019 16:21:08 -0700 | ||
4 | Subject: [PATCH] qfloat16: check for __ARM_FP & 2 | ||
5 | |||
6 | Clang hides vcvt_f16_f32() and vcvt_f32_f16() behind (__ARM_FP & 2) where 2 refers to -mfpu=fp-armv8. | ||
7 | However, GCC would only build this code if -march=armv8.2-a+fp16 is passed as well. | ||
8 | |||
9 | global/qfloat16.cpp:149:31: error: use of undeclared identifier 'vcvt_f16_f32' | ||
10 | vst1_f16(out_f16 + i, vcvt_f16_f32(vld1q_f32(in + i))); | ||
11 | ^ | ||
12 | global/qfloat16.cpp:159:28: error: use of undeclared identifier 'vcvt_f32_f16' | ||
13 | vst1q_f32(out + i, vcvt_f32_f16(vld1_f16(in_f16 + i))); | ||
14 | ^ | ||
15 | |||
16 | Upstream-Status: Pending | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | src/corelib/global/qfloat16.cpp | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/src/corelib/global/qfloat16.cpp b/src/corelib/global/qfloat16.cpp | ||
23 | index 87ff796368..37dec371a6 100644 | ||
24 | --- a/src/corelib/global/qfloat16.cpp | ||
25 | +++ b/src/corelib/global/qfloat16.cpp | ||
26 | @@ -148,7 +148,7 @@ f16cextern void qFloatFromFloat16_fast(float *out, const quint16 *in, qsizetype | ||
27 | #undef f16cextern | ||
28 | } | ||
29 | |||
30 | -#elif defined(__ARM_FP16_FORMAT_IEEE) && defined(__ARM_NEON__) | ||
31 | +#elif defined(__ARM_FP16_FORMAT_IEEE) && defined(__ARM_NEON__) && (__ARM_FP & 2) | ||
32 | static inline bool hasFastF16() | ||
33 | { | ||
34 | return true; | ||