bridges/source/cpp_uno/gcc3_linux_intel/except.cxx | 9 --- bridges/source/cpp_uno/gcc3_linux_intel/share.hxx | 50 ++++++++++++++------ bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx | 7 ++ configure.ac | 8 +++ external/nss/UnpackedTarball_nss.mk | 1 external/nss/nss-linux-x86.patch.0 | 10 ++++ 6 files changed, 61 insertions(+), 24 deletions(-)
New commits: commit bfd6428fff6e9cbd2e1bfde76a237bd438a8c9a6 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Feb 14 15:10:32 2014 +0100 Hack for mysql_config under linux32 Change-Id: I3a6b4aae36df7e23c05da9fd27b0588a6228b92b diff --git a/configure.ac b/configure.ac index 39cd009..4f71d15 100644 --- a/configure.ac +++ b/configure.ac @@ -8056,6 +8056,14 @@ if test "$ENABLE_MARIADBC" = "TRUE"; then MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-fstack-protector-strong//) fi MARIADB_LIBS=`$MARIADBCONFIG --libs_r` + dnl At least mariadb-5.5.34-3.fc20.x86_64 plus + dnl mariadb-5.5.34-3.fc20.i686 reports 64-bit specific output even under + dnl linux32: + if test "$OS" = LINUX -a "$CPUNAME" = INTEL; then + MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-m64//) + MARIADB_LIBS=$(printf '%s' "$MARIADB_LIBS" \ + | sed -e 's|/lib64/|/lib/|') + fi AC_MSG_RESULT([includes '$MARIADB_CFLAGS', libraries '$MARIADB_LIBS']) AC_MSG_CHECKING([whether to bundle the MySQL/MariaDB client library]) if test "$enable_bundle_mariadb" = "yes"; then commit 7273e371bec8042699d27f3ada83f1f50073ac15 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Feb 14 15:06:49 2014 +0100 Linux x86 nss/lib/freebl/mpi/mpi_x86.s confusion of mp_digit size see <https://groups.google.com/forum/#!topic/mozilla.dev.security/n16bQj4qZHc> Change-Id: I6635d187b29d6b50fbccaf3f4c29d72660fcaa5e diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk index 15a02d2..17eb436 100644 --- a/external/nss/UnpackedTarball_nss.mk +++ b/external/nss/UnpackedTarball_nss.mk @@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\ external/nss/nss.aix.patch \ external/nss/nss-3.13.5-zlib-werror.patch \ external/nss/nss_macosx.patch \ + external/nss/nss-linux-x86.patch.0 \ $(if $(filter WNTMSC,$(OS)$(COM)),external/nss/nss.windows.patch) \ $(if $(filter WNTGCC,$(OS)$(COM)),external/nss/nspr-4.9-build.patch.3 \ external/nss/nss-3.13.3-build.patch.3 \ diff --git a/external/nss/nss-linux-x86.patch.0 b/external/nss/nss-linux-x86.patch.0 new file mode 100644 index 0000000..e23a786 --- /dev/null +++ b/external/nss/nss-linux-x86.patch.0 @@ -0,0 +1,10 @@ +--- nss/lib/freebl/Makefile ++++ nss/lib/freebl/Makefile +@@ -195,6 +195,7 @@ + ifeq ($(CPU_ARCH),x86) + ASFILES = mpi_x86.s + DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE ++ DEFINES += -DMP_USE_UINT_DIGIT + DEFINES += -DMP_ASSEMBLY_DIV_2DX1D + DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN + # The floating point ECC code doesn't work on Linux x86 (bug 311432). commit 9dc337e9d073352cd9c9018d30b40bd4dcd5b1cb Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Feb 14 15:04:50 2014 +0100 Adapt gcc3_linux_intel to Clang 3.4 ...same as 5ba3d1740b03efa394b2d2bf34fb8a8d3db2331d "Clean up declaration of __cxa_get_globals" plus c17f01753ce94e9f57d6e4a2763152240fbcd50a "...and similarly for __cxa_allocate_exception and __cxa_throw." Change-Id: I02361cfca260577ce13fb634b5637938daf0283d diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx index ee26ba0..f9397a9 100644 --- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx @@ -22,11 +22,6 @@ #include <dlfcn.h> #include <boost/unordered_map.hpp> -#include <cxxabi.h> -#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h -#define _GLIBCXX_CDTOR_CALLABI -#endif - #include <rtl/strbuf.hxx> #include <rtl/ustrbuf.hxx> #include <osl/diagnose.h> @@ -248,7 +243,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) Reference< XInterface >() ); } - pCppExc = __cxa_allocate_exception( pTypeDescr->nSize ); + pCppExc = __cxxabiv1::__cxa_allocate_exception( pTypeDescr->nSize ); ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp ); // destruct uno exception @@ -280,7 +275,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) } } - __cxa_throw( pCppExc, rtti, deleteException ); + __cxxabiv1::__cxa_throw( pCppExc, rtti, deleteException ); } //================================================================================================== diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx index e37df21..4077d57 100644 --- a/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx +++ b/bridges/source/cpp_uno/gcc3_linux_intel/share.hxx @@ -17,13 +17,20 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "uno/mapping.h" +#include "sal/config.h" #include <typeinfo> #include <exception> #include <cstddef> +#include <cxxabi.h> +#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h +#define _GLIBCXX_CDTOR_CALLABI +#endif + +#include "config_gcc.h" #include <uno/any2.h> +#include "uno/mapping.h" namespace CPPU_CURRENT_NAMESPACE { @@ -69,24 +76,37 @@ struct __cxa_eh_globals } -extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals *__cxa_get_globals () throw(); +// __cxa_get_globals is exported from libstdc++ since GCC 3.4.0 (CXXABI_1.3), +// but it is only declared in cxxabi.h (in namespace __cxxabiv1) since +// GCC 4.7.0. It returns a pointer to a struct __cxa_eh_globals, but that +// struct is only incompletely declared even in the GCC 4.7.0 cxxabi.h. +// Therefore, provide a declaration here for old GCC (libstdc++, really) version +// that returns a void pointer, and in the code calling it always cast to the +// above fake definition of CPPU_CURRENT_NAMESPACE::__cxa_eh_globals (which +// hopefully keeps matching the real definition in libstdc++); similarly for +// __cxa_allocate_exception and __cxa_throw, though they do not have the +// additional problem of an incompletely declared return type: + +#if !HAVE_GCC_CXXABI_H_CXA_GET_GLOBALS +namespace __cxxabiv1 { extern "C" void * __cxa_get_globals() throw(); } +#endif -namespace CPPU_CURRENT_NAMESPACE -{ +#if !HAVE_GCC_CXXABI_H_CXA_ALLOCATE_EXCEPTION +namespace __cxxabiv1 { +extern "C" void * __cxa_allocate_exception(std::size_t thrown_size) throw(); +} +#endif -// The following are in cxxabi.h since GCC 4.7 (they are wrapped in -// CPPU_CURRENT_NAMESPACE here as different GCC versions have slightly different -// declarations for them, e.g., with or without throw() specification, so would -// complain about redeclarations of these somewhat implicitly declared -// functions): -#if __GNUC__ == 4 && __GNUC_MINOR__ <= 6 -extern "C" void *__cxa_allocate_exception( - std::size_t thrown_size ) throw(); -extern "C" void __cxa_throw ( - void *thrown_exception, void *tinfo, void (*dest) (void *) ) __attribute__((noreturn)); +#if !HAVE_GCC_CXXABI_H_CXA_THROW +namespace __cxxabiv1 { +extern "C" void __cxa_throw( + void * thrown_exception, void * tinfo, void (* dest)(void *)) + __attribute__((noreturn)); +} #endif -// ----- +namespace CPPU_CURRENT_NAMESPACE +{ //================================================================================================== void raiseException( diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx index 37605ca..ab95916 100644 --- a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx @@ -202,8 +202,11 @@ static void cpp_call( } catch (...) { - // fill uno exception - fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() ); + // fill uno exception + fillUnoException( + reinterpret_cast< CPPU_CURRENT_NAMESPACE::__cxa_eh_globals * >( + __cxxabiv1::__cxa_get_globals())->caughtExceptions, + *ppUnoExc, pThis->getBridge()->getCpp2Uno()); // temporary params for ( ; nTempIndices--; ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits