[libreoffice] fix ppc64 build
David Tardon
dtardon at fedoraproject.org
Thu Aug 28 10:50:05 UTC 2014
commit 93a96dec69e13416694e5335c8550aebd0d60a07
Author: David Tardon <dtardon at redhat.com>
Date: Thu Aug 28 10:14:43 2014 +0200
fix ppc64 build
...CALL_ELF-if-defined-_CALL_ELF-_CALL_ELF-2.patch | 103 ++++++++++++++++++++
libreoffice.spec | 1 +
2 files changed, 104 insertions(+), 0 deletions(-)
---
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 a952839..043140d 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -307,6 +307,7 @@ Patch19: 0001-Related-rhbz-1117853-nStartPara-of-EE_PARA_NOT_FOUND.patch
Patch20: 0001-Resolves-fdo-81487-pasting-into-outline-view-crashes.patch
Patch21: 0001-Related-rhbz-1130264-plausible-fix-for-reported-cras.patch
Patch22: 0001-Resolves-rhbz-1125588-port-LibreOffice-to-ppc64le.patch
+Patch23: 0001-if-_CALL_ELF-if-defined-_CALL_ELF-_CALL_ELF-2.patch
%define instdir %{_libdir}
%define baseinstdir %{instdir}/libreoffice
More information about the scm-commits
mailing list