[ooo-build-commit] .: 3 commits - configure.in patches/dev300

René Engelhard rene at kemper.freedesktop.org
Thu May 6 05:13:59 PDT 2010


 configure.in                                 |    2 
 patches/dev300/cws-kfreebsdport01v2-m15.diff |   57 ++++
 patches/dev300/cws-kfreebsdport01v2.diff     |   57 ++++
 patches/dev300/fix-arm-eabi-bridge.diff      |  363 ++++++++++++++++++++++++---
 4 files changed, 448 insertions(+), 31 deletions(-)

New commits:
commit 07acf383696676504bc646191b09284b2bc20c81
Author: Rene Engelhard <rene at debian.org>
Date:   Thu May 6 09:36:18 2010 +0200

    update kFreeBSD port patch to fix odk
    
    * patches/dev300/cws-kfreebsdport01v2-m15.diff:
    * patches/dev300/cws-kfreebsdport01v2.diff:

diff --git a/patches/dev300/cws-kfreebsdport01v2-m15.diff b/patches/dev300/cws-kfreebsdport01v2-m15.diff
index 6a1c7d5..dd59c8c 100644
--- a/patches/dev300/cws-kfreebsdport01v2-m15.diff
+++ b/patches/dev300/cws-kfreebsdport01v2-m15.diff
@@ -9794,3 +9794,60 @@ diff --git a/epm/epm-3.7.patch b/epm/epm-3.7.patch
 +   return (0);
 + }
 + 
+diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk
+--- odk/settings/settings.mk
++++ odk/settings/settings.mk
+@@ -498,13 +498,37 @@
+ 
+ PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)
+ 
+-# Default is freebsd on a intel machine    
++ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
++PLATFORM=kfreebsd
++ifeq "$(PROCTYPE)" "x86_64"
++PACKAGE_LIB_DIR=kfreebsd_x86_64.plt
++UNOPKG_PLATFORM=kFreeBSD_x86_64
++else
++PACKAGE_LIB_DIR=kfreebsd_x86.plt
++UNOPKG_PLATFORM=kFreeBSD_x86
++endif
++else
+ PLATFORM=freebsd
++ifeq "$(PROCTYPE)" "x86_64"
++PACKAGE_LIB_DIR=freebsd_x86_64.plt
++UNOPKG_PLATFORM=FreeBSD_x86_64
++else
+ PACKAGE_LIB_DIR=freebsd_x86.plt
+ UNOPKG_PLATFORM=FreeBSD_x86
++endif
++endif
++
++ifeq "$(PROCTYPE)" "x86_64"
++JAVA_PROC_TYPE=amd64
++else
+ JAVA_PROC_TYPE=i386
++endif
+ 
++ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
++OS=LINUX
++else
+ OS=FREEBSD
++endif
+ PS=/
+ ICL=\$$
+ CC=gcc
+@@ -520,13 +544,8 @@
+ 
+ GCC_VERSION=$(shell $(CC) -dumpversion)
+ 
+-ifeq "$(shell echo $(GCC_VERSION) | cut -c 1)" "3"
+ COMID=gcc3
+ CPPU_ENV=gcc3
+-else
+-COMID=GCC
+-CPPU_ENV=gcc2
+-endif
+ 
+ OSEP=\<
+ CSEP=\>
+
diff --git a/patches/dev300/cws-kfreebsdport01v2.diff b/patches/dev300/cws-kfreebsdport01v2.diff
index 063287b..88b8053 100644
--- a/patches/dev300/cws-kfreebsdport01v2.diff
+++ b/patches/dev300/cws-kfreebsdport01v2.diff
@@ -9794,3 +9794,60 @@ diff --git a/epm/epm-3.7.patch b/epm/epm-3.7.patch
 +   return (0);
 + }
 + 
+diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk
+--- odk/settings/settings.mk
++++ odk/settings/settings.mk
+@@ -498,13 +498,37 @@
+ 
+ PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)
+ 
+-# Default is freebsd on a intel machine    
++ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
++PLATFORM=kfreebsd
++ifeq "$(PROCTYPE)" "x86_64"
++PACKAGE_LIB_DIR=kfreebsd_x86_64.plt
++UNOPKG_PLATFORM=kFreeBSD_x86_64
++else
++PACKAGE_LIB_DIR=kfreebsd_x86.plt
++UNOPKG_PLATFORM=kFreeBSD_x86
++endif
++else
+ PLATFORM=freebsd
++ifeq "$(PROCTYPE)" "x86_64"
++PACKAGE_LIB_DIR=freebsd_x86_64.plt
++UNOPKG_PLATFORM=FreeBSD_x86_64
++else
+ PACKAGE_LIB_DIR=freebsd_x86.plt
+ UNOPKG_PLATFORM=FreeBSD_x86
++endif
++endif
++
++ifeq "$(PROCTYPE)" "x86_64"
++JAVA_PROC_TYPE=amd64
++else
+ JAVA_PROC_TYPE=i386
++endif
+ 
++ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
++OS=LINUX
++else
+ OS=FREEBSD
++endif
+ PS=/
+ ICL=\$$
+ CC=gcc
+@@ -520,13 +544,8 @@
+ 
+ GCC_VERSION=$(shell $(CC) -dumpversion)
+ 
+-ifeq "$(shell echo $(GCC_VERSION) | cut -c 1)" "3"
+ COMID=gcc3
+ CPPU_ENV=gcc3
+-else
+-COMID=GCC
+-CPPU_ENV=gcc2
+-endif
+ 
+ OSEP=\<
+ CSEP=\>
+
commit 0e8ac2b6b3e3c9a4f7ae30bf8e30e48bb09906ef
Author: Rene Engelhard <rene at debian.org>
Date:   Wed May 5 01:03:02 2010 +0200

    update fix-arm-eabi-bridge.diff
    
    * patches/dev300/fix-arm-eabi-bridge.diff:

diff --git a/patches/dev300/fix-arm-eabi-bridge.diff b/patches/dev300/fix-arm-eabi-bridge.diff
index 680ab37..11f5203 100644
--- a/patches/dev300/fix-arm-eabi-bridge.diff
+++ b/patches/dev300/fix-arm-eabi-bridge.diff
@@ -7,8 +7,8 @@
 armeabi02: #i105359# fix arm-eabi uno bridge, fix exception handling, and fix struct returning rules
 
 diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/armhelper.S
---- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ bridges/source/cpp_uno/gcc3_linux_arm/armhelper.S	Tue Apr 27 11:17:28 2010 +0100
+--- /dev/null  Thu Jan 01 00:00:00 1970 +0000
++++ bridges/source/cpp_uno/gcc3_linux_arm/armhelper.S  Tue Apr 27 11:17:28 2010 +0100
 @@ -0,0 +1,38 @@
 +@ ARM support code for OpenOffice C++/UNO bridging
 +@
@@ -49,8 +49,8 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/armhe
 +	.size privateSnippetExecutor, . - privateSnippetExecutor
 +        .section        .note.GNU-stack,"",%progbits
 diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s
---- bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s	Wed Apr 21 18:35:51 2010 +0200
-+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
+--- bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s  Wed Apr 21 18:35:51 2010 +0200
++++ /dev/null  Thu Jan 01 00:00:00 1970 +0000
 @@ -1,22 +0,0 @@
 -@ ARM support code for OpenOffice C++/UNO bridging
 -@
