summaryrefslogtreecommitdiff
path: root/external/skia
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-01-10 12:49:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-01-11 17:32:05 +0100
commit6abd6309094ba485918d9bafe7f881bed72a10b4 (patch)
treee44b66a05204fc40ac6401985cba8c70baf1e168 /external/skia
parent836bb3f44ac729a59ff72a4425e2f4d35702c67c (diff)
Fix -Werror,-Wundef in Skia (at least for Raspberry pi 4)
Detected on Raspberry pi 4, for example: In file included from /home/pi/lo/libreoffice/vcl/skia/SkiaHelper.cxx:34: In file included from /home/pi/lo/libreoffice/vcl/inc/skia/utils.hxx:28: In file included from /home/pi/lo/libreoffice/workdir/UnpackedTarball/skia/include/core/SkRegion.h:11: In file included from /home/pi/lo/libreoffice/workdir/UnpackedTarball/skia/include/core/SkRect.h:11: In file included from /home/pi/lo/libreoffice/workdir/UnpackedTarball/skia/include/core/SkPoint.h:11: In file included from /home/pi/lo/libreoffice/workdir/UnpackedTarball/skia/include/core/SkMath.h:11: /home/pi/lo/libreoffice/workdir/UnpackedTarball/skia/include/core/SkTypes.h:371:5: error: 'SK_CPU_SSE_LEVEL' is not defined, evaluates to 0 [-Werror,-Wundef] if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 ^ ... but there are others, see: http://document-foundation-mail-archive.969070.n3.nabble.com/Building-LO-on-Raspberry-pi-4b-error-unknown-attribute-externally-visible-on-jni-part-tt4293505.html Since it may happen on some other envs and it can't be bad to explicitely initialize this preproc var, it seems relevant to use this patch unconditionally. Change-Id: Icc5794fcd3139cbdbd8d57a6938d31aee51a3e2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109047 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external/skia')
-rw-r--r--external/skia/UnpackedTarball_skia.mk1
-rw-r--r--external/skia/skia_sk_cpu_sse_level_0_by_default.patch.115
2 files changed, 16 insertions, 0 deletions
diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk
index 946750730edb..0da268a17406 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -38,6 +38,7 @@ skia_patches := \
swap-buffers-rect.patch.1 \
ubsan.patch.0 \
fast-png-write.patch.1 \
+ skia_sk_cpu_sse_level_0_by_default.patch.1 \
$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
diff --git a/external/skia/skia_sk_cpu_sse_level_0_by_default.patch.1 b/external/skia/skia_sk_cpu_sse_level_0_by_default.patch.1
new file mode 100644
index 000000000000..f2259a318544
--- /dev/null
+++ b/external/skia/skia_sk_cpu_sse_level_0_by_default.patch.1
@@ -0,0 +1,15 @@
+diff -ur skia.org/include/core/SkTypes.h skia/include/core/SkTypes.h
+--- skia.org/include/core/SkTypes.h 2021-01-10 12:37:19.016176437 +0100
++++ skia/include/core/SkTypes.h 2021-01-10 12:43:29.155312067 +0100
+@@ -153,6 +153,11 @@
+ #endif
+ #endif
+
++// So let's initialize SK_CPU_SSE_LEVEL to 0 by default
++#ifndef SK_CPU_SSE_LEVEL
++ #define SK_CPU_SSE_LEVEL 0
++#endif
++
+ // ARM defines
+ #if defined(__arm__) && (!defined(__APPLE__) || !TARGET_IPHONE_SIMULATOR)
+ #define SK_CPU_ARM32