mozilla-gcc-internal-compiler-error.patch
branchfirefox68
changeset 1097 840132a4a9b3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mozilla-gcc-internal-compiler-error.patch	Wed Jul 10 08:14:34 2019 +0200
@@ -0,0 +1,29 @@
+# HG changeset patch
+# User Wolfgang Rosenauer <wr@rosenauer.org>
+# Parent  88217eaa8804fc699c02411b1b5377ef7eb5d2db
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90756
+https://bugzilla.mozilla.org/show_bug.cgi?id=1562886
+
+diff --git a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
+--- a/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
++++ b/gfx/skia/skia/third_party/skcms/src/Transform_inl.h
+@@ -554,17 +554,18 @@ SI void sample_clut_16(const skcms_A2B* 
+     *r = cast<F>((rgb >>  0) & 0xffff) * (1/65535.0f);
+     *g = cast<F>((rgb >> 16) & 0xffff) * (1/65535.0f);
+     *b = cast<F>((rgb >> 32) & 0xffff) * (1/65535.0f);
+ #endif
+ }
+ 
+ // GCC 7.2.0 hits an internal compiler error with -finline-functions (or -O3)
+ // when targeting MIPS 64,  I think attempting to inline clut() into exec_ops().
+-#if 1 && defined(__GNUC__) && !defined(__clang__) && defined(__mips64)
++// s390x and i*86 also hit this with GCC 7.4 and -O2
++#if 1 && defined(__GNUC__) && !defined(__clang__) && ( defined(__mips64) || defined(__s390x__) || defined( __i586__ ) || defined( __i486__ ) || defined( __i386__ ))
+     #define MAYBE_NOINLINE __attribute__((noinline))
+ #else
+     #define MAYBE_NOINLINE
+ #endif
+ 
+ MAYBE_NOINLINE
+ static void clut(const skcms_A2B* a2b, F* r, F* g, F* b, F a) {
+     const int dim = (int)a2b->input_channels;