From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/libreoffice/files/, app-office/libreoffice/
Date: Fri, 7 Aug 2020 23:24:43 +0000 (UTC) [thread overview]
Message-ID: <1596842599.947faddaa0c012fe78adaf3fb3d0d1f1fde2be4e.asturm@gentoo> (raw)
commit: 947faddaa0c012fe78adaf3fb3d0d1f1fde2be4e
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 6 21:08:45 2020 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Aug 7 23:23:19 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=947fadda
app-office/libreoffice: Fix build with LLVM-10
Closes: https://bugs.gentoo.org/713574
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/libreoffice-6.4.6.2-llvm-10.patch | 102 +++++++++++++++++++++
app-office/libreoffice/libreoffice-6.4.9999.ebuild | 1 +
2 files changed, 103 insertions(+)
diff --git a/app-office/libreoffice/files/libreoffice-6.4.6.2-llvm-10.patch b/app-office/libreoffice/files/libreoffice-6.4.6.2-llvm-10.patch
new file mode 100644
index 00000000000..4a1ff516029
--- /dev/null
+++ b/app-office/libreoffice/files/libreoffice-6.4.6.2-llvm-10.patch
@@ -0,0 +1,102 @@
+From 986bd28388df745dd969e7be7c3bda36b2b2cb0e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
+Date: Thu, 6 Aug 2020 10:50:47 +0100
+Subject: [PATCH] ofz#24641 libc++abi __cxa_exception has grown another member
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+https: //github.com/llvm/llvm-project/commit/f2a436058fcbc11291e73badb44e243f61046183
+
+this is the same problem as
+
+commit f4b6f6a8ae60bdec53512728d00853b73fa18500
+Author: Stephan Bergmann <sbergman@redhat.com>
+Date: Thu Feb 13 08:40:11 2020 +0100
+
+ Hack to dynamically adapt to __cxa_exceptiom in LLVM 11 libcxxabi
+
+ (where the new change to __cxa_exception effectively reverts the change that
+ prompted 7a9dd3d482deeeb3ed1d50074e56adbd3f928296 "Hack to dynamically adapt to
+ __cxa_exceptiom in LLVM 5.0 libcxxabi")
+
+ Change-Id: Iec4ef1dc188bea2223d99b1b7eb8adec636c98e7
+ Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88583
+ Tested-by: Jenkins
+ Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
+
+so c-n-p that solution here
+
+Change-Id: I4475757a766e3ade7b9fcaf6149e535c9f9a4fa4
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100209
+Tested-by: Caolán McNamara <caolanm@redhat.com>
+Reviewed-by: Caolán McNamara <caolanm@redhat.com>
+---
+ .../cpp_uno/gcc3_linux_x86-64/except.cxx | 28 +++++++++++++++++++
+ .../cpp_uno/gcc3_linux_x86-64/share.hxx | 14 ++++++++++
+ 2 files changed, 42 insertions(+)
+
+diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+index e9e861f1c210..25931671f7dc 100644
+--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
++++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx
+@@ -150,6 +150,34 @@ void fillUnoException(uno_Any * pUnoExc, uno_Mapping * pCpp2Uno)
+ return;
+ }
+
++#if defined _LIBCPPABI_VERSION // detect libc++abi
++ // Very bad HACK to find out whether we run against a libcxxabi that has a new
++ // __cxa_exception::reserved member at the start, introduced with LLVM 11
++ // <https://github.com/llvm/llvm-project/commit/f2a436058fcbc11291e73badb44e243f61046183>
++ // "[libcxxabi] Insert padding in __cxa_exception struct for compatibility". The layout of the
++ // start of __cxa_exception is
++ //
++ // [8 byte void *reserve]
++ // 8 byte size_t referenceCount
++ //
++ // where the (bad, hacky) assumption is that reserve (if present) is null
++ // (__cxa_allocate_exception in at least LLVM 11 zero-fills the object, and nothing actively
++ // sets reserve) while referenceCount is non-null (__cxa_throw sets it to 1, and
++ // __cxa_decrement_exception_refcount destroys the exception as soon as it drops to 0; for a
++ // __cxa_dependent_exception, the referenceCount member is rather
++ //
++ // 8 byte void* primaryException
++ //
++ // but which also will always be set to a non-null value in __cxa_rethrow_primary_exception).
++ // As described in the definition of __cxa_exception
++ // (bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx), this hack (together with the "#if 0"
++ // there) can be dropped once we can be sure that we only run against new libcxxabi that has the
++ // reserve member:
++ if (*reinterpret_cast<void **>(header) == nullptr) {
++ header = reinterpret_cast<__cxxabiv1::__cxa_exception*>(reinterpret_cast<void **>(header) + 1);
++ }
++#endif
++
+ std::type_info *exceptionType = __cxxabiv1::__cxa_current_exception_type();
+
+ typelib_TypeDescription * pExcTypeDescr = nullptr;
+diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+index e8afe35c4f59..53c8841fbbcb 100644
+--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
++++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+@@ -108,6 +108,20 @@ namespace __cxxabiv1 {
+ struct __cxa_exception {
+ #if defined _LIBCPPABI_VERSION // detect libc++abi
+ #if defined __LP64__ || LIBCXXABI_ARM_EHABI
++#if 0
++ // This is a new field added with LLVM 11
++ // <https://github.com/llvm/llvm-project/commit/f2a436058fcbc11291e73badb44e243f61046183>
++ // "[libcxxabi] Insert padding in __cxa_exception struct for compatibility". The HACK in
++ // fillUnoException (bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx) tries to find out at
++ // runtime whether a __cxa_exception has this member. Once we can be sure that we only run
++ // against new libcxxabi that has this member, we can drop the "#if 0" here and drop the hack
++ // in fillUnoException.
++
++ // Now _Unwind_Exception is marked with __attribute__((aligned)),
++ // which implies __cxa_exception is also aligned. Insert padding
++ // in the beginning of the struct, rather than before unwindHeader.
++ void *reserve;
++#endif
+ std::size_t referenceCount;
+ #endif
+ #endif
diff --git a/app-office/libreoffice/libreoffice-6.4.9999.ebuild b/app-office/libreoffice/libreoffice-6.4.9999.ebuild
index ecae7dbf2c7..6f4a72b4e47 100644
--- a/app-office/libreoffice/libreoffice-6.4.9999.ebuild
+++ b/app-office/libreoffice/libreoffice-6.4.9999.ebuild
@@ -271,6 +271,7 @@ PATCHES=(
# git master
"${FILESDIR}/${PN}-6.4.3.2-boost-1.73.patch" # bug 721806
+ "${FILESDIR}/${PN}-6.4.6.2-llvm-10.patch" # bug 713574
)
S="${WORKDIR}/${PN}-${MY_PV}"
next reply other threads:[~2020-08-07 23:24 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-07 23:24 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-28 11:56 [gentoo-commits] repo/gentoo:master commit in: app-office/libreoffice/files/, app-office/libreoffice/ Andreas Sturmlechner
2025-03-03 11:05 Sam James
2025-02-26 20:50 Andreas Sturmlechner
2025-02-22 22:26 Sam James
2025-01-13 17:12 Andreas Sturmlechner
2024-11-14 21:29 Andreas Sturmlechner
2024-06-29 16:32 Andreas Sturmlechner
2024-03-25 12:05 Andreas Sturmlechner
2024-03-25 12:05 Andreas Sturmlechner
2024-02-20 20:49 Andreas Sturmlechner
2024-02-14 19:55 Andreas Sturmlechner
2024-01-27 0:48 Andreas Sturmlechner
2024-01-07 9:29 Andreas Sturmlechner
2023-12-07 18:50 Andreas Sturmlechner
2023-11-21 22:36 Andreas Sturmlechner
2023-06-10 9:39 Andreas Sturmlechner
2023-05-13 21:25 Andreas Sturmlechner
2023-02-01 13:22 Andreas Sturmlechner
2022-09-02 4:38 Sam James
2022-05-13 22:51 Conrad Kostecki
2022-05-08 21:57 Sam James
2022-02-18 20:09 Andreas K. Hüttel
2021-09-14 13:39 Andreas Sturmlechner
2021-09-13 5:19 Andreas Sturmlechner
2021-05-21 14:28 Andreas Sturmlechner
2021-03-12 21:12 Andreas Sturmlechner
2020-12-17 13:31 Andreas Sturmlechner
2020-05-14 20:10 Andreas Sturmlechner
2019-12-26 8:36 Andreas Sturmlechner
2019-10-29 17:39 Andreas Sturmlechner
2019-10-29 17:39 Andreas Sturmlechner
2019-04-03 12:02 Andreas Sturmlechner
2019-02-14 18:36 Andreas Sturmlechner
2019-01-16 8:17 Andreas Sturmlechner
2019-01-09 10:00 Andreas Sturmlechner
2019-01-09 10:00 Andreas Sturmlechner
2018-11-22 21:48 Andreas Sturmlechner
2018-07-14 8:20 Andreas Sturmlechner
2018-07-14 8:20 Andreas Sturmlechner
2018-06-10 9:19 Andreas Sturmlechner
2018-05-29 14:59 Andreas Sturmlechner
2018-02-10 9:43 Andreas Sturmlechner
2018-02-09 23:14 Andreas Sturmlechner
2018-02-04 18:58 Andreas Sturmlechner
2018-01-07 16:02 Andreas Sturmlechner
2018-01-05 0:35 Andreas Sturmlechner
2017-06-25 21:54 Andreas Sturmlechner
2017-02-12 0:13 Andreas Sturmlechner
2016-11-29 19:55 Andreas Hüttel
2016-09-17 21:32 Andreas Hüttel
2016-07-26 7:39 Lars Wendler
2016-03-19 21:39 Andreas Hüttel
2015-11-28 0:13 Andreas Hüttel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1596842599.947faddaa0c012fe78adaf3fb3d0d1f1fde2be4e.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox