databases/redisdesktopmanager: fix build on powerpc64

vec_vbpermq requires -mpower8-vector.
bswap64 needs to be used instead of bswap_64 on FreeBSD.

In file included from app/qmlutils.cpp:16:
../3rdparty/simdjson/singleheader/simdjson.h:14999:44: error: use of undeclared identifier 'vec_vbpermq'
    result = ((__vector unsigned long long)vec_vbpermq((__m128i)this->value,
                                           ^
../3rdparty/simdjson/singleheader/simdjson.h:15022:22: error: use of undeclared identifier 'vec_vsx_ld'
    return (__m128i)(vec_vsx_ld(0, reinterpret_cast<const uint8_t *>(values)));
                     ^
../3rdparty/simdjson/singleheader/simdjson.h:15108:9: error: use of undeclared identifier 'vec_vsx_ld'
        vec_vsx_ld(0, reinterpret_cast<const uint8_t *>(pshufb_combine_table + pop1 * 8));
        ^
../3rdparty/simdjson/singleheader/simdjson.h:15110:5: error: use of undeclared identifier 'vec_vsx_st'; did you mean 'vec_xst'?
    vec_vsx_st(answer, 0, reinterpret_cast<__m128i *>(output));
    ^~~~~~~~~~
    vec_xst
/usr/lib/clang/11.0.1/include/altivec.h:16610:33: note: 'vec_xst' declared here
static inline __ATTRS_o_ai void vec_xst(vector float __vec,
                                ^
In file included from app/qmlutils.cpp:16:
../3rdparty/simdjson/singleheader/simdjson.h:15110:27: error: cannot initialize a parameter of type 'float *' with an rvalue of type 'simdjson::ppc64::(anonymous namespace)::simd::__m128i *'
    vec_vsx_st(answer, 0, reinterpret_cast<__m128i *>(output));
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/clang/11.0.1/include/altivec.h:16612:48: note: passing argument to parameter '__ptr' here
                                        float *__ptr) {
                                               ^
In file included from app/qmlutils.cpp:16:
../3rdparty/simdjson/singleheader/simdjson.h:15768:9: error: use of undeclared identifier 'bswap_64'
  val = bswap_64(val);
        ^
../3rdparty/simdjson/singleheader/simdjson.h:15039:5: error: use of undeclared identifier 'vec_vsx_st'
    vec_vsx_st(this->value, 0, reinterpret_cast<__m128i *>(dst));
    ^
../3rdparty/simdjson/singleheader/simdjson.h:15586:6: note: in instantiation of member function 'simdjson::ppc64::(anonymous namespace)::simd::base8_numeric<unsigned char>::store' requested here
  v0.store(dst);
     ^
This commit is contained in:
Piotr Kubaj 2021-11-07 22:26:12 +00:00
parent 1a2b9d4e69
commit 90a93d9fab
2 changed files with 12 additions and 2 deletions

View File

@ -41,6 +41,7 @@ USE_QT= charts concurrent core declarative gui network \
QMAKE_ARGS+= SYSTEM_LZ4=1 VERSION=${PORTVERSION}
BINARY_ALIAS= python3-config=${PYTHON_CMD}-config \
python3=${PYTHON_CMD}
CXXFLAGS_powerpc64= -mpower8-vector
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/share/pixmaps

View File

@ -1,6 +1,6 @@
--- 3rdparty/simdjson/singleheader/simdjson.h.orig 2021-09-30 06:08:20 UTC
--- 3rdparty/simdjson/singleheader/simdjson.h.orig 2021-09-07 18:36:17 UTC
+++ 3rdparty/simdjson/singleheader/simdjson.h
@@ -15748,7 +15748,11 @@ simdjson_unused simdjson_warn_unused simdjson_really_i
@@ -17189,7 +17189,11 @@ simdjson_unused simdjson_warn_unused simdjson_really_i
#ifndef SIMDJSON_PPC64_NUMBERPARSING_H
#define SIMDJSON_PPC64_NUMBERPARSING_H
@ -12,3 +12,12 @@
namespace simdjson {
namespace ppc64 {
@@ -17202,7 +17206,7 @@ parse_eight_digits_unrolled(const uint8_t *chars) {
uint64_t val;
std::memcpy(&val, chars, sizeof(uint64_t));
#ifdef __BIG_ENDIAN__
- val = bswap_64(val);
+ val = bswap64(val);
#endif
val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8;
val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16;