diff --git a/libreoffice.spec b/libreoffice.spec index 007ef8e..0d6dd61 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -86,6 +86,8 @@ Patch1: libreoffice-4.2.5-icu-49.patch Patch2: libreoffice-6.3.5.2-kde4-detection.patch # https://github.com/LibreOffice/core/commit/6fbfad6b Patch3: 6fbfad6b00e8c35346ee59cd32a0d7ccc0d8c19c.patch +# For Clang <9, GCC <10, when building with libstdc++-gcc10 +Patch4: span-old-compilers.patch # ROSA vendor patch Patch100: libreoffice-4.1-vendor.patch diff --git a/span-old-compilers.patch b/span-old-compilers.patch new file mode 100644 index 0000000..5b9ddc0 --- /dev/null +++ b/span-old-compilers.patch @@ -0,0 +1,22 @@ +In rosa2016.1, we are building LibreOffice with clang 8 and libstdc++ from GCC 10. +Seems that libstdc++-gcc-10 does have the span header, but clang 8 is not capable of std::span: +"error: no member named 'span' in namespace 'std'" +(I am not sure) +include/o3tl/span.hxx tries to use system when available and uses the built in implementation when it is not available. +This patch tricks the compiler to always use the built in implementation. + +TODO: maybe fix libstdc++-gcc10 so that it by default reports that header does not exist. + +// mikhailnov, 04.04.2020 + +--- libreoffice-6.3.5.2/include/o3tl/span.hxx.orig2 2020-04-04 17:41:58.575172521 +0300 ++++ libreoffice-6.3.5.2/include/o3tl/span.hxx 2020-04-04 18:17:09.141934433 +0300 +@@ -12,7 +12,7 @@ + + #include + +-#if __has_include() ++#if 0 + + #include +