summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-Check-for-__ARM_FP-2-before-using-__fp16.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-02-02 23:25:58 -0800
committerMartin Jansa <Martin.Jansa@gmail.com>2019-02-14 17:40:27 +0000
commit5be2654885b3699520c4370579c929e2ce352e80 (patch)
tree3ae5a3bdf308a61dab72c2525a47a948f843d886 /recipes-qt/qt5/qtwebengine/chromium/0020-chromium-Check-for-__ARM_FP-2-before-using-__fp16.patch
parentcb1b47212659a21514553cb0a0102861a6e2299b (diff)
downloadmeta-qt5-5be2654885b3699520c4370579c929e2ce352e80.tar.gz
qtwebengine: Fix build with clang/libc++ on aarch64/arm
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/chromium/0020-chromium-Check-for-__ARM_FP-2-before-using-__fp16.patch')
-rw-r--r--recipes-qt/qt5/qtwebengine/chromium/0020-chromium-Check-for-__ARM_FP-2-before-using-__fp16.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-Check-for-__ARM_FP-2-before-using-__fp16.patch b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-Check-for-__ARM_FP-2-before-using-__fp16.patch
new file mode 100644
index 00000000..ef00025c
--- /dev/null
+++ b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-Check-for-__ARM_FP-2-before-using-__fp16.patch
@@ -0,0 +1,33 @@
1From f304341d4e0a24469575129e2f2a79a969d8ecaf Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 2 Feb 2019 22:09:20 -0800
4Subject: [PATCH 1/2] chromium: Check for __ARM_FP & 2 before using __fp16
5
6The __fp16 type denotes half-precision (16-bit) floating-point.
7The recommended way to test for this hardware support is to test bit 1 in __ARM_FP
8and
9If 16-bit floating-point is available, one of __ARM_FP16_FORMAT_IEEE and
10__ARM_FP16_FORMAT_ALTERNATIVE will be defined to indicate the format in use
11
12Upstream-Status: Pending
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h b/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h
19index 33d9e7aa39..aaefa5371a 100644
20--- a/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h
21+++ b/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h
22@@ -679,7 +679,7 @@ SI F from_half(U16 h) {
23 }
24
25 SI U16 to_half(F f) {
26-#if defined(__ARM_FP16_FORMAT_IEEE)
27+#if defined(__ARM_FP16_FORMAT_IEEE) && defined(__ARM_NEON__) && (__ARM_FP & 2)
28 __fp16 fp16 = __fp16(f);
29 U16 u16;
30 memcpy(&u16, &fp16, sizeof(U16));
31--
322.20.1
33