From ae3d56121f9b1ea7f51ad98f2ddfadfd323c3e14 Mon Sep 17 00:00:00 2001 From: Mircho Rodozov Date: Wed, 22 Apr 2020 17:54:44 +0200 Subject: [PATCH] fix for eigen on powerpc. see https://gitlab.com/libeigen/eigen/issues/1718 --- eigen-altivec-fix.patch | 13 +++++++++++++ eigen.spec | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 eigen-altivec-fix.patch diff --git a/eigen-altivec-fix.patch b/eigen-altivec-fix.patch new file mode 100644 index 00000000000..2d15e9f36cf --- /dev/null +++ b/eigen-altivec-fix.patch @@ -0,0 +1,13 @@ +diff --git a/Eigen/src/Core/arch/AltiVec/PacketMath.h b/Eigen/src/Core/arch/AltiVec/PacketMath.h +index 9464264..eda73ec 100755 +--- a/Eigen/src/Core/arch/AltiVec/PacketMath.h ++++ b/Eigen/src/Core/arch/AltiVec/PacketMath.h +@@ -452,7 +452,7 @@ template<> EIGEN_STRONG_INLINE Packet4f pandnot(const Packet4f& a, con + template<> EIGEN_STRONG_INLINE Packet4i pandnot(const Packet4i& a, const Packet4i& b) { return vec_and(a, vec_nor(b, b)); } + + template<> EIGEN_STRONG_INLINE Packet4f pselect(const Packet4f& mask, const Packet4f& a, const Packet4f& b) { +- return vec_sel(b, a, mask); ++ return vec_sel(b, a, reinterpret_cast(mask)); + } + + template<> EIGEN_STRONG_INLINE Packet4f pround(const Packet4f& a) { return vec_round(a); } diff --git a/eigen.spec b/eigen.spec index 4eeafd9e266..231317c4bfa 100644 --- a/eigen.spec +++ b/eigen.spec @@ -11,9 +11,11 @@ %define source_prefix eigen-git-mirror-%{tag} Source: %{source0} BuildRequires: cmake +Patch0: eigen-altivec-fix %prep %setup -n %{source_prefix} +%patch0 -p1 %build mkdir build