aboutsummaryrefslogtreecommitdiff
path: root/editors/libreoffice/files
diff options
context:
space:
mode:
Diffstat (limited to 'editors/libreoffice/files')
-rw-r--r--editors/libreoffice/files/patch-aarch64-gcc3_linux_aarch64274
-rw-r--r--editors/libreoffice/files/patch-bridges_source_cpp__uno_gcc3__linux__aarch64_cpp2uno.cxx22
-rw-r--r--editors/libreoffice/files/patch-configure.aarch6414
-rw-r--r--editors/libreoffice/files/patch-cxa_exception98
-rw-r--r--editors/libreoffice/files/patch-python382114
-rw-r--r--editors/libreoffice/files/patch-sc_source_core_opencl_formulagroupcl.cxx (renamed from editors/libreoffice/files/patch-clang10)187
-rw-r--r--editors/libreoffice/files/patch-solenv_gbuild_platform_FREEBSD__AARCH64__GCC.mk17
-rw-r--r--editors/libreoffice/files/patch-vcl_qt5_Qt5Instance.cxx11
-rw-r--r--editors/libreoffice/files/patch-vcl_source_app_salplug.cxx19
-rw-r--r--editors/libreoffice/files/patch-vcl_unx_generic_app_geninst.cxx23
-rw-r--r--editors/libreoffice/files/patch-vcl_unx_kde5_kde5salinstance.cxx23
11 files changed, 585 insertions, 217 deletions
diff --git a/editors/libreoffice/files/patch-aarch64-gcc3_linux_aarch64 b/editors/libreoffice/files/patch-aarch64-gcc3_linux_aarch64
new file mode 100644
index 000000000000..22c7d9bf4326
--- /dev/null
+++ b/editors/libreoffice/files/patch-aarch64-gcc3_linux_aarch64
@@ -0,0 +1,274 @@
+From 189d498f5c0c633f8cd87b3f1b6d57020371a952 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman@redhat.com>
+Date: Tue, 17 Dec 2019 23:33:28 +0100
+Subject: [PATCH] tdf#128671: Rely on unwind.h, declare what's missing from
+ cxxabi.h
+
+...for gcc3_linux_aarch64, similar to what
+128deeae81a6f802bfb79b8f0fa8c4b10729f7db "cxxabi.h is not specific to GCC" et al
+did for gcc3_linux_x86-64
+
+Change-Id: Iee9980842c0e5f6f49642407339a67e865f8be9c
+Reviewed-on: https://gerrit.libreoffice.org/85344
+Tested-by: Jenkins
+Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
+---
+ .../source/cpp_uno/gcc3_linux_aarch64/abi.cxx | 7 +-
+ .../source/cpp_uno/gcc3_linux_aarch64/abi.hxx | 117 +++++++++++++-----
+ .../cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx | 4 +-
+ 3 files changed, 92 insertions(+), 36 deletions(-)
+
+diff --git bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
+index 938011a09a2e..892bf6e81963 100644
+--- bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
++++ bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
+@@ -24,7 +24,6 @@
+ #include <cstring>
+ #include <typeinfo>
+
+-#include <cxxabi.h>
+ #include <dlfcn.h>
+
+ #include <com/sun/star/uno/RuntimeException.hpp>
+@@ -135,8 +134,8 @@ std::type_info * getRtti(typelib_TypeDescription const & type) {
+ }
+
+ extern "C" void _GLIBCXX_CDTOR_CALLABI deleteException(void * exception) {
+- abi_aarch64::__cxa_exception * header =
+- static_cast<abi_aarch64::__cxa_exception *>(exception) - 1;
++ __cxxabiv1::__cxa_exception * header =
++ static_cast<__cxxabiv1::__cxa_exception *>(exception) - 1;
+ OUString unoName(toUnoName(header->exceptionType->name()));
+ typelib_TypeDescription * td = 0;
+ typelib_typedescription_getByName(&td, unoName.pData);
+@@ -224,7 +223,7 @@ StructKind getStructKind(typelib_CompoundTypeDescription const * type) {
+ namespace abi_aarch64 {
+
+ void mapException(
+- __cxa_exception * exception, std::type_info const * type, uno_Any * any, uno_Mapping * mapping)
++ __cxxabiv1::__cxa_exception * exception, std::type_info const * type, uno_Any * any, uno_Mapping * mapping)
+ {
+ assert(exception != 0);
+ assert(type != nullptr);
+diff --git bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx
+index 50c5f1f21a37..e3dc9b5872a7 100644
+--- bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx
++++ bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx
+@@ -22,55 +22,114 @@
+
+ #include <sal/config.h>
+
++#include <cstddef>
+ #include <exception>
+ #include <typeinfo>
+
++#include <cxxabi.h>
++#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
++#define _GLIBCXX_CDTOR_CALLABI
++#endif
++#include <unwind.h>
++
++#include <config_cxxabi.h>
+ #include <typelib/typedescription.h>
+ #include <uno/any2.h>
+ #include <uno/mapping.h>
+
+-namespace abi_aarch64 {
+-
+-// Following declarations from libstdc++-v3/libsupc++/unwind-cxx.h and
+-// lib/gcc/*-*-*/*/include/unwind.h:
+-
+-struct _Unwind_Exception
+-{
+- unsigned exception_class __attribute__((__mode__(__DI__)));
+- void * exception_cleanup;
+- unsigned private_1 __attribute__((__mode__(__word__)));
+- unsigned private_2 __attribute__((__mode__(__word__)));
+-} __attribute__((__aligned__));
++#if !HAVE_CXXABI_H_CLASS_TYPE_INFO
++// <https://mentorembedded.github.io/cxx-abi/abi.html>,
++// libstdc++-v3/libsupc++/cxxabi.h:
++namespace __cxxabiv1 {
++class __class_type_info: public std::type_info {
++public:
++ explicit __class_type_info(char const * n): type_info(n) {}
++ ~__class_type_info() override;
++};
++}
++#endif
+
+-struct __cxa_exception
+-{
+- std::type_info *exceptionType;
+- void (*exceptionDestructor)(void *);
++#if !HAVE_CXXABI_H_SI_CLASS_TYPE_INFO
++// <https://mentorembedded.github.io/cxx-abi/abi.html>,
++// libstdc++-v3/libsupc++/cxxabi.h:
++namespace __cxxabiv1 {
++class __si_class_type_info: public __class_type_info {
++public:
++ __class_type_info const * __base_type;
++ explicit __si_class_type_info(
++ char const * n, __class_type_info const *base):
++ __class_type_info(n), __base_type(base) {}
++ ~__si_class_type_info() override;
++};
++}
++#endif
+
++#if !HAVE_CXXABI_H_CXA_EXCEPTION
++// <https://mentorembedded.github.io/cxx-abi/abi-eh.html>,
++// libcxxabi/src/cxa_exception.hpp:
++namespace __cxxabiv1 {
++struct __cxa_exception {
++#if defined _LIBCPPABI_VERSION // detect libc++abi
++#if defined __LP64__ || LIBCXXABI_ARM_EHABI
++ std::size_t referenceCount;
++#endif
++#endif
++ std::type_info * exceptionType;
++ void (* exceptionDestructor)(void *);
+ void (*unexpectedHandler)(); // std::unexpected_handler dropped from C++17
+ std::terminate_handler terminateHandler;
+-
+- __cxa_exception *nextException;
+-
++ __cxa_exception * nextException;
+ int handlerCount;
+-
+ int handlerSwitchValue;
+- const unsigned char *actionRecord;
+- const unsigned char *languageSpecificData;
+- void *catchTemp;
+- void *adjustedPtr;
+-
++ char const * actionRecord;
++ char const * languageSpecificData;
++ void * catchTemp;
++ void * adjustedPtr;
+ _Unwind_Exception unwindHeader;
+ };
++}
++#endif
+
+-struct __cxa_eh_globals
+-{
+- __cxa_exception *caughtExceptions;
++#if !HAVE_CXXABI_H_CXA_EH_GLOBALS
++// <https://mentorembedded.github.io/cxx-abi/abi-eh.html>:
++namespace __cxxabiv1 {
++struct __cxa_eh_globals {
++ __cxa_exception * caughtExceptions;
+ unsigned int uncaughtExceptions;
+ };
++}
++#endif
++
++#if !HAVE_CXXABI_H_CXA_GET_GLOBALS
++namespace __cxxabiv1 {
++extern "C" __cxa_eh_globals * __cxa_get_globals() throw();
++}
++#endif
++
++#if !HAVE_CXXABI_H_CXA_CURRENT_EXCEPTION_TYPE
++namespace __cxxabiv1 {
++extern "C" std::type_info *__cxa_current_exception_type() throw();
++}
++#endif
++
++#if !HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION
++namespace __cxxabiv1 {
++extern "C" void * __cxa_allocate_exception(std::size_t thrown_size) throw();
++}
++#endif
++
++#if !HAVE_CXXABI_H_CXA_THROW
++namespace __cxxabiv1 {
++extern "C" void __cxa_throw(
++ void * thrown_exception, void * tinfo, void (* dest)(void *))
++ __attribute__((noreturn));
++}
++#endif
++
++namespace abi_aarch64 {
+
+ void mapException(
+- __cxa_exception * exception, std::type_info const * type, uno_Any * any, uno_Mapping * mapping);
++ __cxxabiv1::__cxa_exception * exception, std::type_info const * type, uno_Any * any, uno_Mapping * mapping);
+
+ void raiseException(uno_Any * any, uno_Mapping * mapping);
+
+diff --git bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx
+index f03d848521cc..0847dfc76db5 100644
+--- bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx
++++ bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx
+@@ -24,8 +24,6 @@
+ #include <exception>
+ #include <typeinfo>
+
+-#include <cxxabi.h>
+-
+ #include <bridge.hxx>
+ #include <types.hxx>
+ #include <unointerfaceproxy.hxx>
+@@ -190,7 +188,7 @@ void call(
+ }
+ } catch (css::uno::Exception &) {
+ abi_aarch64::mapException(
+- reinterpret_cast<abi_aarch64::__cxa_eh_globals *>(
++ reinterpret_cast<__cxxabiv1::__cxa_eh_globals *>(
+ __cxxabiv1::__cxa_get_globals())->caughtExceptions,
+ __cxxabiv1::__cxa_current_exception_type(), *exception,
+ proxy->getBridge()->getCpp2Uno());
+From a7d1fed24557b203acb5016a98af26f4ef24d27a Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman@redhat.com>
+Date: Tue, 11 Feb 2020 15:46:45 +0100
+Subject: [PATCH] Hack to dynamically adapt to __cxa_exceptiom in LLVM 5.0
+ libcxxabi
+
+...for Linux aarch64, similar to 7a9dd3d482deeeb3ed1d50074e56adbd3f928296 "Hack
+to dynamically adapt to __cxa_exceptiom in LLVM 5.0 libcxxabi" for macOS x86-64.
+But unlike on macOS (which is known to always use libcxxabi), be careful to only
+execute the hack in builds targeting libcxxabi.
+
+Change-Id: I5417fde425d2d6bac9400592193a9fe5d2bfe175
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88458
+Tested-by: Jenkins
+Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
+---
+ .../source/cpp_uno/gcc3_linux_aarch64/abi.cxx | 22 +++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
+index 892bf6e81963..611442a31e31 100644
+--- bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
++++ bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
+@@ -136,6 +136,28 @@ std::type_info * getRtti(typelib_TypeDescription const & type) {
+ extern "C" void _GLIBCXX_CDTOR_CALLABI deleteException(void * exception) {
+ __cxxabiv1::__cxa_exception * header =
+ static_cast<__cxxabiv1::__cxa_exception *>(exception) - 1;
++#if defined _LIBCPPABI_VERSION // detect libc++abi
++ // The libcxxabi commit
++ // <http://llvm.org/viewvc/llvm-project?view=revision&revision=303175>
++ // "[libcxxabi] Align unwindHeader on a double-word boundary" towards
++ // LLVM 5.0 changed the size of __cxa_exception by adding
++ //
++ // __attribute__((aligned))
++ //
++ // to the final member unwindHeader, on x86-64 effectively adding a hole of
++ // size 8 in front of that member (changing its offset from 88 to 96,
++ // sizeof(__cxa_exception) from 120 to 128, and alignof(__cxa_exception)
++ // from 8 to 16); a hack to dynamically determine whether we run against a
++ // new libcxxabi is to look at the exceptionDestructor member, which must
++ // point to this function (the use of __cxa_exception in fillUnoException is
++ // unaffected, as it only accesses members towards the start of the struct,
++ // through a pointer known to actually point at the start):
++ if (header->exceptionDestructor != &deleteException) {
++ header = reinterpret_cast<__cxa_exception const *>(
++ reinterpret_cast<char const *>(header) - 8);
++ assert(header->exceptionDestructor == &deleteException);
++ }
++#endif
+ OUString unoName(toUnoName(header->exceptionType->name()));
+ typelib_TypeDescription * td = 0;
+ typelib_typedescription_getByName(&td, unoName.pData);
diff --git a/editors/libreoffice/files/patch-bridges_source_cpp__uno_gcc3__linux__aarch64_cpp2uno.cxx b/editors/libreoffice/files/patch-bridges_source_cpp__uno_gcc3__linux__aarch64_cpp2uno.cxx
new file mode 100644
index 000000000000..1f841530d63f
--- /dev/null
+++ b/editors/libreoffice/files/patch-bridges_source_cpp__uno_gcc3__linux__aarch64_cpp2uno.cxx
@@ -0,0 +1,22 @@
+--- bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx.orig 2020-03-11 17:18:35 UTC
++++ bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx
+@@ -321,9 +321,16 @@ extern "C" void vtableSlotCall(
+ double fpr2, double fpr3, double fpr4, double fpr5, double fpr6,
+ double fpr7, ...)
+ {
+- register void * volatile indirectRet asm ("x8");
+- register sal_Int32 volatile functionIndex asm ("x9");
+- register sal_Int32 volatile vtableOffset asm ("x10");
++ void * volatile indirectRet;
++ sal_Int32 volatile functionIndex, vtableOffset;
++
++ asm volatile(
++ "mov %0, x8\n"
++ "mov %1, x9\n"
++ "mov %2, x10\n"
++ : "=r" (indirectRet), "=r" (functionIndex), "=r" (vtableOffset)
++ ::);
++
+ va_list ap;
+ va_start(ap, fpr7);
+ assert(sizeof (va_list) == sizeof (aarch64_va_list));
diff --git a/editors/libreoffice/files/patch-configure.aarch64 b/editors/libreoffice/files/patch-configure.aarch64
new file mode 100644
index 000000000000..37aa487ce423
--- /dev/null
+++ b/editors/libreoffice/files/patch-configure.aarch64
@@ -0,0 +1,14 @@
+--- configure.orig 2020-04-06 14:49:31.976007000 +0200
++++ configure 2020-04-06 14:50:04.326755000 +0200
+@@ -12532,6 +12532,11 @@ freebsd*)
+ RTL_ARCH=X86_64
+ PLATFORMID=freebsd_x86_64
+ ;;
++ aarch64)
++ CPUNAME=AARCH64
++ PLATFORMID=freebsd_aarch64
++ RTL_ARCH=AARCH64
++ ;;
+ *)
+ as_fn_error $? "Unsupported host_cpu $host_cpu for host_os $host_os" "$LINENO" 5
+ ;;
diff --git a/editors/libreoffice/files/patch-cxa_exception b/editors/libreoffice/files/patch-cxa_exception
new file mode 100644
index 000000000000..007d8f0a6192
--- /dev/null
+++ b/editors/libreoffice/files/patch-cxa_exception
@@ -0,0 +1,98 @@
+From 97d736d27435fb26d5609000f77bd79ece08572e Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman@redhat.com>
+Date: Wed, 18 Dec 2019 10:59:46 +0100
+Subject: [PATCH] Fix typos concerning the __cxa_exception check
+
+...introduced with 069506bcb0ee4005b01c22095ed427b96b553c98 "Use config_cxxabi.h
+to check for __cxa_eh_globals, __cxa_exception", but which appear to have been
+harmless as (a) the checked-for __cxxabiv1::__cxa_exceptions never existed in
+cxxabi.h, and (b) lack of __cxxabiv1::__cxa_exception in cxxabi.h happened to
+conincide with !HAVE_CXXABI_H_CXA_EH_GLOBALS
+
+Change-Id: I13f8a2b3cf0f03f2bc96cf053d2b571860055978
+Reviewed-on: https://gerrit.libreoffice.org/85373
+Tested-by: Jenkins
+Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
+---
+ bridges/source/cpp_uno/gcc3_linux_arm/share.hxx | 2 +-
+ bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx | 2 +-
+ configure.ac | 6 +++---
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git bridges/source/cpp_uno/gcc3_linux_arm/share.hxx bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
+index ac380969e21b..0faa612d92fd 100644
+--- bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
++++ bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
+@@ -60,7 +60,7 @@ public:
+ }
+ #endif
+
+-#if !HAVE_CXXABI_H_CXA_EH_GLOBALS
++#if !HAVE_CXXABI_H_CXA_EXCEPTION
+ namespace __cxxabiv1 {
+ struct __cxa_exception
+ {
+diff --git bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+index 864173470476..e8afe35c4f59 100644
+--- bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
++++ bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+@@ -101,7 +101,7 @@ public:
+ }
+ #endif
+
+-#if !HAVE_CXXABI_H_CXA_EH_GLOBALS
++#if !HAVE_CXXABI_H_CXA_EXCEPTION
+ // <https://mentorembedded.github.io/cxx-abi/abi-eh.html>,
+ // libcxxabi/src/cxa_exception.hpp:
+ namespace __cxxabiv1 {
+diff --git configure.ac configure.ac
+index ba5e87ea1641..ad246a64f37a 100644
+--- configure.ac
++++ configure.ac
+@@ -6312,14 +6312,14 @@ if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
+ ], [AC_MSG_RESULT([no])])
+ AC_LANG_POP([C++])
+
+- AC_MSG_CHECKING([whether $CXX_BASE defines __cxa_exceptions in cxxabi.h])
++ AC_MSG_CHECKING([whether $CXX_BASE defines __cxa_exception in cxxabi.h])
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+ #include <cstddef>
+ #include <cxxabi.h>
+- std::size_t f() { return sizeof(__cxxabiv1::__cxa_exceptions); }
++ std::size_t f() { return sizeof(__cxxabiv1::__cxa_exception); }
+ ])], [
+- AC_DEFINE([HAVE_CXXABI_H_CXA_EXCEPTIONS],[1])
++ AC_DEFINE([HAVE_CXXABI_H_CXA_EXCEPTION],[1])
+ AC_MSG_RESULT([yes])
+ ], [AC_MSG_RESULT([no])])
+ AC_LANG_POP([C++])
+
+--- configure.orig 2020-04-09 11:53:22.480526000 +0200
++++ configure 2020-04-09 11:57:59.716479000 +0200
+@@ -17682,8 +17692,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX_BASE defines __cxa_exceptions in cxxabi.h" >&5
+-$as_echo_n "checking whether $CXX_BASE defines __cxa_exceptions in cxxabi.h... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX_BASE defines __cxa_exception in cxxabi.h" >&5
++$as_echo_n "checking whether $CXX_BASE defines __cxa_exception in cxxabi.h... " >&6; }
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -17695,12 +17705,12 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ #include <cstddef>
+ #include <cxxabi.h>
+- std::size_t f() { return sizeof(__cxxabiv1::__cxa_exceptions); }
++ std::size_t f() { return sizeof(__cxxabiv1::__cxa_exception); }
+
+ _ACEOF
+ if ac_fn_cxx_try_compile "$LINENO"; then :
+
+- $as_echo "#define HAVE_CXXABI_H_CXA_EXCEPTIONS 1" >>confdefs.h
++ $as_echo "#define HAVE_CXXABI_H_CXA_EXCEPTION 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
diff --git a/editors/libreoffice/files/patch-python382 b/editors/libreoffice/files/patch-python382
new file mode 100644
index 000000000000..097431c21465
--- /dev/null
+++ b/editors/libreoffice/files/patch-python382
@@ -0,0 +1,114 @@
+From 50ccb7e82b7053306721cbe220323be072306a29 Mon Sep 17 00:00:00 2001
+From: Justin Luth <justin_luth@sil.org>
+Date: Sat, 22 Feb 2020 07:30:15 +0300
+Subject: python 3.8.2 compile: add tp_print to PyTypeObject
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+I couldn't find this documented on the Internet though,
+as the 3.9 and 3.8.2rc documentation didn't mention it
+as an added item...
+
+I'm using Ubuntu 20.04 alpha with python3 --version
+Python 3.8.2rc1
+
+This fixes pyuno/source/module/pyuno.cxx:1689:1: error:
+missing initializer for member ‘_typeobject::tp_print’
+[-Werror=missing-field-initializers]
+
+Change-Id: Idec5720050572b34628267cd94557dabf7edbf3c
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89247
+Tested-by: Jenkins
+Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
+---
+ pyuno/source/module/pyuno.cxx | 3 +++
+ pyuno/source/module/pyuno_callable.cxx | 3 +++
+ pyuno/source/module/pyuno_iterator.cxx | 6 ++++++
+ pyuno/source/module/pyuno_runtime.cxx | 3 +++
+ pyuno/source/module/pyuno_struct.cxx | 3 +++
+ 5 files changed, 18 insertions(+)
+
+diff --git pyuno/source/module/pyuno.cxx pyuno/source/module/pyuno.cxx
+index a6a875addc46..bf6e5c667b7c 100644
+--- pyuno/source/module/pyuno.cxx
++++ pyuno/source/module/pyuno.cxx
+@@ -1684,6 +1684,9 @@ static PyTypeObject PyUNOType =
+ , nullptr
+ #if PY_VERSION_HEX >= 0x03080000
+ , nullptr // vectorcallfunc tp_vectorcall
++#if PY_VERSION_HEX >= 0x03080200
++ , 0 //Py_ssize_t tp_print
++#endif
+ #endif
+ #endif
+ };
+diff --git pyuno/source/module/pyuno_callable.cxx pyuno/source/module/pyuno_callable.cxx
+index 9be3e1f1aef8..4803a30f814d 100644
+--- pyuno/source/module/pyuno_callable.cxx
++++ pyuno/source/module/pyuno_callable.cxx
+@@ -235,6 +235,9 @@ static PyTypeObject PyUNO_callable_Type =
+ , nullptr
+ #if PY_VERSION_HEX >= 0x03080000
+ , nullptr // vectorcallfunc tp_vectorcall
++#if PY_VERSION_HEX >= 0x03080200
++ , 0 //Py_ssize_t tp_print
++#endif
+ #endif
+ #endif
+ };
+diff --git pyuno/source/module/pyuno_iterator.cxx pyuno/source/module/pyuno_iterator.cxx
+index a7862857d719..6ba7f96a9632 100644
+--- pyuno/source/module/pyuno_iterator.cxx
++++ pyuno/source/module/pyuno_iterator.cxx
+@@ -168,6 +168,9 @@ static PyTypeObject PyUNO_iterator_Type =
+ , nullptr
+ #if PY_VERSION_HEX >= 0x03080000
+ , nullptr // vectorcallfunc tp_vectorcall
++#if PY_VERSION_HEX >= 0x03080200
++ , 0 //Py_ssize_t tp_print
++#endif
+ #endif
+ #endif
+ };
+@@ -305,6 +308,9 @@ static PyTypeObject PyUNO_list_iterator_Type =
+ , nullptr
+ #if PY_VERSION_HEX >= 0x03080000
+ , nullptr // vectorcallfunc tp_vectorcall
++#if PY_VERSION_HEX >= 0x03080200
++ , 0 //Py_ssize_t tp_print
++#endif
+ #endif
+ #endif
+ };
+diff --git pyuno/source/module/pyuno_runtime.cxx pyuno/source/module/pyuno_runtime.cxx
+index 823355a900da..5182f57ab201 100644
+--- pyuno/source/module/pyuno_runtime.cxx
++++ pyuno/source/module/pyuno_runtime.cxx
+@@ -126,6 +126,9 @@ static PyTypeObject RuntimeImpl_Type =
+ , nullptr
+ #if PY_VERSION_HEX >= 0x03080000
+ , nullptr // vectorcallfunc tp_vectorcall
++#if PY_VERSION_HEX >= 0x03080200
++ , 0 //Py_ssize_t tp_print
++#endif
+ #endif
+ #endif
+ };
+diff --git pyuno/source/module/pyuno_struct.cxx pyuno/source/module/pyuno_struct.cxx
+index 50b74126bee9..56b71cdf5cc4 100644
+--- pyuno/source/module/pyuno_struct.cxx
++++ pyuno/source/module/pyuno_struct.cxx
+@@ -347,6 +347,9 @@ static PyTypeObject PyUNOStructType =
+ , nullptr
+ #if PY_VERSION_HEX >= 0x03080000
+ , nullptr // vectorcallfunc tp_vectorcall
++#if PY_VERSION_HEX >= 0x03080200
++ , 0 //Py_ssize_t tp_print
++#endif
+ #endif
+ #endif
+ };
+--
+cgit v1.2.1
+
diff --git a/editors/libreoffice/files/patch-clang10 b/editors/libreoffice/files/patch-sc_source_core_opencl_formulagroupcl.cxx
index ae24b2160029..d995f1d25eb7 100644
--- a/editors/libreoffice/files/patch-clang10
+++ b/editors/libreoffice/files/patch-sc_source_core_opencl_formulagroupcl.cxx
@@ -1,168 +1,18 @@
---- vcl/inc/unx/saltype.h 2019-12-05 20:59:23.000000000 +0100
-+++ vcl/inc/unx/saltype.h 2020-03-17 18:23:05.585171000 +0100
-@@ -18,8 +18,8 @@
- public:
- explicit SalX11Screen(unsigned int nXScreen) : mnXScreen( nXScreen ) {}
- unsigned int getXScreen() const { return mnXScreen; }
-- bool operator==(const SalX11Screen &rOther) { return rOther.mnXScreen == mnXScreen; }
-- bool operator!=(const SalX11Screen &rOther) { return rOther.mnXScreen != mnXScreen; }
-+ bool operator==(const SalX11Screen &rOther) const { return rOther.mnXScreen == mnXScreen; }
-+ bool operator!=(const SalX11Screen &rOther) const { return rOther.mnXScreen != mnXScreen; }
- };
-
- #endif // INCLUDED_VCL_INC_UNX_SALTYPE_H
---- sd/source/ui/framework/factories/BasicPaneFactory.cxx 2019-12-05 20:59:23.000000000 +0100
-+++ sd/source/ui/framework/factories/BasicPaneFactory.cxx 2020-03-17 20:51:22.331805000 +0100
-@@ -324,7 +324,7 @@
- void SAL_CALL BasicPaneFactory::disposing (
- const lang::EventObject& rEventObject)
- {
-- if (mxConfigurationControllerWeak == rEventObject.Source)
-+ if (mxConfigurationControllerWeak.get() == rEventObject.Source)
- {
- mxConfigurationControllerWeak.clear();
- }
---- sd/inc/OutlinerIterator.hxx 2019-12-05 20:59:23.000000000 +0100
-+++ sd/inc/OutlinerIterator.hxx 2020-03-17 21:20:36.906085000 +0100
-@@ -122,7 +122,7 @@
- @return
- Returns <TRUE/> when both iterators point to the same object.
- */
-- bool operator== (const Iterator& rIterator);
-+ bool operator== (const Iterator& rIterator) const;
- /** Test whether two iterators point to different objects. This is just
- the negation of the result of the equality operator.
- @param rIterator
-@@ -130,7 +130,7 @@
- @return
- Returns <TRUE/> when both iterators point to the different objects.
- */
-- bool operator!= (const Iterator& rIterator);
-+ bool operator!= (const Iterator& rIterator) const;
- /** Reverse the direction of iteration. The position of the iterator is
- not changed. Thus calling this method twice returns to the old state.
- */
---- sd/source/ui/view/OutlinerIterator.cxx.orig 2019-12-05 20:59:23.000000000 +0100
-+++ sd/source/ui/view/OutlinerIterator.cxx 2020-03-17 21:24:11.082383000 +0100
-@@ -110,7 +110,7 @@
- return *this;
- }
-
--bool Iterator::operator== (const Iterator& rIterator)
-+bool Iterator::operator== (const Iterator& rIterator) const
- {
- if (!mxIterator || !rIterator.mxIterator)
- return mxIterator.get() == rIterator.mxIterator.get();
-@@ -118,7 +118,7 @@
- return *mxIterator == *rIterator.mxIterator;
- }
-
--bool Iterator::operator!= (const Iterator& rIterator)
-+bool Iterator::operator!= (const Iterator& rIterator) const
- {
- return ! operator==(rIterator);
- }
---- compilerplugins/clang/simplifybool.cxx 2019-12-05 20:59:23.000000000 +0100
-+++ compilerplugins/clang/simplifybool.cxx 2020-03-17 22:03:11.369300000 +0100
-@@ -241,7 +241,30 @@
- << expr->getSourceRange();
- return true;
- }
-- if (auto binaryOp = dyn_cast<BinaryOperator>(expr->getSubExpr()->IgnoreParenImpCasts())) {
-+ auto sub = expr->getSubExpr()->IgnoreParenImpCasts();
-+ auto reversed = false;
-+#if CLANG_VERSION >= 100000
-+ if (auto const rewritten = dyn_cast<CXXRewrittenBinaryOperator>(sub)) {
-+ if (rewritten->isReversed()) {
-+ if (rewritten->getOperator() == BO_EQ) {
-+ auto const sem = rewritten->getSemanticForm();
-+ bool match;
-+ if (auto const op1 = dyn_cast<BinaryOperator>(sem)) {
-+ match = op1->getOpcode() == BO_EQ;
-+ } else if (auto const op2 = dyn_cast<CXXOperatorCallExpr>(sem)) {
-+ match = op2->getOperator() == OO_EqualEqual;
-+ } else {
-+ match = false;
-+ }
-+ if (match) {
-+ sub = sem;
-+ reversed = true;
-+ }
-+ }
-+ }
-+ }
-+#endif
-+ if (auto binaryOp = dyn_cast<BinaryOperator>(sub)) {
- // Ignore macros, otherwise
- // OSL_ENSURE(!b, ...);
- // triggers.
-@@ -289,7 +312,7 @@
- << binaryOp->getSourceRange();
- }
- }
-- if (auto binaryOp = dyn_cast<CXXOperatorCallExpr>(expr->getSubExpr()->IgnoreParenImpCasts())) {
-+ if (auto binaryOp = dyn_cast<CXXOperatorCallExpr>(sub)) {
- // Ignore macros, otherwise
- // OSL_ENSURE(!b, ...);
- // triggers.
-@@ -301,8 +324,8 @@
- if (!(op == OO_EqualEqual || op == OO_ExclaimEqual))
- return true;
- BinaryOperator::Opcode negatedOpcode = BinaryOperator::negateComparisonOp(BinaryOperator::getOverloadedOpcode(op));
-- auto lhs = binaryOp->getArg(0)->IgnoreImpCasts()->getType()->getUnqualifiedDesugaredType();
-- auto rhs = binaryOp->getArg(1)->IgnoreImpCasts()->getType()->getUnqualifiedDesugaredType();
-+ auto lhs = binaryOp->getArg(reversed ? 1 : 0)->IgnoreImpCasts()->getType()->getUnqualifiedDesugaredType();
-+ auto rhs = binaryOp->getArg(reversed ? 0 : 1)->IgnoreImpCasts()->getType()->getUnqualifiedDesugaredType();
- auto const negOp = findOperator(compiler, negatedOpcode, lhs, rhs);
- if (!negOp)
- return true;
-@@ -323,8 +346,10 @@
- << expr->getSourceRange();
- if (negOp != ASSUME_OPERATOR_EXISTS)
- report(
-- DiagnosticsEngine::Note, "the presumed corresponding negated operator is declared here",
-+ DiagnosticsEngine::Note, "the presumed corresponding negated operator for %0 and %1 is declared here",
- negOp->getLocation())
-+ << binaryOp->getArg(reversed ? 1 : 0)->IgnoreImpCasts()->getType()
-+ << binaryOp->getArg(reversed ? 0 : 1)->IgnoreImpCasts()->getType()
- << negOp->getSourceRange();
- }
- return true;
---- cui/source/tabpages/tpline.cxx 2019-12-05 20:59:23.000000000 +0100
-+++ cui/source/tabpages/tpline.cxx 2020-03-17 22:06:49.493222000 +0100
-@@ -491,7 +491,7 @@
- else if( m_pLineEndList->Count() > static_cast<long>( nPos - 1 ) )
- pItem.reset(new XLineStartItem( m_xLbStartStyle->get_active_text(), m_pLineEndList->GetLineEnd( nPos - 1 )->GetLineEnd() ));
- pOld = GetOldItem( *rAttrs, XATTR_LINESTART );
-- if( pItem && ( !pOld || !( *static_cast<const XLineEndItem*>(pOld) == *pItem ) ) )
-+ if( pItem && ( !pOld || *pOld != *pItem ) )
- {
- rAttrs->Put( *pItem );
- bModified = true;
---- sc/source/ui/view/viewfunc.cxx.orig 2019-12-05 20:59:23.000000000 +0100
-+++ sc/source/ui/view/viewfunc.cxx 2020-03-17 23:58:50.978995000 +0100
-@@ -958,7 +958,7 @@
-
- // this should be intercepted by the pool: ?!??!??
-
-- if (bFrame && rNewOuter == rOldOuter && rNewInner == rOldInner)
-+ if (bFrame && &rNewOuter == &rOldOuter && &rNewInner == &rOldInner)
- bFrame = false;
-
- bFrame = bFrame
---- sc/source/core/opencl/formulagroupcl.cxx 2019-12-05 20:59:23.000000000 +0100
-+++ sc/source/core/opencl/formulagroupcl.cxx 2020-03-18 00:44:08.091710000 +0100
-@@ -1026,9 +1026,6 @@
+https://bugs.gentoo.org/713574
+https://bugs.documentfoundation.org/show_bug.cgi?id=131591
+
+--- sc/source/core/opencl/formulagroupcl.cxx.orig 2020-03-11 16:18:35 UTC
++++ sc/source/core/opencl/formulagroupcl.cxx
+@@ -1026,8 +1026,6 @@ class DynamicKernelMixedArgument : public VectorRef (p
/// Handling a Double Vector that is used as a sliding window input
/// to either a sliding window average or sum-of-products
/// Generate a sequential loop for reductions
-class OpAverage;
-class OpCount;
--
+
template<class Base>
class DynamicKernelSlidingArgument : public Base
- {
-@@ -1335,186 +1332,8 @@
+@@ -1335,186 +1333,8 @@ class ParallelReductionVectorRef : public Base (public
}
/// Emit the definition for the auxiliary reduction kernel
@@ -350,7 +200,7 @@
virtual std::string GenSlidingWindowDeclRef( bool ) const
{
std::stringstream ss;
-@@ -1527,195 +1346,10 @@
+@@ -1527,195 +1347,10 @@ class ParallelReductionVectorRef : public Base (public
/// Controls how the elements in the DoubleVectorRef are traversed
size_t GenReductionLoopHeader(
@@ -548,10 +398,11 @@
~ParallelReductionVectorRef()
{
if (mpClmem2)
-@@ -2314,6 +1948,380 @@
- }
- virtual std::string BinFuncName() const override { return "fsop"; }
+@@ -2324,6 +1959,379 @@ struct SumIfsArgs
+ cl_mem mCLMem;
+ double mConst;
};
++}
+
+template<class Base>
+void ParallelReductionVectorRef<Base>::GenSlidingWindowFunction( std::stringstream& ss )
@@ -826,7 +677,7 @@
+ // set work group size and execute
+ size_t global_work_size[] = { 256, static_cast<size_t>(w) };
+ size_t const local_work_size[] = { 256, 1 };
-+ SAL_INFO("sc.opencl", "Enqueuing kernel " << redKernel);
++ SAL_INFO("sc.opencl", "Enqueing kernel " << redKernel);
+ err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, redKernel, 2, nullptr,
+ global_work_size, local_work_size, 0, nullptr, nullptr);
+ if (CL_SUCCESS != err)
@@ -884,7 +735,7 @@
+ // set work group size and execute
+ size_t global_work_size1[] = { 256, static_cast<size_t>(w) };
+ size_t const local_work_size1[] = { 256, 1 };
-+ SAL_INFO("sc.opencl", "Enqueuing kernel " << redKernel);
++ SAL_INFO("sc.opencl", "Enqueing kernel " << redKernel);
+ err = clEnqueueNDRangeKernel(kEnv.mpkCmdQueue, redKernel, 2, nullptr,
+ global_work_size1, local_work_size1, 0, nullptr, nullptr);
+ if (CL_SUCCESS != err)
@@ -924,8 +775,6 @@
+ if (CL_SUCCESS != err)
+ throw OpenCLError("clSetKernelArg", err, __FILE__, __LINE__);
+ return 1;
-+}
-+
- namespace {
- struct SumIfsArgs
- {
+ }
+
+ /// Helper functions that have multiple buffers
diff --git a/editors/libreoffice/files/patch-solenv_gbuild_platform_FREEBSD__AARCH64__GCC.mk b/editors/libreoffice/files/patch-solenv_gbuild_platform_FREEBSD__AARCH64__GCC.mk
new file mode 100644
index 000000000000..860ca6fa9855
--- /dev/null
+++ b/editors/libreoffice/files/patch-solenv_gbuild_platform_FREEBSD__AARCH64__GCC.mk
@@ -0,0 +1,17 @@
+--- solenv/gbuild/platform/FREEBSD_AARCH64_GCC.mk.orig 2020-04-07 17:58:54.600930000 +0200
++++ solenv/gbuild/platform/FREEBSD_AARCH64_GCC.mk 2020-04-07 18:01:04.452566000 +0200
+@@ -0,0 +1,14 @@
++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
++#
++# This file is part of the LibreOffice project.
++#
++# This Source Code Form is subject to the terms of the Mozilla Public
++# License, v. 2.0. If a copy of the MPL was not distributed with this
++# file, You can obtain one at http://mozilla.org/MPL/2.0/.
++#
++
++#please make generic modifications to unxgcc.mk
++
++include $(GBUILDDIR)/platform/unxgcc.mk
++
++# vim: set noet sw=4:
diff --git a/editors/libreoffice/files/patch-vcl_qt5_Qt5Instance.cxx b/editors/libreoffice/files/patch-vcl_qt5_Qt5Instance.cxx
deleted file mode 100644
index 157916f80dcb..000000000000
--- a/editors/libreoffice/files/patch-vcl_qt5_Qt5Instance.cxx
+++ /dev/null
@@ -1,11 +0,0 @@
---- vcl/qt5/Qt5Instance.cxx.orig 2019-08-21 22:22:13.996160000 +0800
-+++ vcl/qt5/Qt5Instance.cxx 2019-08-21 22:30:33.169056000 +0800
-@@ -413,7 +413,7 @@
- {
- SolarMutexGuard g;
- Qt5FilePicker* pPicker;
-- RunInMainThread(std::function([&, this]() { pPicker = createPicker(context, eMode); }));
-+ RunInMainThread([&, this]() { pPicker = createPicker(context, eMode); });
- assert(pPicker);
- return pPicker;
- }
diff --git a/editors/libreoffice/files/patch-vcl_source_app_salplug.cxx b/editors/libreoffice/files/patch-vcl_source_app_salplug.cxx
new file mode 100644
index 000000000000..6637a0ab3466
--- /dev/null
+++ b/editors/libreoffice/files/patch-vcl_source_app_salplug.cxx
@@ -0,0 +1,19 @@
+--- vcl/source/app/salplug.cxx.orig 2020-05-27 12:17:53 UTC
++++ vcl/source/app/salplug.cxx
+@@ -152,6 +152,7 @@ SalInstance* autodetect_plugin()
+ #if ENABLE_KF5
+ "kf5",
+ #endif
++ "qt5",
+ #if ENABLE_GTK3_KDE5
+ "gtk3_kde5",
+ #endif
+@@ -160,7 +161,7 @@ SalInstance* autodetect_plugin()
+
+ static const char* const pStandardFallbackList[] =
+ {
+- "gtk3", "gen", nullptr
++ "gtk3", "qt5", "gen", nullptr
+ };
+
+ #ifdef HEADLESS_VCLPLUG
diff --git a/editors/libreoffice/files/patch-vcl_unx_generic_app_geninst.cxx b/editors/libreoffice/files/patch-vcl_unx_generic_app_geninst.cxx
index 239e8fbc7eb0..ad601826260a 100644
--- a/editors/libreoffice/files/patch-vcl_unx_generic_app_geninst.cxx
+++ b/editors/libreoffice/files/patch-vcl_unx_generic_app_geninst.cxx
@@ -1,19 +1,14 @@
---- vcl/unx/generic/app/geninst.cxx.orig 2019-08-07 01:26:35.000000000 +0800
-+++ vcl/unx/generic/app/geninst.cxx 2019-08-08 20:11:15.760468000 +0800
-@@ -22,11 +22,8 @@
- #include <cassert>
- #include <string.h>
- #include <stdlib.h>
+--- vcl/unx/generic/app/geninst.cxx.orig 2019-12-18 18:16:42.000000000 +0800
++++ vcl/unx/generic/app/geninst.cxx 2020-01-03 16:10:17.974216000 +0800
+@@ -18,6 +18,7 @@
+ */
+
+ #include <sal/config.h>
+#include <sys/utsname.h>
--#if defined(LINUX)
--# include <stdio.h>
--#endif
--
- #include <osl/module.hxx>
- #include <comphelper/solarmutex.hxx>
- #include <config_features.h>
-@@ -54,30 +51,22 @@
+ #if defined(LINUX)
+ # include <stdio.h>
+@@ -48,30 +49,22 @@
OUString SalGenericInstance::getOSVersion()
{
diff --git a/editors/libreoffice/files/patch-vcl_unx_kde5_kde5salinstance.cxx b/editors/libreoffice/files/patch-vcl_unx_kde5_kde5salinstance.cxx
deleted file mode 100644
index 7568905392b8..000000000000
--- a/editors/libreoffice/files/patch-vcl_unx_kde5_kde5salinstance.cxx
+++ /dev/null
@@ -1,23 +0,0 @@
---- vcl/unx/kde5/KDE5SalInstance.cxx.orig
-+++ vcl/unx/kde5/KDE5SalInstance.cxx
-@@ -43,9 +43,9 @@
- SalFrame* KDE5SalInstance::CreateFrame(SalFrame* pParent, SalFrameStyleFlags nState)
- {
- SalFrame* pRet(nullptr);
-- RunInMainThread(std::function([&pRet, pParent, nState]() {
-+ RunInMainThread([&pRet, pParent, nState]() {
- pRet = new KDE5SalFrame(static_cast<KDE5SalFrame*>(pParent), nState, true);
-- }));
-+ });
- assert(pRet);
- return pRet;
- }
-@@ -65,7 +65,7 @@
- {
- SolarMutexGuard g;
- Qt5FilePicker* pPicker;
-- RunInMainThread(std::function([&, this]() { pPicker = createPicker(context, eMode); }));
-+ RunInMainThread([&, this]() { pPicker = createPicker(context, eMode); });
- assert(pPicker);
- return pPicker;
- }