diff --git a/atlas-sparc64.patch b/atlas-sparc64.patch new file mode 100644 index 0000000..b391b23 --- /dev/null +++ b/atlas-sparc64.patch @@ -0,0 +1,94 @@ +diff -uNr ATLAS.orig/tune/blas/gemm/CASES/ATL_dmm4x4x16r8_US.c ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x16r8_US.c +--- ATLAS.orig/tune/blas/gemm/CASES/ATL_dmm4x4x16r8_US.c 2009-01-26 21:20:44.000000000 -0600 ++++ ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x16r8_US.c 2009-03-18 00:02:10.000000000 -0500 +@@ -107,6 +107,11 @@ + #define incBn %g4 + #define pfB %g5 + ++#if defined(__sparc__) && defined(__arch64__) ++ .register %g2, #scratch ++ .register %g3, #scratch ++#endif ++ + #ifdef DCPLX + #define incCm 64 + #define CSH 4 +diff -uNr ATLAS.orig/tune/blas/gemm/CASES/ATL_dmm4x4x2_US.c ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x2_US.c +--- ATLAS.orig/tune/blas/gemm/CASES/ATL_dmm4x4x2_US.c 2009-01-26 21:20:41.000000000 -0600 ++++ ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x2_US.c 2009-03-18 00:02:20.000000000 -0500 +@@ -95,6 +95,11 @@ + #define incBm %g3 + #define incBn %g4 + ++#if defined(__sparc__) && defined(__arch64__) ++ .register %g2, #scratch ++ .register %g3, #scratch ++#endif ++ + #ifdef DCPLX + #define incCm 64 + #define CSH 4 +diff -uNr ATLAS.orig/tune/blas/gemm/CASES/ATL_dmm4x4x8_US.c ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x8_US.c +--- ATLAS.orig/tune/blas/gemm/CASES/ATL_dmm4x4x8_US.c 2009-01-26 21:20:40.000000000 -0600 ++++ ATLAS/tune/blas/gemm/CASES/ATL_dmm4x4x8_US.c 2009-03-18 00:02:31.000000000 -0500 +@@ -107,6 +107,11 @@ + #define incBn %g4 + #define pfB %g5 + ++#if defined(__sparc__) && defined(__arch64__) ++ .register %g2, #scratch ++ .register %g3, #scratch ++#endif ++ + #ifdef DCPLX + #define CMUL(arg_) ((arg_)*2) + #define incCm 64 +diff -uNr ATLAS.orig/tune/blas/gemm/CASES/ATL_smm4x4x16_US.c ATLAS/tune/blas/gemm/CASES/ATL_smm4x4x16_US.c +--- ATLAS.orig/tune/blas/gemm/CASES/ATL_smm4x4x16_US.c 2009-01-26 21:20:48.000000000 -0600 ++++ ATLAS/tune/blas/gemm/CASES/ATL_smm4x4x16_US.c 2009-03-18 00:03:02.000000000 -0500 +@@ -93,6 +93,12 @@ + #define rC23 %f30 + #define rC33 %f31 + #define FSIZE 64 ++ ++#if defined(__sparc__) && defined(__arch64__) ++ .register %g2, #scratch ++ .register %g3, #scratch ++#endif ++ + #ifdef SCPLX + #define CSH 3 + #define CMUL(arg_) ((arg_)*2) +diff -uNr ATLAS.orig/tune/blas/gemm/CASES/ATL_smm4x4x2_US.c ATLAS/tune/blas/gemm/CASES/ATL_smm4x4x2_US.c +--- ATLAS.orig/tune/blas/gemm/CASES/ATL_smm4x4x2_US.c 2009-01-26 21:20:43.000000000 -0600 ++++ ATLAS/tune/blas/gemm/CASES/ATL_smm4x4x2_US.c 2009-03-18 00:03:32.000000000 -0500 +@@ -93,6 +93,12 @@ + #define rC23 %f30 + #define rC33 %f31 + #define FSIZE 64 ++ ++#if defined(__sparc__) && defined(__arch64__) ++ .register %g2, #scratch ++ .register %g3, #scratch ++#endif ++ + #ifdef SCPLX + #define CSH 3 + #define CMUL(arg_) ((arg_)*2) +diff -uNr ATLAS.orig/tune/blas/gemm/CASES/ATL_smm4x4x72_US.c ATLAS/tune/blas/gemm/CASES/ATL_smm4x4x72_US.c +--- ATLAS.orig/tune/blas/gemm/CASES/ATL_smm4x4x72_US.c 2009-01-26 21:20:43.000000000 -0600 ++++ ATLAS/tune/blas/gemm/CASES/ATL_smm4x4x72_US.c 2009-03-18 00:03:50.000000000 -0500 +@@ -108,6 +108,12 @@ + #define rC23 %f30 + #define rC33 %f31 + #define FSIZE 64 ++ ++#if defined(__sparc__) && defined(__arch64__) ++ .register %g2, #scratch ++ .register %g3, #scratch ++#endif ++ + #ifdef SCPLX + #define CSH 3 + #define CMUL(arg_) ((arg_)*2) +Binary files ATLAS.orig/xconfig and ATLAS/xconfig differ diff --git a/atlas.spec b/atlas.spec index 5327c1e..6418e83 100644 --- a/atlas.spec +++ b/atlas.spec @@ -1,6 +1,6 @@ Name: atlas Version: 3.6.0 -Release: 15%{?dist} +Release: 16%{?dist} Summary: Automatically Tuned Linear Algebra Software Group: System Environment/Libraries @@ -11,6 +11,7 @@ Source1: README.Fedora Patch0: http://ftp.debian.org/debian/pool/main/a/atlas3/%{name}3_%{version}-20.diff.gz Patch1: %{name}-%{version}-gfortran.patch Patch2: %{name}-%{version}-ia64-configure.patch +Patch3: atlas-sparc64.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: /etc/ld.so.conf.d @@ -134,6 +135,30 @@ optimizations for the 3DNow extensions to the ix86 architecture. %define types ev6 %endif +%ifarch sparcv9 sparc64 +%define archt sparc +%define types base v9 +%endif + +%ifarch sparcv9 sparc64 +%package v9 +Summary: ATLAS libraries for ultrasparc +Group: System Environment/Libraries +%description v9 +This package contains the ATLAS (Automatically Tuned Linear Algebra +Software) libraries compiled with optimizations for the v9 +extensions to the sparc architecture. +%package v9-devel +Summary: Development libraries for ATLAS with ultrasparc optimisations +Group: Development/Libraries +Requires: %{name}-v9 = %{version}-%{release} +%description v9-devel +This package contains headers and static versions of the ATLAS +(Automatically Tuned Linear Algebra Software) libraries compiled with +optimizations for the v9 extensions to the sparc architecture. + +%endif + %if "%{?enable_custom_atlas}" == "1" # This flag enables building customized ATLAS libraries with all # compile-time optimizations. Note that compilation will take a very @@ -165,6 +190,7 @@ all compile-time optimizations enabled. %patch0 -p1 %patch1 -p0 %patch2 -p1 +%patch3 -p1 cp %{SOURCE1} doc @@ -413,6 +439,15 @@ rm -rf $RPM_BUILD_ROOT %postun -n atlas-3dnow -p /sbin/ldconfig %endif + +%ifarch sparcv9 sparc64 + +%post -n atlas-v9 -p /sbin/ldconfig + +%postun -n atlas-v9 -p /sbin/ldconfig + +%endif + %if "%{?enable_custom_atlas}" == "1" %post -n atlas-custom -p /sbin/ldconfig @@ -504,9 +539,29 @@ rm -rf $RPM_BUILD_ROOT %endif +%ifarch sparcv9 sparc64 +%files v9 +%defattr(-,root,root,-) +%doc debian/copyright doc/README.Fedora +%dir %{_libdir}/v9 +%{_libdir}/v9/*.so.* +%config(noreplace) /etc/ld.so.conf.d/atlas-v9.conf + +%files v9-devel +%defattr(-,root,root,-) +%doc debian/copyright doc +%dir %{_libdir}/v9 +%{_libdir}/v9/*.so +%{_libdir}/v9/*.a +%{_includedir}/atlas + +%endif %endif %changelog +* Mon Jan 26 2009 Dennis Gilmore 3.6.0-16 +- build v9 sub packages on sparc + * Wed May 7 2008 Quentin Spencer 3.6.0-15 - Disable altivec package--it is causing illegal instructions during build.