[Libreoffice-commits] core.git: 2 commits - android/Bootstrap bridges/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Dec 13 06:16:58 UTC 2018


 android/Bootstrap/version.map                    |    1 +
 bridges/source/cpp_uno/gcc3_linux_arm/except.cxx |    3 ---
 bridges/source/cpp_uno/gcc3_linux_arm/share.hxx  |    9 +++++++++
 3 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 711f52336429d69e797d01f1c17e31d7e688e35c
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 11 15:01:30 2018 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Dec 13 07:16:40 2018 +0100

    Adapt gcc3_linux_arm __cxa_exception to NDK 18 libc++abi
    
    ...which adds a member, and will be relevant when switching armeabi-v7a to
    libc++/libc++abi/libunwind (coming soon).
    
    Change-Id: I1f98f50ca299a583e73e0dbd6c8c94d973329f3a
    Reviewed-on: https://gerrit.libreoffice.org/64966
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx b/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
index a39fe26a97b8..ac380969e21b 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
@@ -64,6 +64,15 @@ public:
 namespace __cxxabiv1 {
     struct __cxa_exception
     {
+#if defined _LIBCPPABI_VERSION // detect libc++abi
+#if defined __LP64__ || defined __ARM_EABI__
+        // Quoting android-ndk-r18b/sources/cxx-stl/llvm-libc++abi/src/cxa_exception.hpp: "This is a
+        // new field to support C++ 0x exception_ptr. For binary compatibility it is at the start of
+        // this struct which is prepended to the object thrown in __cxa_allocate_exception."
+        std::size_t referenceCount;
+#endif
+#endif
+
         std::type_info *exceptionType;
         void (*exceptionDestructor)(void *);
 
commit 357112d74c887a6ab974737c6282aaf96298bdf4
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Dec 11 14:33:18 2018 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Dec 13 07:16:29 2018 +0100

    Export RTTI symbols from liblo-native-code.so, for binary UNO bridge
    
    This will become important when switching armeabi-v7a to
    libc++/libc++abi/libunwind (coming soon) which uses address instead of string
    comparison when checking for type equality, so that exceptions thrown from the
    binary UNO bridge will need to use the exact same RTTI objects as referenced
    from the compiled catch clauses.
    
    Change-Id: If8bcb39212b5f5e154aee215cb5f471fe2dc4a7b
    Reviewed-on: https://gerrit.libreoffice.org/64965
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/android/Bootstrap/version.map b/android/Bootstrap/version.map
index e12d9985e78f..067785410a7a 100644
--- a/android/Bootstrap/version.map
+++ b/android/Bootstrap/version.map
@@ -2,6 +2,7 @@ dummy {
      global:
         Java_*;
         JNI_OnLoad;
+        _ZTI*; _ZTS*; # weak RTTI symbols for C++ exceptions
     local:
         *;
 };
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
index 9de606a8c6bf..251fbe09857f 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
@@ -148,9 +148,6 @@ namespace CPPU_CURRENT_NAMESPACE
             rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
 #else
             rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
-            // Unfortunately dlsym for weak symbols doesn't work in
-            // Android 4.0 at least, sigh, so we will always take the
-            // else branch below.
 #endif
 
             if (rtti)


More information about the Libreoffice-commits mailing list