@@ -75,8 +75,8 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/armhe
 -        ldr  fp, [sp, #-32]	   @ restore frame pointer
 -        ldr  pc, [sp, #-24]        @ return
 diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
---- bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx	Wed Apr 21 18:35:51 2010 +0200
-+++ bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx	Tue Apr 27 11:17:28 2010 +0100
+--- bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx  Wed Apr 21 18:35:51 2010 +0200
++++ bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx  Tue Apr 27 11:17:28 2010 +0100
 @@ -76,10 +76,8 @@
          
          if (pReturnTypeDescr)
@@ -89,7 +89,39 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/cpp2u
              else // complex return via ptr (pCppReturn)
              {
                  pCppReturn = *(void **)pCppStack;
-@@ -422,9 +420,9 @@
+@@ -410,8 +408,30 @@
+     void **pCallStack )
+ {
+     sal_Int64 nRegReturn;
+-    cpp_mediate( pFunctionAndOffset[0], pFunctionAndOffset[1], pCallStack,
++    typelib_TypeClass aType = cpp_mediate( pFunctionAndOffset[0], pFunctionAndOffset[1], pCallStack,
+         &nRegReturn );
++
++    switch( aType )
++    {
++        case typelib_TypeClass_BOOLEAN:
++        case typelib_TypeClass_BYTE:
++            nRegReturn = (unsigned long)(*(unsigned char *)&nRegReturn);
++            break;
++        case typelib_TypeClass_CHAR:
++        case typelib_TypeClass_UNSIGNED_SHORT:
++        case typelib_TypeClass_SHORT:
++            nRegReturn = (unsigned long)(*(unsigned short *)&nRegReturn);
++            break;
++        case typelib_TypeClass_ENUM:
++        case typelib_TypeClass_UNSIGNED_LONG:
++        case typelib_TypeClass_LONG:
++            nRegReturn = (unsigned long)(*(unsigned int *)&nRegReturn);
++            break;
++        case typelib_TypeClass_VOID:
++        default:
++            break;
++    }
++
+     return nRegReturn;
+ }
+ 
+@@ -422,9 +442,9 @@
      const int codeSnippetSize = 20;
  
      unsigned char *codeSnippet(unsigned char* code, sal_Int32 functionIndex, 
@@ -101,7 +133,7 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/cpp2u
              functionIndex |= 0x80000000;
  
          unsigned long * p = (unsigned long *)code;
-@@ -478,24 +476,25 @@
+@@ -478,24 +498,25 @@
          switch (member->eTypeClass)
          {
              case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -135,7 +167,7 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/cpp2u
              case typelib_TypeClass_INTERFACE_METHOD:
              {
                  (s++)->fn = code + writetoexecdiff;
-@@ -504,11 +503,8 @@
+@@ -504,11 +525,8 @@
                      reinterpret_cast<
                          typelib_InterfaceMethodTypeDescription * >(member);
  
@@ -149,8 +181,8 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/cpp2u
              }
          default:
 diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/except.cxx
---- bridges/source/cpp_uno/gcc3_linux_arm/except.cxx	Wed Apr 21 18:35:51 2010 +0200
-+++ bridges/source/cpp_uno/gcc3_linux_arm/except.cxx	Tue Apr 27 11:17:28 2010 +0100
+--- bridges/source/cpp_uno/gcc3_linux_arm/except.cxx   Wed Apr 21 18:35:51 2010 +0200
++++ bridges/source/cpp_uno/gcc3_linux_arm/except.cxx   Tue Apr 27 11:17:28 2010 +0100
 @@ -162,8 +162,8 @@
              else
              {
@@ -172,8 +204,8 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/excep
              }
          }
 diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk
---- bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk	Wed Apr 21 18:35:51 2010 +0200
-+++ bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk	Tue Apr 27 11:17:28 2010 +0100
+--- bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk  Wed Apr 21 18:35:51 2010 +0200
++++ bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk  Tue Apr 27 11:17:28 2010 +0100
 @@ -80,5 +80,5 @@
  
  .INCLUDE :  target.mk
@@ -182,8 +214,8 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/makef
 +$(SLO)$/%.obj: %.S
         $(CXX) -c -o $(SLO)$/$(@:b).o $< -fPIC ; touch $@
 diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
---- bridges/source/cpp_uno/gcc3_linux_arm/share.hxx	Wed Apr 21 18:35:51 2010 +0200
-+++ bridges/source/cpp_uno/gcc3_linux_arm/share.hxx	Tue Apr 27 11:17:28 2010 +0100
+--- bridges/source/cpp_uno/gcc3_linux_arm/share.hxx    Wed Apr 21 18:35:51 2010 +0200
++++ bridges/source/cpp_uno/gcc3_linux_arm/share.hxx    Tue Apr 27 11:17:28 2010 +0100
 @@ -89,5 +89,12 @@
      void fillUnoException(
          __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
@@ -198,9 +230,9 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/share
  #endif
  /* vi:set tabstop=4 shiftwidth=4 expandtab: */
 diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
---- bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx	Wed Apr 21 18:35:51 2010 +0200
-+++ bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx	Tue Apr 27 11:17:28 2010 +0100
-@@ -105,17 +105,58 @@
+--- bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx  Wed Apr 21 18:35:51 2010 +0200
++++ bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx  Tue Apr 27 11:17:28 2010 +0100
+@@ -105,50 +105,94 @@
  
  namespace arm
  {
@@ -250,7 +282,7 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2c
  }
  
 -void MapReturn(long r0, long r1, typelib_TypeClass eReturnType, void *pRegisterReturn)
-+void MapReturn(long r0, long r1, typelib_TypeDescriptionReference * pReturnType, void *pRegisterReturn)
++void MapReturn(sal_uInt32 r0, sal_uInt32 r1, typelib_TypeDescriptionReference * pReturnType, sal_uInt32* pRegisterReturn)
  {
  #if !defined(__ARM_EABI__) && !defined(__SOFTFP__)
      register float fret asm("f0");
@@ -262,7 +294,38 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2c
      {
          case typelib_TypeClass_HYPER:
          case typelib_TypeClass_UNSIGNED_HYPER:
-@@ -149,6 +190,13 @@
+-            ((long*)pRegisterReturn)[1] = r1;
++            pRegisterReturn[1] = r1;
+         case typelib_TypeClass_LONG:
+         case typelib_TypeClass_UNSIGNED_LONG:
+         case typelib_TypeClass_ENUM:
+-            ((long*)pRegisterReturn)[0] = r0;
+-            break;
+         case typelib_TypeClass_CHAR:
+         case typelib_TypeClass_SHORT:
+         case typelib_TypeClass_UNSIGNED_SHORT:
+-            *(unsigned short*)pRegisterReturn = (unsigned short)r0;
+-            break;
+         case typelib_TypeClass_BOOLEAN:
+         case typelib_TypeClass_BYTE:
+-            *(unsigned char*)pRegisterReturn = (unsigned char)r0;
++            pRegisterReturn[0] = r0;
+             break;
+         case typelib_TypeClass_FLOAT:
+ #if defined(__ARM_EABI__) || defined(__SOFTFP__)
+-            ((long*)pRegisterReturn)[0] = r0;
++            pRegisterReturn[0] = r0;
+ #else
+             *(float*)pRegisterReturn = fret;
+ #endif
+         break;
+         case typelib_TypeClass_DOUBLE:
+ #if defined(__ARM_EABI__) || defined(__SOFTFP__)
+-            ((long*)pRegisterReturn)[1] = r1;
+-            ((long*)pRegisterReturn)[0] = r0;
++            pRegisterReturn[1] = r1;
++            pRegisterReturn[0] = r0;
+ #else
              *(double*)pRegisterReturn = dret;
  #endif
              break;
@@ -270,13 +333,13 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2c
 +        case typelib_TypeClass_EXCEPTION:
 +        {
 +            if (!arm::return_in_hidden_param(pReturnType))
-+                ((long*)pRegisterReturn)[0] = r0;
++                pRegisterReturn[0] = r0;
 +            break;
 +        }
          default:
              break;
      }
-@@ -162,7 +210,7 @@
+@@ -162,7 +206,7 @@
      void * pThis,
      sal_Int32 nVtableIndex,
      void * pRegisterReturn,
@@ -285,7 +348,7 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2c
      sal_uInt32 *pStack,
      sal_uInt32 nStack,
      sal_uInt32 *pGPR,
-@@ -172,7 +220,7 @@
+@@ -172,7 +216,7 @@
      void * pThis,
      sal_Int32 nVtableIndex,
      void * pRegisterReturn,
@@ -294,7 +357,7 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2c
      sal_uInt32 *pStack,
      sal_uInt32 nStack,
      sal_uInt32 *pGPR,
-@@ -201,23 +249,10 @@
+@@ -201,23 +245,10 @@
      typedef void (*FunctionCall )( sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32);
      FunctionCall pFunc = (FunctionCall)pMethod;
  
@@ -307,21 +370,259 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2c
 -        : : "r" (pGPR)
 -        : "r0", "r1", "r2", "r3"
 -    );
+-
+-    // tell gcc that r0 to r3 are not available to it
+-    register sal_uInt32 r0 asm("r0");
+-    register sal_uInt32 r1 asm("r1");
+-    register sal_uInt32 r2 asm("r2");
+-    register sal_uInt32 r3 asm("r3");
 +    (*pFunc)(pGPR[0], pGPR[1], pGPR[2], pGPR[3]);
  
+-    (*pFunc)(r0, r1, r2, r3);
++    sal_uInt32 r0;
++    sal_uInt32 r1;
+ 
+     // get return value
+     __asm__ __volatile__ (
+@@ -225,7 +256,7 @@
+         "mov %1, r1\n\t"
+         : "=r" (r0), "=r" (r1) : );
+ 
+-    MapReturn(r0, r1, eReturnType, pRegisterReturn);
++    MapReturn(r0, r1, pReturnType, (sal_uInt32*)pRegisterReturn);
+ }
+ }
+ 
+@@ -312,14 +343,14 @@
+     void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
+ 
+     bool bOverFlow = false;
+-    
++    bool bSimpleReturn = true;
+     if (pReturnTypeDescr)
+     {
++        if (arm::return_in_hidden_param( pReturnTypeRef ) )
++            bSimpleReturn = false;
+ 
+-        if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
+-        {
++        if (bSimpleReturn)
+             pCppReturn = pUnoReturn; // direct way for simple types
+-        }
+         else
+         {
+             // complex return via ptr
+@@ -390,6 +421,8 @@
+             case typelib_TypeClass_DOUBLE:
+                 INSERT_DOUBLE( pCppArgs[nPos], nGPR, pGPR, pStack, pStackStart, bOverFlow );
+                 break;
++            default:
++                break;
+             }
+             // no longer needed
+             TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+@@ -431,7 +464,7 @@
+     {
+         callVirtualMethod(
+             pAdjustedThisPtr, aVtableSlot.index,
+-            pCppReturn, pReturnTypeDescr->eTypeClass,
++            pCppReturn, pReturnTypeRef,
+             pStackStart, 
+             (pStack - pStackStart),
+             pGPR, nGPR);
+@@ -504,15 +537,19 @@
+     // is my surrogate
+     bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+           = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
++#if OSL_DEBUG_LEVEL > 0
+     typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
++#endif
+     
+     switch (pMemberDescr->eTypeClass)
+     {
+     case typelib_TypeClass_INTERFACE_ATTRIBUTE:
+     {
++#if OSL_DEBUG_LEVEL > 0
+         // determine vtable call index
+         sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
+         OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
++#endif
+         
+         VtableSlot aVtableSlot(
+             getVtableSlot(
+@@ -557,9 +594,11 @@
+     }
+     case typelib_TypeClass_INTERFACE_METHOD:
+     {
++#if OSL_DEBUG_LEVEL > 0
+         // determine vtable call index
+         sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
+         OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
++#endif
+ 
+         VtableSlot aVtableSlot(
+             getVtableSlot(
+diff -urN bridges-old/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx.orig bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx.orig
+--- bridges-old/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx.orig	2010-05-04 18:35:23.000000000 +0200
++++ bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx.orig	2010-05-04 18:40:56.000000000 +0200
+@@ -42,7 +42,17 @@
+ #include <stdio.h>
+ #include <string.h>
+ 
+-#if defined(__ARM_EABI__) && !defined(__SOFTFP__)
++/* 
++ * Based on http://gcc.gnu.org/PR41443
++ * References to __SOFTFP__ are incorrect for EABI; the __SOFTFP__ code
++ * should be used for *soft-float ABI* whether or not VFP is enabled,
++ * and __SOFTFP__ does specifically mean soft-float not soft-float ABI.
++ *
++ * Changing the conditionals to __SOFTFP__ || __ARM_EABI__ then 
++ * -mfloat-abi=softfp should work.  -mfloat-abi=hard won't; that would
++ * need both a new macro to identify the hard-VFP ABI.
++ */
++#if !defined(__ARM_EABI__) && !defined(__SOFTFP__)
+ #error Not Implemented
+ 
+ /*
+@@ -95,17 +105,58 @@
+ 
+ namespace arm
+ {
+-    enum armlimits { MAX_GPR_REGS = 4 };
++    bool is_complex_struct(const typelib_TypeDescription * type)
++    {
++        const typelib_CompoundTypeDescription * p
++            = reinterpret_cast< const typelib_CompoundTypeDescription * >(type);
++        for (sal_Int32 i = 0; i < p->nMembers; ++i)
++        {
++            if (p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_STRUCT ||
++                p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_EXCEPTION)
++            {
++                typelib_TypeDescription * t = 0;
++                TYPELIB_DANGER_GET(&t, p->ppTypeRefs[i]);
++                bool b = is_complex_struct(t);
++                TYPELIB_DANGER_RELEASE(t);
++                if (b) {
++                    return true;
++                }
++            }
++            else if (!bridges::cpp_uno::shared::isSimpleType(p->ppTypeRefs[i]->eTypeClass))
++                return true;
++        }
++        if (p->pBaseTypeDescription != 0)
++            return is_complex_struct(&p->pBaseTypeDescription->aBase);
++        return false;
++    }
++
++    bool return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef )
++    {
++        if (bridges::cpp_uno::shared::isSimpleType(pTypeRef))
++            return false;
++        else if (pTypeRef->eTypeClass == typelib_TypeClass_STRUCT || pTypeRef->eTypeClass == typelib_TypeClass_EXCEPTION)
++        {
++            typelib_TypeDescription * pTypeDescr = 0;
++            TYPELIB_DANGER_GET( &pTypeDescr, pTypeRef );
++
++            //A Composite Type not larger than 4 bytes is returned in r0
++            bool bRet = pTypeDescr->nSize > 4 || is_complex_struct(pTypeDescr);
++
++            TYPELIB_DANGER_RELEASE( pTypeDescr );
++            return bRet;
++        }
++        return true;
++    }
+ }
+ 
+-void MapReturn(long r0, long r1, typelib_TypeClass eReturnType, void *pRegisterReturn)
++void MapReturn(long r0, long r1, typelib_TypeDescriptionReference * pReturnType, void *pRegisterReturn)
+ {
+-#ifndef __SOFTFP__
++#if !defined(__ARM_EABI__) && !defined(__SOFTFP__)
+     register float fret asm("f0");
+     register double dret asm("f0");
+ #endif
+ 
+-    switch( eReturnType )
++    switch( pReturnType->eTypeClass )
+     {
+         case typelib_TypeClass_HYPER:
+         case typelib_TypeClass_UNSIGNED_HYPER:
+@@ -125,20 +176,27 @@
+             *(unsigned char*)pRegisterReturn = (unsigned char)r0;
+             break;
+         case typelib_TypeClass_FLOAT:
+-#ifdef __SOFTFP__
++#if defined(__ARM_EABI__) || defined(__SOFTFP__)
+             ((long*)pRegisterReturn)[0] = r0;
+ #else
+             *(float*)pRegisterReturn = fret;
+ #endif
+         break;
+         case typelib_TypeClass_DOUBLE:
+-#ifdef __SOFTFP__
++#if defined(__ARM_EABI__) || defined(__SOFTFP__)
+             ((long*)pRegisterReturn)[1] = r1;
+             ((long*)pRegisterReturn)[0] = r0;
+ #else
+             *(double*)pRegisterReturn = dret;
+ #endif
+             break;
++        case typelib_TypeClass_STRUCT:
++        case typelib_TypeClass_EXCEPTION:
++        {
++            if (!arm::return_in_hidden_param(pReturnType))
++                ((long*)pRegisterReturn)[0] = r0;
++            break;
++        }
+         default:
+             break;
+     }
+@@ -152,7 +210,7 @@
+     void * pThis,
+     sal_Int32 nVtableIndex,
+     void * pRegisterReturn,
+-    typelib_TypeClass eReturnType,
++    typelib_TypeDescriptionReference * pReturnType,
+     sal_uInt32 *pStack,
+     sal_uInt32 nStack,
+     sal_uInt32 *pGPR,
+@@ -162,7 +220,7 @@
+     void * pThis,
+     sal_Int32 nVtableIndex,
+     void * pRegisterReturn,
+-    typelib_TypeClass eReturnType,
++    typelib_TypeDescriptionReference * pReturnType,
+     sal_uInt32 *pStack,
+     sal_uInt32 nStack,
+     sal_uInt32 *pGPR,
+@@ -191,23 +249,10 @@
+     typedef void (*FunctionCall )( sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32);
+     FunctionCall pFunc = (FunctionCall)pMethod;
+ 
+-    // fill registers
+-    __asm__ __volatile__ (
+-        "ldr r0, [%0, #0]\n\t"
+-        "ldr r1, [%0, #4]\n\t"
+-        "ldr r2, [%0, #8]\n\t"
+-        "ldr r3, [%0, #12]\n\t"
+-        : : "r" (pGPR)
+-        : "r0", "r1", "r2", "r3"
+-    );
+-
 -    // tell gcc that r0 to r3 are not available to it
 -    register sal_uInt32 r0 asm("r0");
 -    register sal_uInt32 r1 asm("r1");
 -    register sal_uInt32 r2 asm("r2");
 -    register sal_uInt32 r3 asm("r3");
--
++    (*pFunc)(pGPR[0], pGPR[1], pGPR[2], pGPR[3]);
+ 
 -    (*pFunc)(r0, r1, r2, r3);
 +    sal_uInt32 r0;
 +    sal_uInt32 r1;
  
      // get return value
      __asm__ __volatile__ (
-@@ -225,7 +260,7 @@
+@@ -215,7 +260,7 @@
          "mov %1, r1\n\t"
          : "=r" (r0), "=r" (r1) : );
  
@@ -330,7 +631,7 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2c
  }
  }
  
-@@ -312,14 +347,14 @@
+@@ -302,14 +347,14 @@
      void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
  
      bool bOverFlow = false;
@@ -349,7 +650,7 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2c
          else
          {
              // complex return via ptr
-@@ -390,6 +425,8 @@
+@@ -380,6 +425,8 @@
              case typelib_TypeClass_DOUBLE:
                  INSERT_DOUBLE( pCppArgs[nPos], nGPR, pGPR, pStack, pStackStart, bOverFlow );
                  break;
@@ -358,7 +659,7 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2c
              }
              // no longer needed
              TYPELIB_DANGER_RELEASE( pParamTypeDescr );
-@@ -431,7 +468,7 @@
+@@ -421,7 +468,7 @@
      {
          callVirtualMethod(
              pAdjustedThisPtr, aVtableSlot.index,
@@ -367,7 +668,7 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2c
              pStackStart, 
              (pStack - pStackStart),
              pGPR, nGPR);
-@@ -504,15 +541,19 @@
+@@ -494,15 +541,19 @@
      // is my surrogate
      bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
            = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
@@ -387,7 +688,7 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2c
          
          VtableSlot aVtableSlot(
              getVtableSlot(
-@@ -557,9 +598,11 @@
+@@ -547,9 +598,11 @@
      }
      case typelib_TypeClass_INTERFACE_METHOD:
      {
commit 440662c50f13d68a4f140946a384d876ae3b4388
Author: Rene Engelhard <rene at debian.org>
Date:   Mon May 3 22:27:31 2010 +0200

    m17 is supposed to be rc1
    
    * configure.in:

diff --git a/configure.in b/configure.in
index 40c232c..8edc91d 100644
--- a/configure.in
+++ b/configure.in
@@ -1570,6 +1570,8 @@ elif test "$with_tag" = "OOO310_m18" ; then
    UPSTREAM_VERSION=3.1.1
 elif test "$with_tag" = "OOO320_m8" ; then
    UPSTREAM_VERSION=3.2.0
+elif test "$with_tag" = "OOO320_m17" ; then
+   UPSTREAM_VERSION=3.2.1
 fi
 if test -n "$UPSTREAM_VERSION"; then
    UPSTREAM_NAME="OOo_${UPSTREAM_VERSION}_src"


More information about the ooo-build-commit mailing list