HomeFreeBSD

editors/libreoffice: make robust against __cxa_exception ABI changes

Description

editors/libreoffice: make robust against __cxa_exception ABI changes

Patch libreoffice to replace cxa_get_globals()->caughtExceptions,
which is a pointer to the start of a struct
cxa_exception, with
cxa_current_primary_exception(), which is a pointer to the end. This
allows struct
cxa_exception to be extended at the start as was
recently done in FreeBSD main and stable/13 on 64-bit architectures.

Recently on FreeBSD main and stable/13 attribute((aligned)) was
added to struct _Unwind_Exception which changes its size on 32-bit
architectures, and that of __cxa_exception as well. Patch libreoffice
to detect this so packages built on 13.0 still work on 13.1.

Change the LIB_DEPENDS on libunwind to a BUILD_DEPENDS because we only
need unwind.h (for FreeBSD 13.0 and older where that header is hidden
in /usr/include/c++/v1).

PR: 263596
Approved by: office (fluffy)

Details

Provenance
tijlAuthored on Apr 27 2022, 4:51 PM
Parents
R11:975a5c105757: devel/libunwind: use base system unwind.h
Branches
Unknown
Tags
Unknown