[libreoffice/f20] fix ppc64 build

David Tardon dtardon at fedoraproject.org
Thu Aug 28 12:00:06 UTC 2014


commit 98a4dc860a08f8b5f2e5f358564153f38193c629
Author: David Tardon <dtardon at redhat.com>
Date:   Thu Aug 28 10:14:43 2014 +0200

    fix ppc64 build
    
    Conflicts:
    	libreoffice.spec

 0001-fix-variable-name.patch                       |   26 +++++
 ...CALL_ELF-if-defined-_CALL_ELF-_CALL_ELF-2.patch |  103 ++++++++++++++++++++
 libreoffice.spec                                   |    2 +
 3 files changed, 131 insertions(+), 0 deletions(-)
---
diff --git a/0001-fix-variable-name.patch b/0001-fix-variable-name.patch
new file mode 100644
index 0000000..064d86c
--- /dev/null
+++ b/0001-fix-variable-name.patch
@@ -0,0 +1,26 @@
+From b38de1f8f3712f0a632ff9b6fa10df2cf3ce268f Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Thu, 28 Aug 2014 13:44:13 +0200
+Subject: [PATCH] fix variable name
+
+Change-Id: I170f0390f8f510591d444f44c20434b15077e687
+---
+ bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+index cfe720d..5836d8b 100644
+--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
++++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+@@ -233,7 +233,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
+                 "fmr    %0,     1\n\t"
+                 : "=f" (dret), "=r" (r3), "=r" (r4) : );
+ 
+-    MapReturn(r3, r4, dret, pReturnTypeRef, pRegisterReturn);
++    MapReturn(r3, r4, dret, pReturnTypeDescr, pRegisterReturn);
+ }
+ 
+ // Macros for easier insertion of values to registers or stack
+-- 
+1.9.3
+
diff --git a/0001-if-_CALL_ELF-if-defined-_CALL_ELF-_CALL_ELF-2.patch b/0001-if-_CALL_ELF-if-defined-_CALL_ELF-_CALL_ELF-2.patch
new file mode 100644
index 0000000..b13277c
--- /dev/null
+++ b/0001-if-_CALL_ELF-if-defined-_CALL_ELF-_CALL_ELF-2.patch
@@ -0,0 +1,103 @@
+From af73a28e8538f5b2df6bbfd592d8987511520d4d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Fri, 22 Aug 2014 21:08:47 +0100
+Subject: [PATCH] if _CALL_ELF -> if defined(_CALL_ELF) && _CALL_ELF == 2
+
+Change-Id: I34e9a98586b795a3fa31ae775aee7898b36e65d4
+---
+ bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx | 10 +++++-----
+ bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |  8 ++++----
+ 2 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+index 35cc16f..430999f 100644
+--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
++++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+@@ -326,7 +326,7 @@ static typelib_TypeClass cpp2uno_call(
+     }
+ }
+ 
+-#if _CALL_ELF == 2
++#if defined(_CALL_ELF) && _CALL_ELF == 2
+ #  define PARAMSAVE 32
+ #else
+ #  define PARAMSAVE 48
+@@ -545,7 +545,7 @@ extern "C" void privateSnippetExecutor( ... )
+                 "mr     %0,    1\n\t"
+                 : "=r" (sp) : );
+ 
+-#if _CALL_ELF == 2
++#if defined(_CALL_ELF) && _CALL_ELF == 2
+     volatile long nRegReturn[2];
+ #else
+     volatile long nRegReturn[1];
+@@ -592,7 +592,7 @@ extern "C" void privateSnippetExecutor( ... )
+         default:
+             __asm__( "ld 3,%0\n\t"
+                 : : "m" (nRegReturn[0]) );
+-#if _CALL_ELF == 2
++#if defined(_CALL_ELF) && _CALL_ELF == 2
+             __asm__( "ld 4,%0\n\t"
+                 : : "m" (nRegReturn[1]) );
+ #endif
+@@ -600,7 +600,7 @@ extern "C" void privateSnippetExecutor( ... )
+     }
+ }
+ 
+-#if _CALL_ELF == 2
++#if defined(_CALL_ELF) && _CALL_ELF == 2
+ const int codeSnippetSize = 32;
+ #else
+ const int codeSnippetSize = 24;
+@@ -618,7 +618,7 @@ unsigned char *  codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, sa
+ 
+     if ( bHasHiddenParam )
+         nOffsetAndIndex |= 0x80000000;
+-#if _CALL_ELF == 2
++#if defined(_CALL_ELF) && _CALL_ELF == 2
+     unsigned int *raw = (unsigned int *)&code[0];
+ 
+     raw[0] = 0xe96c0018;        /* 0:   ld      11,2f-0b(12)    */
+diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+index 391ef219..cfe720d 100644
+--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
++++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+@@ -39,7 +39,7 @@ using namespace ::com::sun::star::uno;
+ 
+ namespace ppc64
+ {
+-#if _CALL_ELF == 2
++#if defined(_CALL_ELF) && _CALL_ELF == 2
+     bool is_complex_struct(const typelib_TypeDescription * type)
+     {
+         const typelib_CompoundTypeDescription * p
+@@ -70,7 +70,7 @@ namespace ppc64
+     {
+         if (bridges::cpp_uno::shared::isSimpleType(pTypeRef))
+             return false;
+-#if _CALL_ELF == 2
++#if defined(_CALL_ELF) && _CALL_ELF == 2
+         else if (pTypeRef->eTypeClass == typelib_TypeClass_STRUCT || pTypeRef->eTypeClass == typelib_TypeClass_EXCEPTION)
+         {
+             typelib_TypeDescription * pTypeDescr = 0;
+@@ -115,7 +115,7 @@ void MapReturn(long r3, long r4, double dret, typelib_TypeDescriptionReference*
+     case typelib_TypeClass_DOUBLE:
+             *reinterpret_cast<double *>( pRegisterReturn ) = dret;
+             break;
+-#if _CALL_ELF == 2
++#if defined(_CALL_ELF) && _CALL_ELF == 2
+     case typelib_TypeClass_STRUCT:
+     case typelib_TypeClass_EXCEPTION:
+             if (!ppc64::return_in_hidden_param(pReturnType))
+@@ -175,7 +175,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
+     pMethod += 8 * nVtableIndex;
+     pMethod = *((sal_uInt64 *)pMethod);
+ 
+-#if _CALL_ELF == 2
++#if defined(_CALL_ELF) && _CALL_ELF == 2
+     typedef void (* FunctionCall )(...);
+ #else
+     typedef void (* FunctionCall )( sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64 );
+-- 
+1.9.3
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 5d752ae..e0d6603 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -299,6 +299,8 @@ Patch48: 0001-refine-current-date-time-hotkey-handling.patch
 Patch49: 0001-disable-libe-book-support.patch
 Patch50: 0001-disable-FreeHand-support.patch
 %endif
+Patch51: 0001-if-_CALL_ELF-if-defined-_CALL_ELF-_CALL_ELF-2.patch
+Patch52: 0001-fix-variable-name.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/libreoffice


More information about the scm-commits mailing list