skia: make gcc not crash for x86 builds
commitc13f75de521cfb67ca4db431708f8cd366b23587
authorThorsten Behrens <Thorsten.Behrens@CIB.de>
Sun, 29 Dec 2019 00:08:42 +0000 (29 01:08 +0100)
committerThorsten Behrens <Thorsten.Behrens@CIB.de>
Sun, 29 Dec 2019 19:39:17 +0000 (29 20:39 +0100)
tree44cc00955683fddc2c03f2ecb61942aac0abae02
parente02003390208ac80e1404a95a6c09e06bb84848f
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>
external/skia/UnpackedTarball_skia.mk
external/skia/fix-gcc-x86.patch.1 [new file with mode: 0644]