From 2c78b9754cd0638c4ba990970302077829c534b1 Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Thu, 25 Feb 2021 18:32:27 +0000 Subject: [PATCH] MFH: r560298 r560302 r561371 r562151 r562559 r563142 r563143 r563149 r565356 r565465 r566011 r566182 finance/quickfix: fix build on non-x86 Code uses x86 assembly, but makes it possible to use Boost atomic. multimedia/zoneminder: enable on powerpc64 net/mpich: fix build on powerpc64 Neither __BYTE_ORDER nor __BIG_ENDIAN are defined: In file included from src/mpi/datatype/typerep/dataloop/looputil.c:10: ./src/mpi/datatype/typerep/dataloop/looputil.h:57:2: error: This code assumes that __BYTE_ORDER and __BIG_ENDIAN are defined #error This code assumes that __BYTE_ORDER and __BIG_ENDIAN are defined editors/libreoffice: fix build on powerpc64 elfv2 This set of patches is applied only on powerpc* architectures. Submitted by: afsilva Approved by: tier 2 blanket security/openconnect-gui: fix checksum emulators/riscv-isa-sim: enable on powerpc64 sysutils/linuxfdisk: enable on powerpc64 graphics/openfx-arena: enable on powerpc64 multimedia/arcan: enable LUAJIT on powerpc64 It builds fine with luajit-openresty. games/libretro-desmume2015: fix build on non-x86 / ARM JIT is only for x86 and ARM. astro/opencpn: fix build on powerpc64* Use GCC unconditionally on powerpc64*: In file included from /usr/lib/clang/11.0.1/include/xmmintrin.h:13: /usr/lib/clang/11.0.1/include/mmintrin.h:33:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'? __builtin_ia32_emms(); editors/libreoffice6: backport powerpc* patches to libreoffice6 Approved by: tier 2 blanket --- astro/opencpn/Makefile | 10 +- editors/libreoffice/Makefile | 4 + ...e-cpp_uno-gcc3_linux_powerpc64-cpp2uno.cxx | 79 ++++++++++++ ...ce-cpp_uno-gcc3_linux_powerpc64-except.cxx | 112 ++++++++++++++++++ ...rce-cpp_uno-gcc3_linux_powerpc64-share.hxx | 106 +++++++++++++++++ .../patch-cppuhelper_source_exc__thrower.cxx | 10 ++ ...desktop_source_deployment_misc_dp__ucb.cxx | 20 ++++ ...patch-include_com_sun_star_uno_Reference.h | 11 ++ ...tch-include_com_sun_star_uno_Reference.hxx | 20 ++++ .../powerpc64/patch-include_uno_mapping.hxx | 10 ++ .../patch-ucb_source_ucp_file_bc.cxx | 10 ++ editors/libreoffice6/Makefile | 4 + editors/libreoffice6/files/patch-powerpc | 14 ++- ...e-cpp_uno-gcc3_linux_powerpc64-cpp2uno.cxx | 79 ++++++++++++ ...ce-cpp_uno-gcc3_linux_powerpc64-except.cxx | 112 ++++++++++++++++++ ...rce-cpp_uno-gcc3_linux_powerpc64-share.hxx | 106 +++++++++++++++++ .../patch-cppuhelper_source_exc__thrower.cxx | 10 ++ ...desktop_source_deployment_misc_dp__ucb.cxx | 20 ++++ ...patch-include_com_sun_star_uno_Reference.h | 11 ++ ...tch-include_com_sun_star_uno_Reference.hxx | 20 ++++ .../powerpc64/patch-include_uno_mapping.hxx | 10 ++ .../patch-ucb_source_ucp_file_bc.cxx | 10 ++ emulators/riscv-isa-sim/Makefile | 2 +- finance/quickfix/Makefile | 9 +- games/libretro-desmume2015/Makefile | 6 + ...c_libretro-common_features_features__cpu.c | 11 ++ graphics/openfx-arena/Makefile | 2 +- multimedia/arcan/Makefile | 2 +- multimedia/zoneminder/Makefile | 2 +- net/mpich/Makefile | 2 + security/openconnect-gui/distinfo | 6 +- sysutils/linuxfdisk/Makefile | 2 +- 32 files changed, 817 insertions(+), 15 deletions(-) create mode 100644 editors/libreoffice/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-cpp2uno.cxx create mode 100644 editors/libreoffice/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-except.cxx create mode 100644 editors/libreoffice/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-share.hxx create mode 100644 editors/libreoffice/files/powerpc64/patch-cppuhelper_source_exc__thrower.cxx create mode 100644 editors/libreoffice/files/powerpc64/patch-desktop_source_deployment_misc_dp__ucb.cxx create mode 100644 editors/libreoffice/files/powerpc64/patch-include_com_sun_star_uno_Reference.h create mode 100644 editors/libreoffice/files/powerpc64/patch-include_com_sun_star_uno_Reference.hxx create mode 100644 editors/libreoffice/files/powerpc64/patch-include_uno_mapping.hxx create mode 100644 editors/libreoffice/files/powerpc64/patch-ucb_source_ucp_file_bc.cxx create mode 100644 editors/libreoffice6/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-cpp2uno.cxx create mode 100644 editors/libreoffice6/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-except.cxx create mode 100644 editors/libreoffice6/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-share.hxx create mode 100644 editors/libreoffice6/files/powerpc64/patch-cppuhelper_source_exc__thrower.cxx create mode 100644 editors/libreoffice6/files/powerpc64/patch-desktop_source_deployment_misc_dp__ucb.cxx create mode 100644 editors/libreoffice6/files/powerpc64/patch-include_com_sun_star_uno_Reference.h create mode 100644 editors/libreoffice6/files/powerpc64/patch-include_com_sun_star_uno_Reference.hxx create mode 100644 editors/libreoffice6/files/powerpc64/patch-include_uno_mapping.hxx create mode 100644 editors/libreoffice6/files/powerpc64/patch-ucb_source_ucp_file_bc.cxx create mode 100644 games/libretro-desmume2015/files/patch-desmume_src_libretro-common_features_features__cpu.c diff --git a/astro/opencpn/Makefile b/astro/opencpn/Makefile index d8d06a82f39d..2c48e4ec7160 100644 --- a/astro/opencpn/Makefile +++ b/astro/opencpn/Makefile @@ -17,8 +17,8 @@ LIB_DEPENDS= libportaudio.so:audio/portaudio \ libtinyxml.so:textproc/tinyxml \ liblz4.so:archivers/liblz4 -USES= cmake compiler:c++11-lang gettext-tools gl gnome \ - localbase pkgconfig sqlite xorg +USES= cmake gettext-tools gl gnome libarchive localbase pkgconfig \ + sqlite xorg USE_CXXSTD= c++11 USE_GITHUB= yes GH_ACCOUNT= ${GH_PROJECT} @@ -40,8 +40,10 @@ DOCS_CMAKE_OFF= -DOCPN_BUNDLE_DOCS:STRING="OFF" .include -.if ${ARCH} == powerpc64 -CMAKE_ARGS+= -DHAVE_MSSE=OFF -DHAVE_MSSE2=OFF -DHAVE_MSSE3=OFF -DHAVE_MAVX2=OFF -DHAVE_MFPU_NEON=OFF +.if ${ARCH:Mpowerpc64*} +USES+= compiler:gcc-c++11-lib +.else +USES+= compiler:c++11-lang .endif .include diff --git a/editors/libreoffice/Makefile b/editors/libreoffice/Makefile index 33b23d2ec926..75985324f384 100644 --- a/editors/libreoffice/Makefile +++ b/editors/libreoffice/Makefile @@ -279,6 +279,10 @@ MAKE_ENV+= verbose=1 .include +.if ${ARCH:Mpowerpc*} +EXTRA_PATCHES+= ${FILESDIR}/powerpc64 +.endif + .if ${ARCH} == powerpc || ${ARCH} == powerpcspe || ${ARCH} == powerpc64 CONFIGURE_ARGS+= --disable-skia .endif diff --git a/editors/libreoffice/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-cpp2uno.cxx b/editors/libreoffice/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-cpp2uno.cxx new file mode 100644 index 000000000000..22102d34d855 --- /dev/null +++ b/editors/libreoffice/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-cpp2uno.cxx @@ -0,0 +1,79 @@ +--- bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx.orig 2020-04-04 12:03:03.236554000 -0500 ++++ bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 2020-04-08 14:28:30.208034000 -0500 +@@ -341,7 +341,7 @@ + + static typelib_TypeClass cpp_mediate( + sal_uInt64 nOffsetAndIndex, +- void ** gpreg, void ** fpreg, long sp, ++ void ** gpreg, void ** fpreg, long fp, + sal_Int64 * pRegisterReturn /* space for register return */ ) + { + static_assert(sizeof(sal_Int64)==sizeof(void *), "### unexpected!"); +@@ -349,8 +349,8 @@ + sal_Int32 nVtableOffset = (nOffsetAndIndex >> 32); + sal_Int32 nFunctionIndex = (nOffsetAndIndex & 0xFFFFFFFF); + +- long sf = *(long*)sp; +- void ** ovrflw = (void**)(sf + PARAMSAVE + 64); ++ /* XXX: This is the stack frame!!!! */ ++ void ** ovrflw = (void**)(fp + PARAMSAVE + 64); + + // gpreg: [ret *], this, [other gpr params] + // fpreg: [fpr params] +@@ -513,18 +513,22 @@ + return eRet; + } + +-extern "C" void privateSnippetExecutor( ... ) ++extern "C" void privateSnippetExecutor( uint64_t a, ... ) + { ++ va_list args, fpargs; + sal_uInt64 gpreg[ppc64::MAX_GPR_REGS]; + +- register long r3 asm("r3"); gpreg[0] = r3; +- register long r4 asm("r4"); gpreg[1] = r4; +- register long r5 asm("r5"); gpreg[2] = r5; +- register long r6 asm("r6"); gpreg[3] = r6; +- register long r7 asm("r7"); gpreg[4] = r7; +- register long r8 asm("r8"); gpreg[5] = r8; +- register long r9 asm("r9"); gpreg[6] = r9; +- register long r10 asm("r10"); gpreg[7] = r10; ++ va_start(args, a); ++ va_copy(fpargs, args); ++ /* Start with all the GPRs */ ++ gpreg[0] = a; ++ gpreg[1] = va_arg(args, uint64_t); ++ gpreg[2] = va_arg(args, uint64_t); ++ gpreg[3] = va_arg(args, uint64_t); ++ gpreg[4] = va_arg(args, uint64_t); ++ gpreg[5] = va_arg(args, uint64_t); ++ gpreg[6] = va_arg(args, uint64_t); ++ gpreg[7] = va_arg(args, uint64_t); + + double fpreg[ppc64::MAX_SSE_REGS]; + +@@ -547,11 +551,11 @@ + "fr10", "fr11", "fr12", "fr13" + ); + +- register long r11 asm("r11"); +- const long nOffsetAndIndex = r11; ++ long nOffsetAndIndex; ++ long fp; + +- register long r1 asm("r1"); +- const long sp = r1; ++ __asm __volatile("mr %0, 11\n" : "=r"(nOffsetAndIndex)); ++ fp = (long)__builtin_frame_address(0); + + #if defined(_CALL_ELF) && _CALL_ELF == 2 + volatile long nRegReturn[2]; +@@ -560,7 +564,7 @@ + #endif + + typelib_TypeClass aType = +- cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, sp, (sal_Int64*)nRegReturn); ++ cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, fp, (sal_Int64*)nRegReturn); + + switch( aType ) + { diff --git a/editors/libreoffice/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-except.cxx b/editors/libreoffice/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-except.cxx new file mode 100644 index 000000000000..3d9108a73ece --- /dev/null +++ b/editors/libreoffice/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-except.cxx @@ -0,0 +1,112 @@ +--- bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx.orig 2019-12-05 13:59:23.000000000 -0600 ++++ bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx 2020-09-14 11:24:58.489149000 -0500 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -136,7 +137,7 @@ + buf.append( 'E' ); + + OString symName( buf.makeStringAndClear() ); +- rtti = (type_info *)dlsym( m_hApp, symName.getStr() ); ++ rtti = static_cast(dlsym( m_hApp, symName.getStr() )); + + if (rtti) + { +@@ -161,9 +162,9 @@ + { + // ensure availability of base + type_info * base_rtti = getRTTI( +- (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription ); ++ pTypeDescr->pBaseTypeDescription ); + rtti = new __si_class_type_info( +- strdup( rttiName ), (__class_type_info *)base_rtti ); ++ strdup( rttiName ), static_cast<__class_type_info *>(base_rtti )); + } + else + { +@@ -192,8 +193,8 @@ + + static void deleteException( void * pExc ) + { +- __cxa_exception const * header = ((__cxa_exception const *)pExc - 1); +- typelib_TypeDescription * pTD = 0; ++ __cxxabiv1::__cxa_exception const * header = static_cast<__cxxabiv1::__cxa_exception const *>(pExc) - 1; ++ typelib_TypeDescription * pTD = nullptr; + OUString unoName( toUNOname( header->exceptionType->name() ) ); + ::typelib_typedescription_getByName( &pTD, unoName.pData ); + assert(pTD && "### unknown exception type! leaving out destruction => leaking!!!"); +@@ -216,39 +217,57 @@ + if (! pTypeDescr) + terminate(); + +- pCppExc = __cxa_allocate_exception( pTypeDescr->nSize ); ++ pCppExc = __cxxabiv1::__cxa_allocate_exception( pTypeDescr->nSize ); + ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp ); + + // destruct uno exception +- ::uno_any_destruct( pUnoExc, 0 ); ++ ::uno_any_destruct( pUnoExc, nullptr ); + // avoiding locked counts + static RTTI rtti_data; +- rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr); ++ rtti = rtti_data.getRTTI(reinterpret_cast(pTypeDescr)); + TYPELIB_DANGER_RELEASE( pTypeDescr ); + if (! rtti) +- terminate(); ++ { ++ throw RuntimeException( ++ "no rtti for type " + ++ OUString::unacquired( &pUnoExc->pType->pTypeName ) ); + } ++ } + +- __cxa_throw( pCppExc, rtti, deleteException ); ++ __cxxabiv1::__cxa_throw( pCppExc, rtti, deleteException ); + } + + void fillUnoException(uno_Any * pExc, uno_Mapping * pCpp2Uno) + { +- __cxa_exception * header = __cxa_get_globals()->caughtExceptions; ++ __cxxabiv1::__cxa_exception * header = ++ __cxxabiv1::__cxa_get_globals()->caughtExceptions; + if (! header) + terminate(); + +- std::type_info *exceptionType = __cxa_current_exception_type(); ++ std::type_info *exceptionType = __cxxabiv1::__cxa_current_exception_type(); + +- typelib_TypeDescription * pExcTypeDescr = 0; ++ typelib_TypeDescription * pExcTypeDescr = nullptr; + OUString unoName( toUNOname( exceptionType->name() ) ); +- ::typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData ); +- if (! pExcTypeDescr) ++ typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData ); ++ if (pExcTypeDescr == nullptr) ++ { ++ RuntimeException aRE( "exception type not found: " + unoName ); ++ Type const & rType = cppu::UnoType::get(); ++ uno_type_any_constructAndConvert( pExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); ++ SAL_WARN("bridges", aRE.Message); ++ } ++ else ++ { ++ // construct uno exception any ++ uno_any_constructAndConvert( pExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno ); ++ typelib_typedescription_release( pExcTypeDescr ); ++ } ++ if (nullptr == pExcTypeDescr) + terminate(); + + // construct uno exception any +- ::uno_any_constructAndConvert( pExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno ); +- ::typelib_typedescription_release( pExcTypeDescr ); ++ uno_any_constructAndConvert( pExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno ); ++ typelib_typedescription_release( pExcTypeDescr ); + } + + } diff --git a/editors/libreoffice/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-share.hxx b/editors/libreoffice/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-share.hxx new file mode 100644 index 000000000000..7411e8e8cf32 --- /dev/null +++ b/editors/libreoffice/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-share.hxx @@ -0,0 +1,106 @@ +--- bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx.orig 2020-04-07 10:06:14.193381000 -0500 ++++ bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx 2020-04-09 11:33:30.706043000 -0500 +@@ -25,6 +25,63 @@ + #include + #include + ++#include ++#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h ++#define _GLIBCXX_CDTOR_CALLABI ++#endif ++#include ++ ++#include ++ ++#if !HAVE_CXXABI_H_CLASS_TYPE_INFO ++// , ++// libstdc++-v3/libsupc++/cxxabi.h: ++namespace __cxxabiv1 { ++class __class_type_info: public std::type_info { ++public: ++ explicit __class_type_info(char const * n): type_info(n) {} ++ ~__class_type_info() override; ++}; ++} ++#endif ++ ++#if !HAVE_CXXABI_H_SI_CLASS_TYPE_INFO ++// , ++// libstdc++-v3/libsupc++/cxxabi.h: ++namespace __cxxabiv1 { ++class __si_class_type_info: public __class_type_info { ++public: ++ __class_type_info const * __base_type; ++ explicit __si_class_type_info( ++ char const * n, __class_type_info const *base): ++ __class_type_info(n), __base_type(base) {} ++ ~__si_class_type_info() override; ++}; ++} ++#endif ++#if !HAVE_CXXABI_H_CXA_GET_GLOBALS ++namespace __cxxabiv1 { extern "C" void *__cxa_get_globals () throw(); } ++#endif ++#if !HAVE_CXXABI_H_CXA_CURRENT_EXCEPTION_TYPE ++namespace __cxxabiv1 { ++extern "C" std::type_info *__cxa_current_exception_type() throw(); ++} ++#endif ++ ++#if !HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION ++namespace __cxxabiv1 { ++extern "C" void *__cxa_allocate_exception( ++ std::size_t thrown_size ) throw(); ++} ++#endif ++ ++#if !HAVE_CXXABI_H_CXA_THROW ++namespace __cxxabiv1 { ++extern "C" void __cxa_throw ( ++ void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn)); ++} ++#endif ++ + namespace CPPU_CURRENT_NAMESPACE + { + +@@ -33,6 +90,7 @@ + + // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h + ++#if 0 + struct _Unwind_Exception + { + unsigned exception_class __attribute__((__mode__(__DI__))); +@@ -40,9 +98,11 @@ + unsigned private_1 __attribute__((__mode__(__word__))); + unsigned private_2 __attribute__((__mode__(__word__))); + } __attribute__((__aligned__)); ++#endif + + struct __cxa_exception + { ++ //uintptr_t referenceCount; + std::type_info *exceptionType; + void (*exceptionDestructor)(void *); + +@@ -62,19 +122,11 @@ + _Unwind_Exception unwindHeader; + }; + +-extern "C" void *__cxa_allocate_exception( +- std::size_t thrown_size ) throw(); +-extern "C" void __cxa_throw ( +- void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn)); +- + struct __cxa_eh_globals + { + __cxa_exception *caughtExceptions; + unsigned int uncaughtExceptions; + }; +- +-extern "C" __cxa_eh_globals *__cxa_get_globals () throw(); +-extern "C" std::type_info *__cxa_current_exception_type() throw(); + + void raiseException( + uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ); diff --git a/editors/libreoffice/files/powerpc64/patch-cppuhelper_source_exc__thrower.cxx b/editors/libreoffice/files/powerpc64/patch-cppuhelper_source_exc__thrower.cxx new file mode 100644 index 000000000000..a014ac21285d --- /dev/null +++ b/editors/libreoffice/files/powerpc64/patch-cppuhelper_source_exc__thrower.cxx @@ -0,0 +1,10 @@ +--- cppuhelper/source/exc_thrower.cxx.orig 2020-11-27 22:07:39 UTC ++++ cppuhelper/source/exc_thrower.cxx +@@ -220,6 +220,7 @@ namespace cppu + { + + ++__attribute__ ((optnone)) + void SAL_CALL throwException( Any const & exc ) + { + if (exc.getValueTypeClass() != TypeClass_EXCEPTION) diff --git a/editors/libreoffice/files/powerpc64/patch-desktop_source_deployment_misc_dp__ucb.cxx b/editors/libreoffice/files/powerpc64/patch-desktop_source_deployment_misc_dp__ucb.cxx new file mode 100644 index 000000000000..2b04882f8ff7 --- /dev/null +++ b/editors/libreoffice/files/powerpc64/patch-desktop_source_deployment_misc_dp__ucb.cxx @@ -0,0 +1,20 @@ +--- desktop/source/deployment/misc/dp_ucb.cxx.orig 2020-10-21 20:09:11 UTC ++++ desktop/source/deployment/misc/dp_ucb.cxx +@@ -45,7 +45,7 @@ namespace dp_misc + bool create_ucb_content( + ::ucbhelper::Content * ret_ucbContent, OUString const & url, + Reference const & xCmdEnv, +- bool throw_exc ) ++ bool throw_exc ) __attribute__ ((optnone)) + { + try { + // Existence check... +@@ -81,7 +81,7 @@ bool create_ucb_content( + + bool create_folder( + ::ucbhelper::Content * ret_ucb_content, OUString const & url_, +- Reference const & xCmdEnv, bool throw_exc ) ++ Reference const & xCmdEnv, bool throw_exc ) __attribute__ ((optnone)) + { + ::ucbhelper::Content ucb_content; + if (create_ucb_content( diff --git a/editors/libreoffice/files/powerpc64/patch-include_com_sun_star_uno_Reference.h b/editors/libreoffice/files/powerpc64/patch-include_com_sun_star_uno_Reference.h new file mode 100644 index 000000000000..03ba05e9815e --- /dev/null +++ b/editors/libreoffice/files/powerpc64/patch-include_com_sun_star_uno_Reference.h @@ -0,0 +1,11 @@ +--- include/com/sun/star/uno/Reference.h.orig 2020-11-27 17:16:53 UTC ++++ include/com/sun/star/uno/Reference.h +@@ -377,7 +377,7 @@ class SAL_DLLPUBLIC_RTTI Reference : public BaseRefere + + @return UNacquired interface pointer + */ +- interface_type * SAL_CALL operator -> () const { ++ interface_type * SAL_CALL operator -> () const __attribute__ ((optnone)) { + assert(_pInterface != NULL); + return castFromXInterface(_pInterface); + } diff --git a/editors/libreoffice/files/powerpc64/patch-include_com_sun_star_uno_Reference.hxx b/editors/libreoffice/files/powerpc64/patch-include_com_sun_star_uno_Reference.hxx new file mode 100644 index 000000000000..928ec1e06012 --- /dev/null +++ b/editors/libreoffice/files/powerpc64/patch-include_com_sun_star_uno_Reference.hxx @@ -0,0 +1,20 @@ +--- include/com/sun/star/uno/Reference.hxx.orig 2020-10-21 20:09:11 UTC ++++ include/com/sun/star/uno/Reference.hxx +@@ -91,7 +91,7 @@ inline XInterface * Reference< interface_type >::iquer + + template< class interface_type > + inline interface_type * Reference< interface_type >::iset_throw( +- interface_type * pInterface ) ++ interface_type * pInterface ) __attribute__ ((optnone)) + { + if (pInterface) + { +@@ -104,7 +104,7 @@ inline interface_type * Reference< interface_type >::i + } + + template< class interface_type > +-inline Reference< interface_type >::~Reference() COVERITY_NOEXCEPT_FALSE ++inline Reference< interface_type >::~Reference() COVERITY_NOEXCEPT_FALSE __attribute__ ((optnone)) + { + if (_pInterface) + _pInterface->release(); diff --git a/editors/libreoffice/files/powerpc64/patch-include_uno_mapping.hxx b/editors/libreoffice/files/powerpc64/patch-include_uno_mapping.hxx new file mode 100644 index 000000000000..04342a17f3b0 --- /dev/null +++ b/editors/libreoffice/files/powerpc64/patch-include_uno_mapping.hxx @@ -0,0 +1,10 @@ +--- include/uno/mapping.hxx.orig 2020-11-28 00:12:11 UTC ++++ include/uno/mapping.hxx +@@ -248,6 +248,7 @@ inline Mapping::Mapping( const Mapping & rMapping ) + (*_pMapping->acquire)( _pMapping ); + } + ++__attribute__ ((optnone)) + inline Mapping::~Mapping() + { + if (_pMapping) diff --git a/editors/libreoffice/files/powerpc64/patch-ucb_source_ucp_file_bc.cxx b/editors/libreoffice/files/powerpc64/patch-ucb_source_ucp_file_bc.cxx new file mode 100644 index 000000000000..8a8782166c42 --- /dev/null +++ b/editors/libreoffice/files/powerpc64/patch-ucb_source_ucp_file_bc.cxx @@ -0,0 +1,10 @@ +--- ucb/source/ucp/file/bc.cxx.orig 2020-12-08 05:01:04 UTC ++++ ucb/source/ucp/file/bc.cxx +@@ -40,6 +40,7 @@ + #include "prov.hxx" + #include "filerror.hxx" + #include "filinsreq.hxx" ++#pragma clang optimize off + + using namespace fileaccess; + using namespace com::sun::star; diff --git a/editors/libreoffice6/Makefile b/editors/libreoffice6/Makefile index 4e017be4e689..5d02283a83a1 100644 --- a/editors/libreoffice6/Makefile +++ b/editors/libreoffice6/Makefile @@ -288,6 +288,10 @@ MAKE_ENV+= verbose=1 WARNING= "GTK3 visual style is incomplete yet, build at your own risk" .endif +.if ${ARCH:Mpowerpc*} +EXTRA_PATCHES+= ${FILESDIR}/powerpc64 +.endif + .if ${CHOSEN_COMPILER_TYPE} == clang CXXFLAGS_WARN= -Woverloaded-virtual -Wno-unused-parameter -Wno-unused-local-typedefs .else diff --git a/editors/libreoffice6/files/patch-powerpc b/editors/libreoffice6/files/patch-powerpc index eb85e51b6adc..db5d482fd169 100644 --- a/editors/libreoffice6/files/patch-powerpc +++ b/editors/libreoffice6/files/patch-powerpc @@ -1,6 +1,6 @@ --- configure.ac.orig 2019-08-08 20:00:41.682261000 +0800 +++ configure.ac 2019-08-08 20:01:10.652575000 +0800 -@@ -4278,6 +4278,16 @@ +@@ -4278,6 +4278,21 @@ RTL_ARCH=X86_64 PLATFORMID=freebsd_x86_64 ;; @@ -9,6 +9,11 @@ + RTL_ARCH=PowerPC_64 + PLATFORMID=freebsd_powerpc64 + ;; ++ powerpc64le) ++ CPUNAME=POWERPC64 ++ RTL_ARCH=PowerPC_64 ++ PLATFORMID=freebsd_powerpc64_le ++ ;; + powerpc|powerpcspe) + CPUNAME=POWERPC + RTL_ARCH=PowerPC @@ -19,7 +24,7 @@ ;; --- configure.orig 2019-08-07 01:54:44.000000000 +0800 +++ configure 2019-08-08 20:00:26.166619000 +0800 -@@ -12537,6 +12537,16 @@ +@@ -12537,6 +12537,21 @@ PLATFORMID=freebsd_aarch64 RTL_ARCH=AARCH64 ;; @@ -28,6 +33,11 @@ + RTL_ARCH=PowerPC_64 + PLATFORMID=freebsd_powerpc64 + ;; ++ powerpc64le) ++ CPUNAME=POWERPC64 ++ RTL_ARCH=PowerPC_64 ++ PLATFORMID=freebsd_powerpc64_le ++ ;; + powerpc|powerpcspe) + CPUNAME=POWERPC + RTL_ARCH=PowerPC diff --git a/editors/libreoffice6/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-cpp2uno.cxx b/editors/libreoffice6/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-cpp2uno.cxx new file mode 100644 index 000000000000..22102d34d855 --- /dev/null +++ b/editors/libreoffice6/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-cpp2uno.cxx @@ -0,0 +1,79 @@ +--- bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx.orig 2020-04-04 12:03:03.236554000 -0500 ++++ bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx 2020-04-08 14:28:30.208034000 -0500 +@@ -341,7 +341,7 @@ + + static typelib_TypeClass cpp_mediate( + sal_uInt64 nOffsetAndIndex, +- void ** gpreg, void ** fpreg, long sp, ++ void ** gpreg, void ** fpreg, long fp, + sal_Int64 * pRegisterReturn /* space for register return */ ) + { + static_assert(sizeof(sal_Int64)==sizeof(void *), "### unexpected!"); +@@ -349,8 +349,8 @@ + sal_Int32 nVtableOffset = (nOffsetAndIndex >> 32); + sal_Int32 nFunctionIndex = (nOffsetAndIndex & 0xFFFFFFFF); + +- long sf = *(long*)sp; +- void ** ovrflw = (void**)(sf + PARAMSAVE + 64); ++ /* XXX: This is the stack frame!!!! */ ++ void ** ovrflw = (void**)(fp + PARAMSAVE + 64); + + // gpreg: [ret *], this, [other gpr params] + // fpreg: [fpr params] +@@ -513,18 +513,22 @@ + return eRet; + } + +-extern "C" void privateSnippetExecutor( ... ) ++extern "C" void privateSnippetExecutor( uint64_t a, ... ) + { ++ va_list args, fpargs; + sal_uInt64 gpreg[ppc64::MAX_GPR_REGS]; + +- register long r3 asm("r3"); gpreg[0] = r3; +- register long r4 asm("r4"); gpreg[1] = r4; +- register long r5 asm("r5"); gpreg[2] = r5; +- register long r6 asm("r6"); gpreg[3] = r6; +- register long r7 asm("r7"); gpreg[4] = r7; +- register long r8 asm("r8"); gpreg[5] = r8; +- register long r9 asm("r9"); gpreg[6] = r9; +- register long r10 asm("r10"); gpreg[7] = r10; ++ va_start(args, a); ++ va_copy(fpargs, args); ++ /* Start with all the GPRs */ ++ gpreg[0] = a; ++ gpreg[1] = va_arg(args, uint64_t); ++ gpreg[2] = va_arg(args, uint64_t); ++ gpreg[3] = va_arg(args, uint64_t); ++ gpreg[4] = va_arg(args, uint64_t); ++ gpreg[5] = va_arg(args, uint64_t); ++ gpreg[6] = va_arg(args, uint64_t); ++ gpreg[7] = va_arg(args, uint64_t); + + double fpreg[ppc64::MAX_SSE_REGS]; + +@@ -547,11 +551,11 @@ + "fr10", "fr11", "fr12", "fr13" + ); + +- register long r11 asm("r11"); +- const long nOffsetAndIndex = r11; ++ long nOffsetAndIndex; ++ long fp; + +- register long r1 asm("r1"); +- const long sp = r1; ++ __asm __volatile("mr %0, 11\n" : "=r"(nOffsetAndIndex)); ++ fp = (long)__builtin_frame_address(0); + + #if defined(_CALL_ELF) && _CALL_ELF == 2 + volatile long nRegReturn[2]; +@@ -560,7 +564,7 @@ + #endif + + typelib_TypeClass aType = +- cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, sp, (sal_Int64*)nRegReturn); ++ cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, fp, (sal_Int64*)nRegReturn); + + switch( aType ) + { diff --git a/editors/libreoffice6/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-except.cxx b/editors/libreoffice6/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-except.cxx new file mode 100644 index 000000000000..3d9108a73ece --- /dev/null +++ b/editors/libreoffice6/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-except.cxx @@ -0,0 +1,112 @@ +--- bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx.orig 2019-12-05 13:59:23.000000000 -0600 ++++ bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx 2020-09-14 11:24:58.489149000 -0500 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -136,7 +137,7 @@ + buf.append( 'E' ); + + OString symName( buf.makeStringAndClear() ); +- rtti = (type_info *)dlsym( m_hApp, symName.getStr() ); ++ rtti = static_cast(dlsym( m_hApp, symName.getStr() )); + + if (rtti) + { +@@ -161,9 +162,9 @@ + { + // ensure availability of base + type_info * base_rtti = getRTTI( +- (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription ); ++ pTypeDescr->pBaseTypeDescription ); + rtti = new __si_class_type_info( +- strdup( rttiName ), (__class_type_info *)base_rtti ); ++ strdup( rttiName ), static_cast<__class_type_info *>(base_rtti )); + } + else + { +@@ -192,8 +193,8 @@ + + static void deleteException( void * pExc ) + { +- __cxa_exception const * header = ((__cxa_exception const *)pExc - 1); +- typelib_TypeDescription * pTD = 0; ++ __cxxabiv1::__cxa_exception const * header = static_cast<__cxxabiv1::__cxa_exception const *>(pExc) - 1; ++ typelib_TypeDescription * pTD = nullptr; + OUString unoName( toUNOname( header->exceptionType->name() ) ); + ::typelib_typedescription_getByName( &pTD, unoName.pData ); + assert(pTD && "### unknown exception type! leaving out destruction => leaking!!!"); +@@ -216,39 +217,57 @@ + if (! pTypeDescr) + terminate(); + +- pCppExc = __cxa_allocate_exception( pTypeDescr->nSize ); ++ pCppExc = __cxxabiv1::__cxa_allocate_exception( pTypeDescr->nSize ); + ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp ); + + // destruct uno exception +- ::uno_any_destruct( pUnoExc, 0 ); ++ ::uno_any_destruct( pUnoExc, nullptr ); + // avoiding locked counts + static RTTI rtti_data; +- rtti = (type_info*)rtti_data.getRTTI((typelib_CompoundTypeDescription*)pTypeDescr); ++ rtti = rtti_data.getRTTI(reinterpret_cast(pTypeDescr)); + TYPELIB_DANGER_RELEASE( pTypeDescr ); + if (! rtti) +- terminate(); ++ { ++ throw RuntimeException( ++ "no rtti for type " + ++ OUString::unacquired( &pUnoExc->pType->pTypeName ) ); + } ++ } + +- __cxa_throw( pCppExc, rtti, deleteException ); ++ __cxxabiv1::__cxa_throw( pCppExc, rtti, deleteException ); + } + + void fillUnoException(uno_Any * pExc, uno_Mapping * pCpp2Uno) + { +- __cxa_exception * header = __cxa_get_globals()->caughtExceptions; ++ __cxxabiv1::__cxa_exception * header = ++ __cxxabiv1::__cxa_get_globals()->caughtExceptions; + if (! header) + terminate(); + +- std::type_info *exceptionType = __cxa_current_exception_type(); ++ std::type_info *exceptionType = __cxxabiv1::__cxa_current_exception_type(); + +- typelib_TypeDescription * pExcTypeDescr = 0; ++ typelib_TypeDescription * pExcTypeDescr = nullptr; + OUString unoName( toUNOname( exceptionType->name() ) ); +- ::typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData ); +- if (! pExcTypeDescr) ++ typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData ); ++ if (pExcTypeDescr == nullptr) ++ { ++ RuntimeException aRE( "exception type not found: " + unoName ); ++ Type const & rType = cppu::UnoType::get(); ++ uno_type_any_constructAndConvert( pExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); ++ SAL_WARN("bridges", aRE.Message); ++ } ++ else ++ { ++ // construct uno exception any ++ uno_any_constructAndConvert( pExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno ); ++ typelib_typedescription_release( pExcTypeDescr ); ++ } ++ if (nullptr == pExcTypeDescr) + terminate(); + + // construct uno exception any +- ::uno_any_constructAndConvert( pExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno ); +- ::typelib_typedescription_release( pExcTypeDescr ); ++ uno_any_constructAndConvert( pExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno ); ++ typelib_typedescription_release( pExcTypeDescr ); + } + + } diff --git a/editors/libreoffice6/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-share.hxx b/editors/libreoffice6/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-share.hxx new file mode 100644 index 000000000000..7411e8e8cf32 --- /dev/null +++ b/editors/libreoffice6/files/powerpc64/patch-bridges-source-cpp_uno-gcc3_linux_powerpc64-share.hxx @@ -0,0 +1,106 @@ +--- bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx.orig 2020-04-07 10:06:14.193381000 -0500 ++++ bridges/source/cpp_uno/gcc3_linux_powerpc64/share.hxx 2020-04-09 11:33:30.706043000 -0500 +@@ -25,6 +25,63 @@ + #include + #include + ++#include ++#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h ++#define _GLIBCXX_CDTOR_CALLABI ++#endif ++#include ++ ++#include ++ ++#if !HAVE_CXXABI_H_CLASS_TYPE_INFO ++// , ++// libstdc++-v3/libsupc++/cxxabi.h: ++namespace __cxxabiv1 { ++class __class_type_info: public std::type_info { ++public: ++ explicit __class_type_info(char const * n): type_info(n) {} ++ ~__class_type_info() override; ++}; ++} ++#endif ++ ++#if !HAVE_CXXABI_H_SI_CLASS_TYPE_INFO ++// , ++// libstdc++-v3/libsupc++/cxxabi.h: ++namespace __cxxabiv1 { ++class __si_class_type_info: public __class_type_info { ++public: ++ __class_type_info const * __base_type; ++ explicit __si_class_type_info( ++ char const * n, __class_type_info const *base): ++ __class_type_info(n), __base_type(base) {} ++ ~__si_class_type_info() override; ++}; ++} ++#endif ++#if !HAVE_CXXABI_H_CXA_GET_GLOBALS ++namespace __cxxabiv1 { extern "C" void *__cxa_get_globals () throw(); } ++#endif ++#if !HAVE_CXXABI_H_CXA_CURRENT_EXCEPTION_TYPE ++namespace __cxxabiv1 { ++extern "C" std::type_info *__cxa_current_exception_type() throw(); ++} ++#endif ++ ++#if !HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION ++namespace __cxxabiv1 { ++extern "C" void *__cxa_allocate_exception( ++ std::size_t thrown_size ) throw(); ++} ++#endif ++ ++#if !HAVE_CXXABI_H_CXA_THROW ++namespace __cxxabiv1 { ++extern "C" void __cxa_throw ( ++ void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn)); ++} ++#endif ++ + namespace CPPU_CURRENT_NAMESPACE + { + +@@ -33,6 +90,7 @@ + + // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h + ++#if 0 + struct _Unwind_Exception + { + unsigned exception_class __attribute__((__mode__(__DI__))); +@@ -40,9 +98,11 @@ + unsigned private_1 __attribute__((__mode__(__word__))); + unsigned private_2 __attribute__((__mode__(__word__))); + } __attribute__((__aligned__)); ++#endif + + struct __cxa_exception + { ++ //uintptr_t referenceCount; + std::type_info *exceptionType; + void (*exceptionDestructor)(void *); + +@@ -62,19 +122,11 @@ + _Unwind_Exception unwindHeader; + }; + +-extern "C" void *__cxa_allocate_exception( +- std::size_t thrown_size ) throw(); +-extern "C" void __cxa_throw ( +- void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn)); +- + struct __cxa_eh_globals + { + __cxa_exception *caughtExceptions; + unsigned int uncaughtExceptions; + }; +- +-extern "C" __cxa_eh_globals *__cxa_get_globals () throw(); +-extern "C" std::type_info *__cxa_current_exception_type() throw(); + + void raiseException( + uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ); diff --git a/editors/libreoffice6/files/powerpc64/patch-cppuhelper_source_exc__thrower.cxx b/editors/libreoffice6/files/powerpc64/patch-cppuhelper_source_exc__thrower.cxx new file mode 100644 index 000000000000..a014ac21285d --- /dev/null +++ b/editors/libreoffice6/files/powerpc64/patch-cppuhelper_source_exc__thrower.cxx @@ -0,0 +1,10 @@ +--- cppuhelper/source/exc_thrower.cxx.orig 2020-11-27 22:07:39 UTC ++++ cppuhelper/source/exc_thrower.cxx +@@ -220,6 +220,7 @@ namespace cppu + { + + ++__attribute__ ((optnone)) + void SAL_CALL throwException( Any const & exc ) + { + if (exc.getValueTypeClass() != TypeClass_EXCEPTION) diff --git a/editors/libreoffice6/files/powerpc64/patch-desktop_source_deployment_misc_dp__ucb.cxx b/editors/libreoffice6/files/powerpc64/patch-desktop_source_deployment_misc_dp__ucb.cxx new file mode 100644 index 000000000000..2b04882f8ff7 --- /dev/null +++ b/editors/libreoffice6/files/powerpc64/patch-desktop_source_deployment_misc_dp__ucb.cxx @@ -0,0 +1,20 @@ +--- desktop/source/deployment/misc/dp_ucb.cxx.orig 2020-10-21 20:09:11 UTC ++++ desktop/source/deployment/misc/dp_ucb.cxx +@@ -45,7 +45,7 @@ namespace dp_misc + bool create_ucb_content( + ::ucbhelper::Content * ret_ucbContent, OUString const & url, + Reference const & xCmdEnv, +- bool throw_exc ) ++ bool throw_exc ) __attribute__ ((optnone)) + { + try { + // Existence check... +@@ -81,7 +81,7 @@ bool create_ucb_content( + + bool create_folder( + ::ucbhelper::Content * ret_ucb_content, OUString const & url_, +- Reference const & xCmdEnv, bool throw_exc ) ++ Reference const & xCmdEnv, bool throw_exc ) __attribute__ ((optnone)) + { + ::ucbhelper::Content ucb_content; + if (create_ucb_content( diff --git a/editors/libreoffice6/files/powerpc64/patch-include_com_sun_star_uno_Reference.h b/editors/libreoffice6/files/powerpc64/patch-include_com_sun_star_uno_Reference.h new file mode 100644 index 000000000000..03ba05e9815e --- /dev/null +++ b/editors/libreoffice6/files/powerpc64/patch-include_com_sun_star_uno_Reference.h @@ -0,0 +1,11 @@ +--- include/com/sun/star/uno/Reference.h.orig 2020-11-27 17:16:53 UTC ++++ include/com/sun/star/uno/Reference.h +@@ -377,7 +377,7 @@ class SAL_DLLPUBLIC_RTTI Reference : public BaseRefere + + @return UNacquired interface pointer + */ +- interface_type * SAL_CALL operator -> () const { ++ interface_type * SAL_CALL operator -> () const __attribute__ ((optnone)) { + assert(_pInterface != NULL); + return castFromXInterface(_pInterface); + } diff --git a/editors/libreoffice6/files/powerpc64/patch-include_com_sun_star_uno_Reference.hxx b/editors/libreoffice6/files/powerpc64/patch-include_com_sun_star_uno_Reference.hxx new file mode 100644 index 000000000000..928ec1e06012 --- /dev/null +++ b/editors/libreoffice6/files/powerpc64/patch-include_com_sun_star_uno_Reference.hxx @@ -0,0 +1,20 @@ +--- include/com/sun/star/uno/Reference.hxx.orig 2020-10-21 20:09:11 UTC ++++ include/com/sun/star/uno/Reference.hxx +@@ -91,7 +91,7 @@ inline XInterface * Reference< interface_type >::iquer + + template< class interface_type > + inline interface_type * Reference< interface_type >::iset_throw( +- interface_type * pInterface ) ++ interface_type * pInterface ) __attribute__ ((optnone)) + { + if (pInterface) + { +@@ -104,7 +104,7 @@ inline interface_type * Reference< interface_type >::i + } + + template< class interface_type > +-inline Reference< interface_type >::~Reference() COVERITY_NOEXCEPT_FALSE ++inline Reference< interface_type >::~Reference() COVERITY_NOEXCEPT_FALSE __attribute__ ((optnone)) + { + if (_pInterface) + _pInterface->release(); diff --git a/editors/libreoffice6/files/powerpc64/patch-include_uno_mapping.hxx b/editors/libreoffice6/files/powerpc64/patch-include_uno_mapping.hxx new file mode 100644 index 000000000000..04342a17f3b0 --- /dev/null +++ b/editors/libreoffice6/files/powerpc64/patch-include_uno_mapping.hxx @@ -0,0 +1,10 @@ +--- include/uno/mapping.hxx.orig 2020-11-28 00:12:11 UTC ++++ include/uno/mapping.hxx +@@ -248,6 +248,7 @@ inline Mapping::Mapping( const Mapping & rMapping ) + (*_pMapping->acquire)( _pMapping ); + } + ++__attribute__ ((optnone)) + inline Mapping::~Mapping() + { + if (_pMapping) diff --git a/editors/libreoffice6/files/powerpc64/patch-ucb_source_ucp_file_bc.cxx b/editors/libreoffice6/files/powerpc64/patch-ucb_source_ucp_file_bc.cxx new file mode 100644 index 000000000000..8a8782166c42 --- /dev/null +++ b/editors/libreoffice6/files/powerpc64/patch-ucb_source_ucp_file_bc.cxx @@ -0,0 +1,10 @@ +--- ucb/source/ucp/file/bc.cxx.orig 2020-12-08 05:01:04 UTC ++++ ucb/source/ucp/file/bc.cxx +@@ -40,6 +40,7 @@ + #include "prov.hxx" + #include "filerror.hxx" + #include "filinsreq.hxx" ++#pragma clang optimize off + + using namespace fileaccess; + using namespace com::sun::star; diff --git a/emulators/riscv-isa-sim/Makefile b/emulators/riscv-isa-sim/Makefile index 90bbc603257a..61d65d7291e8 100644 --- a/emulators/riscv-isa-sim/Makefile +++ b/emulators/riscv-isa-sim/Makefile @@ -10,7 +10,7 @@ COMMENT= Spike, a RISC-V ISA Simulator LICENSE= BSD3CLAUSE -ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS= amd64 powerpc64 powerpc64le USES= compiler:c++11-lang gmake shebangfix diff --git a/finance/quickfix/Makefile b/finance/quickfix/Makefile index f92ba6ae71dc..a8249e7aed8b 100644 --- a/finance/quickfix/Makefile +++ b/finance/quickfix/Makefile @@ -11,7 +11,6 @@ COMMENT= Free FIX Protocol Implementation LICENSE= GPLv3+ -BROKEN_powerpc64= fails to configure: unable to find set_terminate in std or global namespace BROKEN_i386= fails to build BUILD_DEPENDS= bash:shells/bash @@ -44,6 +43,14 @@ JAVA_CONFIGURE_WITH= java INSTALL_TARGET=install-strip +.include + +.if ${ARCH} != amd64 && ${ARCH} != i386 +CXXFLAGS+= -DENABLE_BOOST_ATOMIC_COUNT +LIB_DEPENDS+= libboost_system.so:devel/boost-libs +USES+= compiler:c++11-lang localbase +.endif + post-extract: @${REINPLACE_CMD} -e 's|^make|gmake|' \ ${WRKSRC}/src/ruby/make_ruby.sh diff --git a/games/libretro-desmume2015/Makefile b/games/libretro-desmume2015/Makefile index d2d028421ab5..e6c5d8f58178 100644 --- a/games/libretro-desmume2015/Makefile +++ b/games/libretro-desmume2015/Makefile @@ -24,6 +24,12 @@ PLIST_FILES= lib/libretro/desmume2015_libretro.so MAKEFILE= Makefile.freebsd +.include + +.if ${ARCH} != aarch64 || ${ARCH} != amd64 || !${ARCH:Marmv*} || ${ARCH} != i386 +MAKE_ENV+= DESMUME_JIT=0 +.endif + do-install: ${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro; ${INSTALL_LIB} ${WRKSRC}/desmume/desmume2015_libretro.so ${STAGEDIR}/${PREFIX}/lib/libretro; diff --git a/games/libretro-desmume2015/files/patch-desmume_src_libretro-common_features_features__cpu.c b/games/libretro-desmume2015/files/patch-desmume_src_libretro-common_features_features__cpu.c new file mode 100644 index 000000000000..288dbb0b252d --- /dev/null +++ b/games/libretro-desmume2015/files/patch-desmume_src_libretro-common_features_features__cpu.c @@ -0,0 +1,11 @@ +--- desmume/src/libretro-common/features/features_cpu.c.orig 2021-02-16 18:16:47 UTC ++++ desmume/src/libretro-common/features/features_cpu.c +@@ -144,7 +144,7 @@ retro_perf_tick_t cpu_features_get_perf_counter(void) + tv_sec = (long)((ularge.QuadPart - epoch) / 10000000L); + tv_usec = (long)(system_time.wMilliseconds * 1000); + time_ticks = (1000000 * tv_sec + tv_usec); +-#elif defined(__linux__) || defined(__QNX__) || defined(__MACH__) ++#elif defined(_POSIX_MONOTONIC_CLOCK) || defined(__QNX__) || defined(ANDROID) || defined(__MACH__) || defined(__PSL1GHT__) + struct timespec tv = {0}; + if (ra_clock_gettime(CLOCK_MONOTONIC, &tv) == 0) + time_ticks = (retro_perf_tick_t)tv.tv_sec * 1000000000 + diff --git a/graphics/openfx-arena/Makefile b/graphics/openfx-arena/Makefile index 65cb5eeb01dc..74c6b4efb877 100644 --- a/graphics/openfx-arena/Makefile +++ b/graphics/openfx-arena/Makefile @@ -11,7 +11,7 @@ COMMENT= Extra OpenFX plugins for Natron LICENSE= GPLv2 -ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS= amd64 powerpc64 powerpc64le BUILD_DEPENDS= opencl>=0:devel/opencl LIB_DEPENDS= libOpenColorIO.so:graphics/opencolorio \ libfontconfig.so:x11-fonts/fontconfig \ diff --git a/multimedia/arcan/Makefile b/multimedia/arcan/Makefile index 8df58c83140a..8ab39a41627e 100644 --- a/multimedia/arcan/Makefile +++ b/multimedia/arcan/Makefile @@ -2,6 +2,7 @@ PORTNAME= arcan DISTVERSION= 0.6.0.1 +PORTREVISION= 1 CATEGORIES= multimedia MAINTAINER= jbeich@FreeBSD.org @@ -32,7 +33,6 @@ LDFLAGS_i386= -Wl,-z,notext OPTIONS_DEFINE= ESPEAK FFMPEG LUAJIT SDL SUID TESSERACT UVC VLC VNC WAYLAND OPTIONS_DEFAULT=ESPEAK FFMPEG LUAJIT SDL SUID TESSERACT UVC VLC VNC WAYLAND OPTIONS_EXCLUDE_aarch64= LUAJIT # bug 225342 -OPTIONS_EXCLUDE_powerpc64= LUAJIT OPTIONS_SUB= yes ESPEAK_DESC= Text to speech via eSpeak diff --git a/multimedia/zoneminder/Makefile b/multimedia/zoneminder/Makefile index 12f0605c4fae..a08710342c79 100644 --- a/multimedia/zoneminder/Makefile +++ b/multimedia/zoneminder/Makefile @@ -10,7 +10,7 @@ COMMENT= Complete security camera solution, fully web based with image analysis LICENSE= GPLv2 -ONLY_FOR_ARCHS= aarch64 amd64 i386 +ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64 ZM_DEPENDS= p5-DBI>=0:databases/p5-DBI \ p5-DBD-mysql>=0:databases/p5-DBD-mysql \ diff --git a/net/mpich/Makefile b/net/mpich/Makefile index 5b76a41ecd12..6d78f8dc2a91 100644 --- a/net/mpich/Makefile +++ b/net/mpich/Makefile @@ -58,6 +58,8 @@ CONFIGURE_ARGS= --enable-fast="" --with-hwloc-prefix=${LOCALBASE} \ MPICHLIB_LDFLAGS="${LDFLAGS}" LDFLAGS="" \ MPICHLIB_LIBS="${LIBS}" LIBS="" +CFLAGS_powerpc64= -D__BIG_ENDIAN + .include .for pm in ${OPTIONS_GROUP_PM} diff --git a/security/openconnect-gui/distinfo b/security/openconnect-gui/distinfo index 7059c2eb036d..1e38ca03a4e9 100644 --- a/security/openconnect-gui/distinfo +++ b/security/openconnect-gui/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1591544711 -SHA256 (openconnect-openconnect-gui-v1.4.1_GH0.tar.gz) = a8d156d056a81be1c895738f0a4299b60fc87b608fcb9676b8f2d5215b7101ae -SIZE (openconnect-openconnect-gui-v1.4.1_GH0.tar.gz) = 10025784 +TIMESTAMP = 1611572481 +SHA256 (openconnect-openconnect-gui-v1.4.1_GH0.tar.gz) = 5f609e10eafc8885699e503c1dca9d9154d18741cfd09c1222d05b8af448c1d1 +SIZE (openconnect-openconnect-gui-v1.4.1_GH0.tar.gz) = 10026785 diff --git a/sysutils/linuxfdisk/Makefile b/sysutils/linuxfdisk/Makefile index 299a867eb1af..eef463b57c8d 100644 --- a/sysutils/linuxfdisk/Makefile +++ b/sysutils/linuxfdisk/Makefile @@ -14,7 +14,7 @@ COMMENT= Fdisk, a partition tables manipulator, from util-linux WRKSRC= ${WRKDIR}/util-linux-${PORTVERSION}/fdisk USES= tar:bzip2 -ONLY_FOR_ARCHS= i386 amd64 +ONLY_FOR_ARCHS= i386 amd64 powerpc64 powerpc64le pre-patch: @${CP} ${FILESDIR}/linuxfdisk-Makefile ${WRKSRC}/Makefile