aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-03-09 07:28:27 +0000
committerDima Panov <fluffy@FreeBSD.org>2022-03-09 07:28:27 +0000
commitf88f34d1b4a00d94c00aae1b3097c9c637e36397 (patch)
treebbf2ff5a6aed785321a0d457ed768e1d9694acc7
parenteebf3d7bb9b57a216f93ddccbffa4c5c4c39f47d (diff)
downloadports-f88f34d1b4a00d94c00aae1b3097c9c637e36397.tar.gz
ports-f88f34d1b4a00d94c00aae1b3097c9c637e36397.zip
editors/libreoffice: work around changed alignment of __cxa_exception
LibreOffice has special detection for the change in alignment and size of struct cxa_exception, when using libc++abi. However, this updated alignment also applies to libunwind and upstream libcxxrt, and will soon apply to our libcxxrt too. Enable the special detection unconditionally for x86_64 and aarch64, so libreoffice packages built on 13.0-R (with the old alignment) will seamlessly work on 13.1-R (which will have the new alignment). PR: 262008
-rw-r--r--editors/libreoffice/Makefile2
-rw-r--r--editors/libreoffice/files/patch-bridges_source_cpp__uno_gcc3__linux__aarch64_abi.cxx11
-rw-r--r--editors/libreoffice/files/patch-bridges_source_cpp__uno_gcc3__linux__x86-64_except.cxx11
3 files changed, 23 insertions, 1 deletions
diff --git a/editors/libreoffice/Makefile b/editors/libreoffice/Makefile
index d78b4085a616..6128adfc52d1 100644
--- a/editors/libreoffice/Makefile
+++ b/editors/libreoffice/Makefile
@@ -1,4 +1,4 @@
-PORTREVISION= 1
+PORTREVISION= 2
.include "${.CURDIR}/Makefile.common"
diff --git a/editors/libreoffice/files/patch-bridges_source_cpp__uno_gcc3__linux__aarch64_abi.cxx b/editors/libreoffice/files/patch-bridges_source_cpp__uno_gcc3__linux__aarch64_abi.cxx
new file mode 100644
index 000000000000..dc8af45ecfea
--- /dev/null
+++ b/editors/libreoffice/files/patch-bridges_source_cpp__uno_gcc3__linux__aarch64_abi.cxx
@@ -0,0 +1,11 @@
+--- bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx.orig 2022-01-26 14:35:29 UTC
++++ bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
+@@ -147,7 +147,7 @@ extern "C" void _GLIBCXX_CDTOR_CALLABI deleteException
+ extern "C" void _GLIBCXX_CDTOR_CALLABI deleteException(void * exception) {
+ __cxxabiv1::__cxa_exception * header =
+ static_cast<__cxxabiv1::__cxa_exception *>(exception) - 1;
+-#if !defined MACOSX && defined _LIBCPPABI_VERSION // detect libc++abi
++#if 1
+ // First, the libcxxabi commit
+ // <http://llvm.org/viewvc/llvm-project?view=revision&revision=303175>
+ // "[libcxxabi] Align unwindHeader on a double-word boundary" towards
diff --git a/editors/libreoffice/files/patch-bridges_source_cpp__uno_gcc3__linux__x86-64_except.cxx b/editors/libreoffice/files/patch-bridges_source_cpp__uno_gcc3__linux__x86-64_except.cxx
new file mode 100644
index 000000000000..4553e0303b2a
--- /dev/null
+++ b/editors/libreoffice/files/patch-bridges_source_cpp__uno_gcc3__linux__x86-64_except.cxx
@@ -0,0 +1,11 @@
+--- bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx.orig 2022-01-26 14:35:29 UTC
++++ bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+@@ -82,7 +82,7 @@ static void _GLIBCXX_CDTOR_CALLABI deleteException( vo
+ static void _GLIBCXX_CDTOR_CALLABI deleteException( void * pExc )
+ {
+ __cxxabiv1::__cxa_exception const * header = static_cast<__cxxabiv1::__cxa_exception const *>(pExc) - 1;
+-#if defined _LIBCPPABI_VERSION // detect libc++abi
++#if 1
+ // First, the libcxxabi commit
+ // <http://llvm.org/viewvc/llvm-project?view=revision&revision=303175>
+ // "[libcxxabi] Align unwindHeader on a double-word boundary" towards