[Libreoffice-commits] core.git: include/LibreOfficeKit libreofficekit/qa
Stephan Bergmann
sbergman at redhat.com
Tue Mar 8 07:37:52 UTC 2016
include/LibreOfficeKit/LibreOfficeKitInit.h | 5 +----
libreofficekit/qa/unit/tiledrendering.cxx | 8 +++++++-
2 files changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 5e79a328645e6bc2ac3cbd7f2d6b9298772c0598
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Mar 8 08:34:09 2016 +0100
New LOK_LOADLIB_GLOBAL to let clients control dlopen(RTLD_GLOBAL)
...in LibreOfficeKintInit.h's lok_loadlib, now that RTLD_GLOBAL isn't only
needed for UBSan (62b124b2704adf11a63681164d05a8eb49dfb105 "Ensure RTTI symbol
visibility for Linux Clang -fsanitize=function,vptr") but also for
-stdlib=libc++ on Linux (see
<https://whatofhow.wordpress.com/2016/03/01/libclibcabi-on-linux/>).
Change-Id: I24ed6612c3d922eba695423d46af5635c77f7077
diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h
index a1b2ddc..f1e513e 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -45,12 +45,9 @@ extern "C"
void *lok_loadlib(const char *pFN)
{
return dlopen(pFN, RTLD_LAZY
-#if defined __clang__ && defined __linux__ \
- && defined ENABLE_RUNTIME_OPTIMIZATIONS
-#if !ENABLE_RUNTIME_OPTIMIZATIONS
+#if defined LOK_LOADLIB_GLOBAL
| RTLD_GLOBAL
#endif
-#endif
);
}
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx b/libreofficekit/qa/unit/tiledrendering.cxx
index e28fece..1df2eff 100644
--- a/libreofficekit/qa/unit/tiledrendering.cxx
+++ b/libreofficekit/qa/unit/tiledrendering.cxx
@@ -19,8 +19,14 @@
#include <osl/file.hxx>
#include <rtl/bootstrap.hxx>
+#if defined __clang__ && defined __linux__
+#include <cxxabi.h>
#include <config_options.h>
- // see use of ENABLE_RUNTIME_OPTIMIZATIONS in LibreOfficeKintInit.h
+#if defined _LIBCPPABI_VERSION || !ENABLE_RUNTIME_OPTIMIZATIONS
+#define LOK_LOADLIB_GLOBAL
+#endif
+#endif
+
#include <LibreOfficeKit/LibreOfficeKitInit.h>
#include <LibreOfficeKit/LibreOfficeKit.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
More information about the Libreoffice-commits
mailing list