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
This commit is contained in:
Piotr Kubaj 2021-02-25 18:32:27 +00:00
parent acefe46b40
commit 2c78b9754c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2021Q1/; revision=566549
32 changed files with 817 additions and 15 deletions

View File

@ -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 <bsd.port.options.mk>
.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 <bsd.port.pre.mk>

View File

@ -279,6 +279,10 @@ MAKE_ENV+= verbose=1
.include <bsd.port.pre.mk>
.if ${ARCH:Mpowerpc*}
EXTRA_PATCHES+= ${FILESDIR}/powerpc64
.endif
.if ${ARCH} == powerpc || ${ARCH} == powerpcspe || ${ARCH} == powerpc64
CONFIGURE_ARGS+= --disable-skia
.endif

View File

@ -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 )
{

View File

@ -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 <cxxabi.h>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
+#include <sal/log.hxx>
#include <osl/mutex.hxx>
#include <com/sun/star/uno/genfunc.hxx>
@@ -136,7 +137,7 @@
buf.append( 'E' );
OString symName( buf.makeStringAndClear() );
- rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
+ rtti = static_cast<type_info *>(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<typelib_CompoundTypeDescription*>(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<decltype(aRE)>::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 );
}
}

View File

@ -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 <exception>
#include <cstddef>
+#include <cxxabi.h>
+#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
+#define _GLIBCXX_CDTOR_CALLABI
+#endif
+#include <unwind.h>
+
+#include <config_cxxabi.h>
+
+#if !HAVE_CXXABI_H_CLASS_TYPE_INFO
+// <https://mentorembedded.github.io/cxx-abi/abi.html>,
+// 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
+// <https://mentorembedded.github.io/cxx-abi/abi.html>,
+// 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 );

View File

@ -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)

View File

@ -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<XCommandEnvironment> 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<XCommandEnvironment> const & xCmdEnv, bool throw_exc )
+ Reference<XCommandEnvironment> const & xCmdEnv, bool throw_exc ) __attribute__ ((optnone))
{
::ucbhelper::Content ucb_content;
if (create_ucb_content(

View File

@ -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);
}

View File

@ -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();

View File

@ -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)

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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 )
{

View File

@ -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 <cxxabi.h>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
+#include <sal/log.hxx>
#include <osl/mutex.hxx>
#include <com/sun/star/uno/genfunc.hxx>
@@ -136,7 +137,7 @@
buf.append( 'E' );
OString symName( buf.makeStringAndClear() );
- rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
+ rtti = static_cast<type_info *>(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<typelib_CompoundTypeDescription*>(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<decltype(aRE)>::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 );
}
}

View File

@ -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 <exception>
#include <cstddef>
+#include <cxxabi.h>
+#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
+#define _GLIBCXX_CDTOR_CALLABI
+#endif
+#include <unwind.h>
+
+#include <config_cxxabi.h>
+
+#if !HAVE_CXXABI_H_CLASS_TYPE_INFO
+// <https://mentorembedded.github.io/cxx-abi/abi.html>,
+// 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
+// <https://mentorembedded.github.io/cxx-abi/abi.html>,
+// 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 );

View File

@ -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)

View File

@ -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<XCommandEnvironment> 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<XCommandEnvironment> const & xCmdEnv, bool throw_exc )
+ Reference<XCommandEnvironment> const & xCmdEnv, bool throw_exc ) __attribute__ ((optnone))
{
::ucbhelper::Content ucb_content;
if (create_ucb_content(

View File

@ -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);
}

View File

@ -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();

View File

@ -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)

View File

@ -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;

View File

@ -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

View File

@ -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 <bsd.port.options.mk>
.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

View File

@ -24,6 +24,12 @@ PLIST_FILES= lib/libretro/desmume2015_libretro.so
MAKEFILE= Makefile.freebsd
.include <bsd.port.options.mk>
.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;

View File

@ -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 +

View File

@ -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 \

View File

@ -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

View File

@ -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 \

View File

@ -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 <bsd.port.options.mk>
.for pm in ${OPTIONS_GROUP_PM}

View File

@ -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

View File

@ -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