Fedora Account System
Red Hat Associate
Red Hat Customer
Created attachment 1271416 [details] patch adding s390x support There is an upstream branch with s390x support [1] and the first commit [2] adds a generic kernel for s390x. With a small fix on top of that I was able to build openblas package on s390x [3] (fails in the %install section in spec that needs updating). [1] https://github.com/xianyi/OpenBLAS/commits/z13 [2] https://github.com/xianyi/OpenBLAS/commit/dd43661cfd5d3de6e9fe804587b89f1094c85e41 [3] https://s390.koji.fedoraproject.org/koji/taskinfo?taskID=2549380
successful scratch build = https://s390.koji.fedoraproject.org/koji/taskinfo?taskID=2549408 required spec file changes diff --git a/openblas.spec b/openblas.spec index 83b3da8..dac23ef 100644 --- a/openblas.spec +++ b/openblas.spec @@ -31,6 +31,8 @@ Patch2: openblas-0.2.15-constructor.patch Patch3: openblas-0.2.19-tests.patch # From https://github.com/xianyi/OpenBLAS/issues/1078#issuecomment-279527810 Patch4: openblas-0.2.19-fix_register_clobbers.patch +# +Patch5: openblas-0.2.19-s390x.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -91,7 +93,7 @@ BuildRequires: lapack64-static # Upstream supports the package only on these architectures. # Runtime processor detection is not available on other archs. -ExclusiveArch: %{openblas_arches} +ExclusiveArch: %{openblas_arches} s390x %global base_description \ OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD \ @@ -237,6 +239,7 @@ cd OpenBLAS-%{version} %endif %patch3 -p1 -b .tests %patch4 -p1 -b .register_clobbers +%patch5 -p1 -b .s390x # Fix source permissions find -name \*.f -exec chmod 644 {} \; @@ -426,6 +429,9 @@ suffix="_power8" %ifarch aarch64 suffix="_armv8" %endif +%ifarch s390x +suffix="_zarch_generic" +%endif slibname=`basename %{buildroot}%{_libdir}/libopenblas${suffix}-*.so .so` mv %{buildroot}%{_libdir}/${slibname}.a %{buildroot}%{_libdir}/lib%{name}.a if [[ "$suffix" != "" ]]; then I've already reported the missing piece in https://github.com/xianyi/OpenBLAS/pull/1154 The upstream "develop" branch will need small adjustment for allowing the generic backend on machines older than z13.
Ping, it became more important now when s390x is part of the primary koji instance. All needed fixes are now in upstream, let me know if I can update the openblas package in Rawhide.
Sure, go ahead.