You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by pf...@apache.org on 2015/03/26 23:07:22 UTC
svn commit: r1669457 - in
/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel:
cpp2uno.cxx except.cxx share.hxx uno2cpp.cxx
Author: pfg
Date: Thu Mar 26 22:07:21 2015
New Revision: 1669457
URL: http://svn.apache.org/r1669457
Log:
Huge update to the FreeBSD port (i386 part).
Starting with FreeBSD 10, the FreeBSD project has moved from using
gcc/libstdc++ to using a complete C++ stack based on clang/llvm
libc++ and libcxxrt. This new stack has better standards compliance
and has huge similarities with MacOSX but it brought subtle low
level problems for our outdated bridges code.
Don Lewis has done a brave effort to update this code and
has done extensive testing within FreeBSD port. Support
for older versions of gcc has been dropped.
Code Review:
https://reviews.freebsd.org/D2108
https://reviews.freebsd.org/D2055
Author: Don Lewis (truckman at FreeBSD)
Modified:
openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx
openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx
openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx
openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx
Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx?rev=1669457&r1=1669456&r2=1669457&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx Thu Mar 26 22:07:21 2015
@@ -24,6 +24,11 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_bridges.hxx"
+#include <typeinfo>
+#include <exception>
+#include <cstddef>
+#include <cxxabi.h>
+
#include <com/sun/star/uno/genfunc.hxx>
#include "com/sun/star/uno/RuntimeException.hpp"
#include <uno/data.h>
Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx?rev=1669457&r1=1669456&r2=1669457&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx Thu Mar 26 22:07:21 2015
@@ -24,9 +24,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_bridges.hxx"
-#if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))
+#include <cstddef>
#include <exception>
-#endif
+#include <typeinfo>
#include <stdio.h>
#include <string.h>
@@ -182,7 +182,12 @@ type_info * RTTI::getRTTI( typelib_Compo
char const * rttiName = symName.getStr() +4;
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr,"generated rtti for %s\n", rttiName );
+#ifndef __GLIBCXX__ /* #i124421# */
+ const OString aCUnoName = OUStringToOString( unoName, RTL_TEXTENCODING_UTF8);
+ OSL_TRACE( "TypeInfo for \"%s\" not found and cannot be generated.\n", aCUnoName.getStr());
+#endif /* __GLIBCXX__ */
#endif
+#ifdef __GLIBCXX__ /* #i124421# */
if (pTypeDescr->pBaseTypeDescription)
{
// ensure availability of base
@@ -196,6 +201,9 @@ type_info * RTTI::getRTTI( typelib_Compo
// this class has no base class
rtti = new __class_type_info( strdup( rttiName ) );
}
+#else /* __GLIBCXX__ */
+ rtti = NULL;
+#endif /* __GLIBCXX__ */
pair< t_rtti_map::iterator, bool > insertion(
m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx?rev=1669457&r1=1669456&r2=1669457&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/share.hxx Thu Mar 26 22:07:21 2015
@@ -23,10 +23,6 @@
#include "uno/mapping.h"
-#include <typeinfo>
-#include <exception>
-#include <cstddef>
-
namespace CPPU_CURRENT_NAMESPACE
{
@@ -34,6 +30,7 @@ void dummy_can_throw_anything( char cons
// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
+#ifdef __GLIBCXX__
struct _Unwind_Exception
{
unsigned exception_class __attribute__((__mode__(__DI__)));
@@ -62,18 +59,21 @@ struct __cxa_exception
_Unwind_Exception unwindHeader;
};
+#endif /* __GLIBCXX__ */
extern "C" void *__cxa_allocate_exception(
std::size_t thrown_size ) throw();
extern "C" void __cxa_throw (
void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
+#ifdef __GLIBCXX__
struct __cxa_eh_globals
{
__cxa_exception *caughtExceptions;
unsigned int uncaughtExceptions;
};
extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
+#endif /* __GLIBCXX__ */
// -----
@@ -81,6 +81,10 @@ extern "C" __cxa_eh_globals *__cxa_get_g
void raiseException(
uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
//==================================================================================================
+#ifndef __GLIBCXX__
+using __cxxabiv1:: __cxa_exception;
+#endif /* __GLIBCXX__ */
+
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
}
Modified: openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx?rev=1669457&r1=1669456&r2=1669457&view=diff
==============================================================================
--- openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx (original)
+++ openoffice/trunk/main/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx Thu Mar 26 22:07:21 2015
@@ -24,6 +24,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_bridges.hxx"
+#include <typeinfo>
+#include <exception>
+#include <cstddef>
+#include <cxxabi.h>
#include <stdlib.h>
#include <com/sun/star/uno/genfunc.hxx>
@@ -39,6 +43,11 @@
using namespace ::rtl;
using namespace ::com::sun::star::uno;
+#ifdef __GLIBCXX__
+using CPPU_CURRENT_NAMESPACE::__cxa_get_globals;
+#else
+using __cxxabiv1::__cxa_get_globals;
+#endif
namespace
{
@@ -305,7 +314,7 @@ static void cpp_call(
catch (...)
{
// fill uno exception
- fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
+ CPPU_CURRENT_NAMESPACE::fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
// temporary params
for ( ; nTempIndizes--; )