[Libreoffice-commits] core.git: external/skia

Thorsten Behrens (via logerrit) logerrit at kemper.freedesktop.org
Sun Apr 12 23:22:12 UTC 2020


 external/skia/fix-gcc-x86.patch.1 |   32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

New commits:
commit 4475bcd83aac7e033fc5250f268eb922bd471e7b
Author:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Mon Apr 13 00:50:40 2020 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Mon Apr 13 01:21:39 2020 +0200

    skia: make gcc not crash again for x86 builds
    
    Papered over already with a bandaid in
    c13f75de521cfb67ca4db431708f8cd366b23587, happened again after skia
    upgrade; let's now fix th eICE on CentOS7 devtoolset-7's gcc proper.
    
    It appears that this error
    
      workdir/UnpackedTarball/skia/third_party/skcms/src/Transform_inl.h:696: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) {
                   ^~~~
      workdir/UnpackedTarball/skia/third_party/skcms/skcms.cpp: At global scope:
      workdir/UnpackedTarball/skia/third_party/skcms/skcms.cpp:2645:1: internal compiler error: Segmentation fault
    
    is caused by the clut() function still inlined for gcc. Patch makes this
    go away by leaving clut() with external visibility, thus getting gcc to
    outline it. Original Google hack with __attribute__((noinline)) alone
    appears insufficient.
    
    Change-Id: I8a566994ac815ae480ef1ce1b80c4fb59bef2f92
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92094
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/external/skia/fix-gcc-x86.patch.1 b/external/skia/fix-gcc-x86.patch.1
index d63e84499505..097c59475c5b 100644
--- a/external/skia/fix-gcc-x86.patch.1
+++ b/external/skia/fix-gcc-x86.patch.1
@@ -1,20 +1,16 @@
---- 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"
+--- skia/third_party/skcms/src/Transform_inl.h   2020-04-13 00:38:56.363207994 +0200
++++ skia/third_party/skcms/src/Transform_inl.h~  2020-04-13 00:39:18.215603244 +0200
+@@ -689,11 +689,11 @@
+       && (defined(__mips64) || defined(__i386) || defined(__s390x__))
+     #define MAYBE_NOINLINE __attribute__((noinline))
  #else
-     #define SI static inline
+-    #define MAYBE_NOINLINE
++    #define MAYBE_NOINLINE static
  #endif
+ 
+ MAYBE_NOINLINE
+-static void clut(const skcms_A2B* a2b, F* r, F* g, F* b, F a) {
++void clut(const skcms_A2B* a2b, F* r, F* g, F* b, F a) {
+     const int dim = (int)a2b->input_channels;
+     assert (0 < dim && dim <= 4);
+ 


More information about the Libreoffice-commits mailing list