Index: udk/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s diff -u udk/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s:1.2 udk/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s:1.2.2.1 --- udk/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s:1.2 Mon Nov 26 10:01:26 2007 +++ udk/bridges/source/cpp_uno/gcc3_linux_arm/armhelper.s Mon Dec 3 10:56:58 2007 @@ -8,14 +8,15 @@ .global privateSnippetExecutor .type privateSnippetExecutor, %function privateSnippetExecutor: - stmfd sp!, {r0-r3} @ follow other parameters on stack - stmfd sp!, {fp,ip,lr} - add fp, sp, #28 - + stmfd sp!, {r0-r3} @ follow other parameters on stack mov r0, ip @ r0 points to functionoffset/vtable - add r1, sp, #12 @ r1 points to this and params + mov ip, sp @ fix up the ip + stmfd sp!, {fp,ip,lr,pc} @ 8 x 4 => stack remains 8 aligned + sub fp, ip, #4 @ set frame pointer + + add r1, sp, #16 @ r1 points to this and params bl cpp_vtable_call(PLT) - add sp, sp, #28 @ restore stack - ldr fp, [sp, #-28] @ restore fp - ldr pc, [sp, #-20] @ return + add sp, sp, #32 @ restore stack + ldr fp, [sp, #-32] @ restore frame pointer + ldr pc, [sp, #-24] @ return Index: udk/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx diff -u udk/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx:1.2 udk/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx:1.2.2.1 --- udk/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx:1.2 Mon Nov 26 10:01:44 2007 +++ udk/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx Mon Dec 3 10:56:58 2007 @@ -70,7 +70,8 @@ sal_Int64 * pRegisterReturn /* space for register return */ ) { // pCallStack: ret, [return ptr], this, params - char * pCppStack = (char *)(pCallStack + 0); + char * pTopStack = (char *)(pCallStack + 0); + char * pCppStack = pTopStack; // return typelib_TypeDescription * pReturnTypeDescr = 0; @@ -115,7 +116,7 @@ (typelib_TypeDescription **)(pUnoArgs + (3 * nParams)); sal_Int32 nTempIndizes = 0; - + for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos ) { const typelib_MethodParameter & rParam = pParams[nPos]; @@ -125,6 +126,19 @@ if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr )) { +#ifdef __ARM_EABI__ + switch (pParamTypeDescr->eTypeClass) + { + case typelib_TypeClass_HYPER: + case typelib_TypeClass_UNSIGNED_HYPER: + case typelib_TypeClass_DOUBLE: + if ((pCppStack - pTopStack) % 8) pCppStack+=sizeof(sal_Int32); //align to 8 + break; + default: + break; + } +#endif + pCppArgs[nPos] = pCppStack; pUnoArgs[nPos] = pCppStack; switch (pParamTypeDescr->eTypeClass) @@ -406,7 +420,6 @@ sal_Int64 nRegReturn; cpp_mediate( pFunctionAndOffset[0], pFunctionAndOffset[1], pCallStack, &nRegReturn ); - return nRegReturn; } Index: udk/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx diff -u udk/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx:1.2 udk/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx:1.2.2.1 --- udk/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx:1.2 Mon Nov 26 10:02:01 2007 +++ udk/bridges/source/cpp_uno/gcc3_linux_arm/except.cxx Mon Dec 3 10:56:58 2007 @@ -284,8 +284,21 @@ } } - __cxa_throw( pCppExc, rtti, deleteException ); + + __cxa_throw( pCppExc, rtti, deleteException ); + } + +#ifdef __ARM_EABI__ + static void* getAdjustedPtr(__cxa_exception* header) + { + return (void*)header->unwindHeader.barrier_cache.bitpattern[0]; } +#else + static void* getAdjustedPtr(__cxa_exception* header) + { + return header->adjustedPtr; + } +#endif //=================================================================== void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno ) @@ -326,7 +339,7 @@ else { // construct uno exception any - uno_any_constructAndConvert( pUnoExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno ); + uno_any_constructAndConvert( pUnoExc, getAdjustedPtr(header), pExcTypeDescr, pCpp2Uno ); typelib_typedescription_release( pExcTypeDescr ); } } Index: udk/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk diff -u udk/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk:1.2 udk/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk:1.2.2.1 --- udk/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk:1.2 Mon Nov 26 10:02:19 2007 +++ udk/bridges/source/cpp_uno/gcc3_linux_arm/makefile.mk Mon Dec 3 10:56:58 2007 @@ -84,13 +84,14 @@ NOOPTFILES= \ $(SLO)$/cpp2uno.obj \ + $(SLO)$/except.obj \ $(SLO)$/uno2cpp.obj CFLAGSNOOPT=-O0 SLOFILES= \ - $(SLO)$/except.obj \ $(SLO)$/cpp2uno.obj \ + $(SLO)$/except.obj \ $(SLO)$/uno2cpp.obj \ $(SLO)$/armhelper.obj Index: udk/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx diff -u udk/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx:1.2 udk/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx:1.2.2.1 --- udk/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx:1.2 Mon Nov 26 10:02:35 2007 +++ udk/bridges/source/cpp_uno/gcc3_linux_arm/share.hxx Mon Dec 3 10:56:58 2007 @@ -32,11 +32,14 @@ * MA 02111-1307 USA * ************************************************************************/ +#ifndef _ARM_SHARE_HXX +#define _ARM_SHARE_HXX #include "uno/mapping.h" #include #include #include +#include namespace CPPU_CURRENT_NAMESPACE { @@ -45,14 +48,6 @@ // -- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h - struct _Unwind_Exception - { - unsigned exception_class __attribute__((__mode__(__DI__))); - void * exception_cleanup; - unsigned private_1 __attribute__((__mode__(__word__))); - unsigned private_2 __attribute__((__mode__(__word__))); - } __attribute__((__aligned__)); - struct __cxa_exception { ::std::type_info *exceptionType; @@ -64,13 +59,16 @@ __cxa_exception *nextException; int handlerCount; - +#ifdef __ARM_EABI__ + __cxa_exception *nextPropagatingException; + int propagationCount; +#else int handlerSwitchValue; const unsigned char *actionRecord; const unsigned char *languageSpecificData; void *catchTemp; void *adjustedPtr; - +#endif _Unwind_Exception unwindHeader; }; @@ -84,6 +82,9 @@ { __cxa_exception *caughtExceptions; unsigned int uncaughtExceptions; +#ifdef __ARM_EABI__ + __cxa_exception *propagatingExceptions; +#endif }; extern "C" __cxa_eh_globals *__cxa_get_globals () throw(); @@ -96,5 +97,5 @@ void fillUnoException( __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno ); } - +#endif /* vi:set tabstop=4 shiftwidth=4 expandtab: */ Index: udk/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx diff -u udk/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx:1.2 udk/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx:1.2.2.1 --- udk/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx:1.2 Mon Nov 26 10:02:47 2007 +++ udk/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx Mon Dec 3 10:56:58 2007 @@ -50,6 +50,53 @@ #include #include +#if defined(__ARM_EABI__) && !defined(__SOFTFP__) +#error Not Implemented + +/* + some possibly handy code to detect that we have VFP registers + */ + +#include +#include +#include +#include +#include + +#define HWCAP_ARM_VFP 64 + +int hasVFP(void) +{ + int fd = open ("/proc/self/auxv", O_RDONLY); + if (fd == -1) + return -1; + + int ret = -1; + + Elf32_auxv_t buf[128]; + ssize_t n; + while ((ret == -1) && ((n = read(fd, buf, sizeof (buf))) > 0)) + { + for (int i = 0; i < 128; ++i) + { + if (buf[i].a_type == AT_HWCAP) + { + ret = (buf[i].a_un.a_val & HWCAP_ARM_VFP) ? true : false; + break; + } + else if (buf[i].a_type == AT_NULL) + { + ret = -2; + break; + } + } + } + + close (fd); + return ret; +} + +#endif using namespace ::rtl; using namespace ::com::sun::star::uno; @@ -188,15 +235,39 @@ if (bOverFlow) \ *pDS++ = *reinterpret_cast( pSV ); -#define INSERT_INT64( pSV, nr, pGPR, pDS, bOverflow ) \ +#ifdef __ARM_EABI__ +#define INSERT_INT64( pSV, nr, pGPR, pDS, pStart, bOverflow ) \ + if ( (nr < arm::MAX_GPR_REGS) && (nr % 2) ) \ + { \ + ++nr; \ + } \ + if ( nr < arm::MAX_GPR_REGS ) \ + { \ + pGPR[nr++] = *reinterpret_cast( pSV ); \ + pGPR[nr++] = *(reinterpret_cast( pSV ) + 1); \ + } \ + else \ + bOverFlow = true; \ + if (bOverFlow) \ + { \ + if ( (pDS - pStart) % 2) \ + { \ + ++pDS; \ + } \ + *pDS++ = reinterpret_cast( pSV )[0]; \ + *pDS++ = reinterpret_cast( pSV )[1]; \ + } +#else +#define INSERT_INT64( pSV, nr, pGPR, pDS, pStart, bOverflow ) \ INSERT_INT32( pSV, nr, pGPR, pDS, bOverflow) \ INSERT_INT32( ((sal_uInt32*)pSV)+1, nr, pGPR, pDS, bOverflow) +#endif #define INSERT_FLOAT( pSV, nr, pFPR, pDS, bOverflow ) \ INSERT_INT32( pSV, nr, pGPR, pDS, bOverflow) -#define INSERT_DOUBLE( pSV, nr, pFPR, pDS, bOverflow ) \ - INSERT_INT64( pSV, nr, pGPR, pDS, bOverflow ) +#define INSERT_DOUBLE( pSV, nr, pFPR, pDS, pStart, bOverflow ) \ + INSERT_INT64( pSV, nr, pGPR, pDS, pStart, bOverflow ) #define INSERT_INT16( pSV, nr, pGPR, pDS, bOverflow ) \ if ( nr < arm::MAX_GPR_REGS ) \ @@ -292,7 +363,7 @@ #ifdef CMC_DEBUG fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]); #endif - INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow ); + INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, pStackStart, bOverFlow ); break; case typelib_TypeClass_LONG: case typelib_TypeClass_UNSIGNED_LONG: @@ -315,7 +386,7 @@ INSERT_FLOAT( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow ); break; case typelib_TypeClass_DOUBLE: - INSERT_DOUBLE( pCppArgs[nPos], nGPR, pGPR, pStack, bOverFlow ); + INSERT_DOUBLE( pCppArgs[nPos], nGPR, pGPR, pStack, pStackStart, bOverFlow ); break; } // no longer needed Index: tools/solenv/bin/modules/installer/epmfile.pm diff -u tools/solenv/bin/modules/installer/epmfile.pm:1.73 tools/solenv/bin/modules/installer/epmfile.pm:1.73.26.1 --- tools/solenv/bin/modules/installer/epmfile.pm:1.73 Mon Nov 26 05:16:36 2007 +++ tools/solenv/bin/modules/installer/epmfile.pm Mon Dec 3 11:04:16 2007 @@ -48,6 +48,7 @@ use installer::scriptitems; use installer::systemactions; use installer::worker; +use POSIX; ############################################################################ # The header file contains the strings for the epm header in all languages @@ -2248,6 +2249,7 @@ elsif ( $installer::globals::compiler =~ /unxlngs/) { $target = "sparc"; } elsif ( $installer::globals::compiler =~ /unxlngppc64/) {$target = "ppc64"; } elsif ( $installer::globals::compiler =~ /unxlngppc/) {$target = "ppc"; } + elsif ( $installer::globals::compiler =~ /unxlng/) {$target = (POSIX::uname())[4]; } my $systemcall = "$rpmcommand -bb $specfilename --target $target 2\>\&1 |"; @@ -2426,11 +2428,17 @@ if ( $installer::globals::islinuxrpmbuild ) { my $rpmdir; + my $machine = ""; if ( $installer::globals::compiler =~ /unxlngi/) { $rpmdir = "$installer::globals::epmoutpath/RPMS/i586"; } elsif ( $installer::globals::compiler =~ /unxlngx/) { $rpmdir = "$installer::globals::epmoutpath/RPMS/x86_64"; } elsif ( $installer::globals::compiler =~ /unxlngs/) { $rpmdir = "$installer::globals::epmoutpath/RPMS/sparc"; } elsif ( $installer::globals::compiler =~ /unxlngppc64/) { $rpmdir = "$installer::globals::epmoutpath/RPMS/ppc64"; } elsif ( $installer::globals::compiler =~ /unxlngppc/) { $rpmdir = "$installer::globals::epmoutpath/RPMS/ppc"; } + elsif ( $installer::globals::compiler =~ /unxlng/) { + $machine = (POSIX::uname())[4]; + $rpmdir = "$installer::globals::epmoutpath/RPMS/$machine"; + } + else { installer::exiter::exit_program("ERROR: rpmdir undefined !", "create_new_directory_structure"); } my $systemcall = "mv $rpmdir/* $newdir"; # moving the rpms into the directory "RPMS" @@ -2452,6 +2460,10 @@ # and removing the empty directory + if ( $machine ne "" ) + { + installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/$machine"); + } installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/x86_64"); installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/i586"); installer::systemactions::remove_empty_directory("$installer::globals::epmoutpath/RPMS/i386"); Index: tools/solenv/bin/modules/installer/parameter.pm diff -u tools/solenv/bin/modules/installer/parameter.pm:1.45 tools/solenv/bin/modules/installer/parameter.pm:1.45.118.1 --- tools/solenv/bin/modules/installer/parameter.pm:1.45 Thu Sep 6 02:52:48 2007 +++ tools/solenv/bin/modules/installer/parameter.pm Mon Dec 3 11:04:16 2007 @@ -308,7 +308,7 @@ if ( $installer::globals::compiler =~ /unxso[lg]i/ ) { $installer::globals::issolarisx86build = 1; } - if ( $installer::globals::compiler =~ /unxlngi/ || $installer::globals::compiler =~ /unxlngx/ || $installer::globals::compiler =~ /unxlngs/ || $installer::globals::compiler =~ /unxlngppc/ ) + if ( $installer::globals::compiler =~ /unxlng/ ) { $installer::globals::islinuxbuild = 1; if ( $installer::globals::packageformat eq "rpm" )