rspamd: fix build on big endian ppc64 and restrict archs
This commit is contained in:
parent
75ca7eae29
commit
100831685b
2 changed files with 64 additions and 0 deletions
63
srcpkgs/rspamd/patches/vsx.patch
Normal file
63
srcpkgs/rspamd/patches/vsx.patch
Normal file
|
@ -0,0 +1,63 @@
|
|||
commit a6f43886153bfa63a609720e02bcc9c6f4a50140
|
||||
Author: q66 <daniel@octaforge.org>
|
||||
Date: Mon Jan 6 00:48:43 2020 +0100
|
||||
|
||||
Disable VSX on platforms without it
|
||||
|
||||
diff --git contrib/lua-torch/torch7/lib/TH/THVector.c contrib/lua-torch/torch7/lib/TH/THVector.c
|
||||
index 4410578..c972b13 100644
|
||||
--- contrib/lua-torch/torch7/lib/TH/THVector.c
|
||||
+++ contrib/lua-torch/torch7/lib/TH/THVector.c
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "vector/NEON.c"
|
||||
#endif
|
||||
|
||||
-#ifdef __PPC64__
|
||||
+#if defined(__PPC64__) && defined(__VSX__)
|
||||
#include "vector/VSX.c"
|
||||
#endif
|
||||
|
||||
diff --git contrib/lua-torch/torch7/lib/TH/generic/THVectorDispatch.c contrib/lua-torch/torch7/lib/TH/generic/THVectorDispatch.c
|
||||
index 5b88852..8ab4f67 100644
|
||||
--- contrib/lua-torch/torch7/lib/TH/generic/THVectorDispatch.c
|
||||
+++ contrib/lua-torch/torch7/lib/TH/generic/THVectorDispatch.c
|
||||
@@ -20,7 +20,7 @@ static FunctionDescription THVector_(fill_DISPATCHTABLE)[] = {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
- #if defined(__PPC64__)
|
||||
+ #if defined(__PPC64__) && defined(__VSX__)
|
||||
#if defined(TH_REAL_IS_DOUBLE) || defined(TH_REAL_IS_FLOAT)
|
||||
FUNCTION_IMPL(THVector_(fill_VSX), SIMDExtension_VSX),
|
||||
#endif
|
||||
@@ -85,7 +85,7 @@ static FunctionDescription THVector_(adds_DISPATCHTABLE)[] = {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
- #if defined(__PPC64__)
|
||||
+ #if defined(__PPC64__) && defined(__VSX__)
|
||||
#if defined(TH_REAL_IS_DOUBLE) || defined(TH_REAL_IS_FLOAT)
|
||||
FUNCTION_IMPL(THVector_(adds_VSX), SIMDExtension_VSX),
|
||||
#endif
|
||||
@@ -146,7 +146,7 @@ static FunctionDescription THVector_(muls_DISPATCHTABLE)[] = {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
- #if defined(__PPC64__)
|
||||
+ #if defined(__PPC64__) && defined(__VSX__)
|
||||
#if defined(TH_REAL_IS_DOUBLE) || defined(TH_REAL_IS_FLOAT)
|
||||
FUNCTION_IMPL(THVector_(muls_VSX), SIMDExtension_VSX),
|
||||
#endif
|
||||
diff --git contrib/lua-torch/torch7/lib/TH/generic/simd/simd.h contrib/lua-torch/torch7/lib/TH/generic/simd/simd.h
|
||||
index 83c4c56..0919f73 100644
|
||||
--- contrib/lua-torch/torch7/lib/TH/generic/simd/simd.h
|
||||
+++ contrib/lua-torch/torch7/lib/TH/generic/simd/simd.h
|
||||
@@ -43,7 +43,7 @@ enum SIMDExtensions
|
||||
{
|
||||
#if defined(__NEON__)
|
||||
SIMDExtension_NEON = 0x1,
|
||||
-#elif defined(__PPC64__)
|
||||
+#elif defined(__PPC64__) && defined(__VSX__)
|
||||
SIMDExtension_VSX = 0x1,
|
||||
#else
|
||||
SIMDExtension_AVX2 = 0x1,
|
|
@ -2,6 +2,7 @@
|
|||
pkgname=rspamd
|
||||
version=1.9.4
|
||||
revision=2
|
||||
archs="x86_64* i686* aarch64* armv[67]* ppc64*"
|
||||
build_style=cmake
|
||||
configure_args="-DRSPAMD_USER=rspamd -DCONFDIR=/etc/rspamd
|
||||
-DDBDIR=/var/lib/rspamd"
|
||||
|
|
Loading…
Reference in a new issue