summaryrefslogtreecommitdiff
path: root/external/skia
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2019-12-29 01:08:42 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-12-29 20:39:17 +0100
commitc13f75de521cfb67ca4db431708f8cd366b23587 (patch)
tree44cc00955683fddc2c03f2ecb61942aac0abae02 /external/skia
parente02003390208ac80e1404a95a6c09e06bb84848f (diff)
skia: make gcc not crash for x86 builds
Otherwise at least on x86, gcc bails out with an ICE: skia/third_party/skcms/src/Transform_inl.h: In function ‘void baseline::clut(const skcms_A2B*, baseline::F*, baseline::F*, baseline::F*, baseline::F)’: skia/third_party/skcms/src/Transform_inl.h:695:13: note: The ABI for passing parameters with 16-byte alignment has changed in GCC 4.6 static void clut(const skcms_A2B* a2b, F* r, F* g, F* b, F a) { ^~~~ skia/third_party/skcms/skcms.cpp: At global scope: skia/third_party/skcms/skcms.cpp:2613:1: internal compiler error: Segmentation fault } ^ Likely reason: optimizer stumbles over F being non-register-passable, c.f. https://stackoverflow.com/questions/39383193/compiling-legacy-gcc-code-with-avx-vector-warnings Fix is an obvious bandaid, but fixes build for CentOS7 devtoolset-7. I suspect though that non-avx/sse2 builds are not a supported scenario for skia, in the end... Change-Id: Iaff734de8dc8b9a6fbf868c13810074f9667720b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85933 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'external/skia')
-rw-r--r--external/skia/UnpackedTarball_skia.mk1
-rw-r--r--external/skia/fix-gcc-x86.patch.120
2 files changed, 21 insertions, 0 deletions
diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk
index 64bfe5e2e76e..e050b9832d6b 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -25,6 +25,7 @@ skia_patches := \
Wdeprecated-copy.patch.0 \
Wdeprecated-copy-dtor.patch.0 \
fix-msvc.patch.1 \
+ fix-gcc-x86.patch.1 \
$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
diff --git a/external/skia/fix-gcc-x86.patch.1 b/external/skia/fix-gcc-x86.patch.1
new file mode 100644
index 000000000000..d63e84499505
--- /dev/null
+++ b/external/skia/fix-gcc-x86.patch.1
@@ -0,0 +1,20 @@
+--- skia/third_party/skcms/skcms.cc 2019-12-28 22:39:17.886442654 +0000
++++ skia/third_party/skcms/skcms.cc~ 2019-12-28 22:34:34.486843710 +0000
+@@ -2051,6 +2051,7 @@
+ #define N 4
+ template <typename T> using V = Vec<N,T>;
+ using Color = float;
++ #pragma message "Fallback to float color"
+ #endif
+
+ #include "src/Transform_inl.h"
+--- skia/third_party/skcms/src/Transform_inl.h 2019-12-28 22:38:41.739366565 +0000
++++ skia/third_party/skcms/src/Transform_inl.h~ 2019-12-28 22:37:41.087942963 +0000
+@@ -85,6 +85,7 @@
+ // It helps codegen to call __builtin_memcpy() when we know the byte count at compile time.
+ #if defined(__clang__) || defined(__GNUC__)
+ #define SI static inline __attribute__((always_inline))
++ #pragma message "Forcing always_inline attribute for gcc"
+ #else
+ #define SI static inline
+ #endif