[Libreoffice-commits] core.git: bridges/source
brainbreaker
gautamprajapati06 at gmail.com
Wed Jun 14 20:12:47 UTC 2017
bridges/source/cpp_uno/gcc3_linux_arm/share.hxx | 19 +++++++++++++++++--
bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx | 7 ++++---
2 files changed, 21 insertions(+), 5 deletions(-)
New commits:
commit e88584fed0d4f063ec80b9013f8a6e0cb97aa462
Author: brainbreaker <gautamprajapati06 at gmail.com>
Date: Tue Jun 13 17:56:37 2017 +0530
Clean up declaration of __cxa_get_globals in linux_arm bridge
This is the Linux/arm version of commit
5ba3d1740b03efa394b2d2bf34fb8a8d3db2331d, which did the same for the
Linux/x86_64 bridge.
Clang rejects the incompatible declarations of the
same extern "C" function in different namespaces.
This commit redeclares __cxa_get_globals so as to support
clang for building Android in future.
Change-Id: I4d733d3835d0dea5784701143f4ea1bc5d5ff363
Reviewed-on: https://gerrit.libreoffice.org/38735
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx b/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
index 99cf7766a0c4..459db19ef4b3 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
@@ -18,13 +18,21 @@
*/
#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_ARM_SHARE_HXX
#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_GCC3_LINUX_ARM_SHARE_HXX
-#include "uno/mapping.h"
+#include "sal/config.h"
#include <typeinfo>
#include <exception>
#include <cstddef>
#include <unwind.h>
+#include <cxxabi.h>
+#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
+#define _GLIBCXX_CDTOR_CALLABI
+#endif
+
+#include "config_cxxabi.h"
+#include "uno/mapping.h"
+
namespace CPPU_CURRENT_NAMESPACE
{
@@ -70,9 +78,16 @@ namespace CPPU_CURRENT_NAMESPACE
__cxa_exception *propagatingExceptions;
#endif
};
- extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
+}
+#if !HAVE_CXXABI_H_CXA_GET_GLOBALS
+namespace __cxxabiv1 {
+ extern "C" __cxa_eh_globals * __cxa_get_globals() throw();
+}
+#endif
+namespace CPPU_CURRENT_NAMESPACE
+{
void raiseException(
uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
void fillUnoException(
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
index 8942d1f948bd..ee8c17fc62a5 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
@@ -569,10 +569,11 @@ static void cpp_call(
}
catch (...)
{
-// __asm__ __volatile__ ("sub sp, sp, #2048\n");
-
// fill uno exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
+ fillUnoException(
+ reinterpret_cast< CPPU_CURRENT_NAMESPACE::__cxa_eh_globals * >(
+ __cxxabiv1::__cxa_get_globals())->caughtExceptions,
+ *ppUnoExc, pThis->getBridge()->getCpp2Uno());
// temporary params
for ( ; nTempIndices--; )
More information about the Libreoffice-commits
mailing list