diff --git a/openblas-0.2.18-tests.patch b/openblas-0.2.18-tests.patch new file mode 100644 index 0000000..0aff213 --- /dev/null +++ b/openblas-0.2.18-tests.patch @@ -0,0 +1,18 @@ +diff -up OpenBLAS-0.2.18/Makefile.orig OpenBLAS-0.2.18/Makefile +--- OpenBLAS-0.2.18/Makefile.orig 2016-04-12 21:29:19.000000000 +0200 ++++ OpenBLAS-0.2.18/Makefile 2016-07-13 21:32:17.786003290 +0200 +@@ -112,11 +112,11 @@ ifndef TARGET + ifndef CROSS + touch $(LIBNAME) + ifndef NO_FBLAS +- $(MAKE) -C test all +- $(MAKE) -C utest all ++ $(MAKE) -C test FC="$(FC)" CC="$(CC)" COMMON_OPT="$(COMMON_OPT)" FCOMMON_OPT="$(FCOMMON_OPT)" all ++ $(MAKE) -C utest FC="$(FC)" CC="$(CC)" COMMON_OPT="$(COMMON_OPT)" FCOMMON_OPT="$(FCOMMON_OPT)" all + endif + ifndef NO_CBLAS +- $(MAKE) -C ctest all ++ $(MAKE) -C ctest FC="$(FC)" CC="$(CC)" COMMON_OPT="$(COMMON_OPT)" FCOMMON_OPT="$(FCOMMON_OPT)" all + endif + endif + endif diff --git a/openblas.spec b/openblas.spec index 886a282..1cf7a89 100644 --- a/openblas.spec +++ b/openblas.spec @@ -16,6 +16,9 @@ Patch0: openblas-0.2.15-system_lapack.patch Patch1: openblas-0.2.5-libname.patch # Don't use constructor priorities on too old architectures Patch2: openblas-0.2.15-constructor.patch +# Supply the proper flags to the test makefile +Patch3: openblas-0.2.18-tests.patch + BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: gcc-gfortran @@ -78,7 +81,7 @@ BuildRequires: lapack64-static # Upstream supports the package only on these architectures. # Runtime processor detection is not available on other archs. -ExclusiveArch: x86_64 %{ix86} armv7hl ppc64le aarch64 +ExclusiveArch: x86_64 %{ix86} armv7hl %{power64} aarch64 %global base_description \ OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ @@ -213,6 +216,7 @@ cd OpenBLAS-%{version} %if 0%{?rhel} == 5 %patch2 -p1 -b .constructor %endif +%patch3 -p1 -b .tests # Fix source permissions find -name \*.f -exec chmod 644 {} \; @@ -331,6 +335,12 @@ export AVX="NO_AVX2=1" %ifarch armv7hl TARGET="TARGET=ARMV7 DYNAMIC_ARCH=0" %endif +%ifarch ppc64 +TARGET="TARGET=POWER6 DYNAMIC_ARCH=0" +%endif +%ifarch ppc64p7 +TARGET="TARGET=POWER7 DYNAMIC_ARCH=0" +%endif %ifarch ppc64le TARGET="TARGET=POWER8 DYNAMIC_ARCH=0" %endif @@ -375,6 +385,12 @@ cp -a %{_includedir}/lapacke %{buildroot}%{_includedir}/%{name} %ifarch armv7hl suffix="_armv7" %endif +%ifarch ppc64 +suffix="_power6" +%endif +%ifarch ppc64p7 +suffix="_power7" +%endif %ifarch ppc64le suffix="_power8" %endif @@ -605,6 +621,11 @@ rm -rf %{buildroot} %endif %changelog +* Wed Jul 13 2016 Susi Lehtola - 0.2.18-3 +- Enable ppc64 and ppc64p7 architectures + based on Dan HorĂ¡k's patch (BZ #1356189). +- Supply proper make flags to the tests. + * Tue Jul 12 2016 Jeff Bastian - 0.2.18-2 - update for aarch64