[eigen3/epel7] Add ppc64 support

Orion Poplawski orion at fedoraproject.org
Tue Mar 11 21:36:44 UTC 2014


commit 42581df00f283cb0ddb03c072dff495bbf9d55d8
Author: Orion Poplawski <orion at nwra.com>
Date:   Tue Mar 11 15:01:27 2014 -0600

    Add ppc64 support

 eigen3-ppc64.patch |   12 ++++++++++++
 eigen3.spec        |   13 ++++++++++++-
 2 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/eigen3-ppc64.patch b/eigen3-ppc64.patch
new file mode 100644
index 0000000..25b86de
--- /dev/null
+++ b/eigen3-ppc64.patch
@@ -0,0 +1,12 @@
+diff -up eigen-eigen-ffa86ffb5570/unsupported/test/mpreal/mpreal.h.ppc64 eigen-eigen-ffa86ffb5570/unsupported/test/mpreal/mpreal.h
+--- eigen-eigen-ffa86ffb5570/unsupported/test/mpreal/mpreal.h.ppc64	2013-07-23 19:48:35.000000000 -0600
++++ eigen-eigen-ffa86ffb5570/unsupported/test/mpreal/mpreal.h	2014-02-13 10:18:48.290136534 -0700
+@@ -97,7 +97,7 @@
+         #endif
+ 
+     #elif defined (__GNUC__) && defined(__linux__)
+-        #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(__ia64) || defined(__itanium__) || defined(_M_IA64)
++        #if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(__ia64) || defined(__itanium__) || defined(_M_IA64) || defined (__PPC64__)
+             #undef MPREAL_HAVE_INT64_SUPPORT    // Remove all shaman dances for x64 builds since
+             #undef MPFR_USE_INTMAX_T            // GCC already supports x64 as of "long int" is 64-bit integer, nothing left to do
+         #else
diff --git a/eigen3.spec b/eigen3.spec
index 8c18149..b4e184b 100644
--- a/eigen3.spec
+++ b/eigen3.spec
@@ -8,7 +8,7 @@
 
 Name:           eigen3
 Version:        3.2.1
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        A lightweight C++ template library for vector and matrix math
 
 Group:          Development/Libraries
@@ -17,6 +17,8 @@ URL:            http://eigen.tuxfamily.org/index.php?title=Main_Page
 # Source file is at: http://bitbucket.org/eigen/eigen/get/3.1.4.tar.bz2
 # Renamed source file so it's not just a version number
 Source0:        eigen-%{version}.tar.bz2
+# Add ppc64 support
+Patch0:         eigen3-ppc64.patch
 
 BuildRequires:  atlas-devel
 BuildRequires:  fftw-devel
@@ -58,10 +60,16 @@ Developer documentation for Eigen.
 
 %prep
 %setup -q -n eigen-eigen-%{commit}
+%patch0 -p1 -b .ppc64
 
 %build
 mkdir %{_target_platform}
 pushd %{_target_platform}
+%ifarch ppc64
+# Currently get a compiler ICE, work around it
+# https://bugzilla.redhat.com/show_bug.cgi?id=1063999
+export CXXFLAGS="%{optflags} -mno-vsx"
+%endif
 %cmake .. -DBLAS_LIBRARIES="cblas" -DSUPERLU_INCLUDES=%{_includedir}/SuperLU
 popd
 make -C %{_target_platform} %{?_smp_mflags}
@@ -88,6 +96,9 @@ make -C %{_target_platform} %{?_smp_mflags} test ARGS="-V" || exit 0
 %doc %{_target_platform}/doc/html
 
 %changelog
+* Tue Mar 11 2014 Orion Poplawski <orion at cora.nwra.com> - 3.2.1-4
+- Add ppc64 support
+
 * Thu Feb 27 2014 Sandro Mani <manisandro at gmail.com> - 3.2.1-3
 - Make doc package noarch
 


More information about the scm-commits mailing list