diff options
author | ler <ler@FreeBSD.org> | 2018-01-21 03:56:03 +0800 |
---|---|---|
committer | Koop Mast <kwm@rainbow-runner.nl> | 2018-02-04 06:27:01 +0800 |
commit | cabf7fab6ce778ae2957d84a5f11a277c2fea683 (patch) | |
tree | 019cd3c6a2c5442237104ed68427f4dfd14cc0d2 /astro | |
parent | 3a8fcce43af72defcc222bff702f6ed31b5db8c3 (diff) | |
download | freebsd-ports-gnome-cabf7fab6ce778ae2957d84a5f11a277c2fea683.tar.gz freebsd-ports-gnome-cabf7fab6ce778ae2957d84a5f11a277c2fea683.tar.zst freebsd-ports-gnome-cabf7fab6ce778ae2957d84a5f11a277c2fea683.zip |
astro/boinc-setiathome: fix build on i386.
Submitted by: dim
Reported by: pkg-fallout
Diffstat (limited to 'astro')
-rw-r--r-- | astro/boinc-setiathome/Makefile | 1 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/patch-client_vector_x86__float4.h | 57 | ||||
-rw-r--r-- | astro/boinc-setiathome/files/patch-client_vector_x86__ops.h | 24 |
3 files changed, 81 insertions, 1 deletions
diff --git a/astro/boinc-setiathome/Makefile b/astro/boinc-setiathome/Makefile index 78ce8147b479..6b657ad9a161 100644 --- a/astro/boinc-setiathome/Makefile +++ b/astro/boinc-setiathome/Makefile @@ -15,7 +15,6 @@ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING BROKEN_powerpc64= does not compile: analyzeFuncs_altivec.cpp: CoreServices/CoreServices.h: No such file or directory -BROKEN_FreeBSD_10_i386= does not compile: vector/x86_ops.h:149:9: error: unknown type name '__m128i'; did you mean '__m128'? BUILD_DEPENDS= ${LOCALBASE}/include/fftw3.h:math/fftw3 RUN_DEPENDS= boinc_client:net/boinc-client LIB_DEPENDS= libfftw3f.so:math/fftw3-float diff --git a/astro/boinc-setiathome/files/patch-client_vector_x86__float4.h b/astro/boinc-setiathome/files/patch-client_vector_x86__float4.h new file mode 100644 index 000000000000..5124f661a2b1 --- /dev/null +++ b/astro/boinc-setiathome/files/patch-client_vector_x86__float4.h @@ -0,0 +1,57 @@ +--- client/vector/x86_float4.h.orig 2018-01-14 23:02:12 UTC ++++ client/vector/x86_float4.h +@@ -58,8 +58,8 @@ extern const_float4 INDGEN[2]; + + ALIGNED(static const int sign_bits[4],16)={INT_MIN, INT_MIN, INT_MIN, INT_MIN}; + ALIGNED(static const int other_bits[4],16)={INT_MAX, INT_MAX, INT_MAX, INT_MAX}; +-#define SIGN_BITS (*(__m128i *)sign_bits) +-#define OTHER_BITS (*(__m128i *)other_bits) ++#define SIGN_BITS (*(__m128 *)sign_bits) ++#define OTHER_BITS (*(__m128 *)other_bits) + + + +@@ -104,19 +104,19 @@ struct float4 { + #endif + return rv; + }; +- inline float4 operator |(const __m128i &b) const { ++ inline float4 operator |(const __m128 &b) const { + register float4 rv; + #ifdef USE_INTRINSICS +- rv.m=_mm_or_ps(*(__m128 *)&b,m); ++ rv.m=_mm_or_ps(b,m); + #elif defined(__GNUC__) + __asm__ ( "orps %2,%0" : "=x" (rv.m) : "0" (b), "xm" (m)); + #endif + return rv; + }; +- inline float4 operator &(const __m128i &b) const { ++ inline float4 operator &(const __m128 &b) const { + register float4 rv; + #ifdef USE_INTRINSICS +- rv.m=_mm_and_ps(*(__m128 *)&b,m); ++ rv.m=_mm_and_ps(b,m); + #elif defined(__GNUC__) + __asm__ ( "andps %2,%0" : "=x" (rv.m) : "0" (b), "xm" (m)); + #endif +@@ -159,7 +159,9 @@ struct float4 { + return *this; + } + inline operator __m128() {return m;}; ++#ifdef __SSE2__ + inline operator __m128i() {return *(__m128i *)&m; }; ++#endif + inline float4 abs() const { + // clear the sign bits + return *this & OTHER_BITS; +@@ -258,7 +260,9 @@ struct const_float4 : public float4 { + inline const_float4(const float4 &b) { m=b.m; }; + inline operator float4() const { return *this; }; + inline operator __m128() {return m;}; ++#ifdef __SSE2__ + inline operator __m128i() {return *(__m128i *)&m; }; ++#endif + }; + + #endif diff --git a/astro/boinc-setiathome/files/patch-client_vector_x86__ops.h b/astro/boinc-setiathome/files/patch-client_vector_x86__ops.h new file mode 100644 index 000000000000..38b148205574 --- /dev/null +++ b/astro/boinc-setiathome/files/patch-client_vector_x86__ops.h @@ -0,0 +1,24 @@ +--- client/vector/x86_ops.h.orig 2018-01-14 23:02:12 UTC ++++ client/vector/x86_ops.h +@@ -137,8 +137,10 @@ + // SSE2 specific functions/macros here. + #if defined(_MSC_VER) || defined(__clang__) + typedef __m128d x86_m128d; ++typedef __m128i x86_m128i; + #else + typedef double x86_m128d __attribute__ ((mode(V2DF))) __attribute__((aligned(16))); ++typedef int x86_m128i __attribute__ ((mode(V4SI))) __attribute__((aligned(16))); + #endif + #endif + +@@ -146,10 +148,8 @@ typedef double x86_m128d __attribute__ ((mode(V2DF))) + // SSE specific functions/macros here. + #if defined(_MSC_VER) || defined(__clang__) + typedef __m128 x86_m128; +-typedef __m128i x86_m128i; + #else + typedef float x86_m128 __attribute__ ((mode(V4SF))) __attribute__((aligned(16))); +-typedef int x86_m128i __attribute__ ((mode(V4SI))) __attribute__((aligned(16))); + #endif + + static inline void prefetcht0(const void *v) { |