[atlas/f15] Update to 3.8.4 Apply patch to enable arm build (Patch provided by Jitesh Shah <jiteshs at marvell.com>

Deji Akingunola deji at fedoraproject.org
Fri Sep 2 03:10:12 UTC 2011


commit 00663549a993a5b99e3a476db72783e52efd1692
Author: Deji Akingunola <dakingun at mail.com>
Date:   Thu Sep 1 23:12:35 2011 -0400

    Update to 3.8.4
    Apply patch to enable arm build (Patch provided by Jitesh Shah <jiteshs at marvell.com>)
    Stop turning off throttle checking, upstream frown at it (seems O.K. for Koji)
    Use -march=z10 for z196 optimised build because the builder is a z10
    (Christian Bornträger)
    Build the default package for SSE2 and add a SSE3 subpackage on x86_64
    (only on f16 and above)
    Apply patch (and arch defs.) to build on s390 and s390x (Dan Horák)
    Fix-up build on s390 and s390x (Christian Bornträger)

 README.Fedora           |   13 ++-
 atlas-fedora-arm.patch  |   50 +++++++++
 atlas-s390-m31.patch    |   30 -----
 atlas-s390port.patch    |  279 +++++++++++++++++++++++++++++++++++++++++++++++
 atlas-sparc-linux.patch |   95 ----------------
 atlas.spec              |  164 +++++++++++++++++++++++++--
 sources                 |    8 +-
 7 files changed, 498 insertions(+), 141 deletions(-)
---
diff --git a/README.Fedora b/README.Fedora
index 19cd5ba..09ab711 100644
--- a/README.Fedora
+++ b/README.Fedora
@@ -6,6 +6,9 @@ updated: October 4, 2005
 updated by Deji Akingunola
 October 15, 2008
 
+updated by Deji Akingunola
+June 15, 2011
+
 Because ATLAS relies on compile-time optimizations to obtain improved
 performance over BLAS and LAPACK, the resulting binaries are closely
 tied to the hardware on which they are compiled, and can likely result
@@ -38,9 +41,15 @@ lapack libraries that should work as a drop-in replacement for the
 standard ones (they are installed in /usr/lib{64}/atlas* rather than
 /usr/lib{64}).
 
-For i386 systems, 4 ATLAS subpackages are built for 3Dnow, SSE1, SSE2, and SSE3
-ix86 extensions, using architectural defaults obtained from Athlon K7, PIII, Pentium 4 with SSE2 extension and PENTIUM 4 with SSE3 extensions respectively.
+For 32bit x86 systems, the default atlas package on was built using Pentium Pro
+architectural defaults using just x87 math optimization. In addition to the
+base 32bit build, 4 ATLAS subpackages are built for 3Dnow, SSE, SSE2, and SSE3
+ix86 extensions, using architectural defaults obtained from Athlon K7, PIII,
+Pentium 4 with SSE2 extension and PENTIUM 4 with SSE3 extensions respectively.
 
+On 64bit x86 systems the default atlas package on was built with SSE2 optimization using architetural default made for AMD's HAMMER processor, and an additional
+SSE3-enabled subpackage was built also using architetural default made for AMD's HAMMER processor.
+  
 This packaging allows multiple installation of different atlas sub-packages
 at the same time. The alternatives system (read 'man alternatives' for usage)
 is used in the -devel subpackages to select the appropriate location for the 
diff --git a/atlas-fedora-arm.patch b/atlas-fedora-arm.patch
new file mode 100644
index 0000000..22a9889
--- /dev/null
+++ b/atlas-fedora-arm.patch
@@ -0,0 +1,50 @@
+--- CONFIG/include/atlconf.h	2011-05-14 13:33:24.000000000 -0400
++++ CONFIG/include/atlconf.h.new	2011-08-30 14:25:41.427136391 -0400
+@@ -16,7 +16,7 @@
+ 
+ enum ARCHFAM {AFOther=0, AFPPC, AFSPARC, AFALPHA, AFX86, AFIA64, AFMIPS};
+ 
+-#define NMACH 37
++#define NMACH 38
+ static char *machnam[NMACH] =
+    {"UNKNOWN", "POWER3", "POWER4", "POWER5", "PPCG4", "PPCG5",
+     "POWER6", "POWER7",
+@@ -25,7 +25,7 @@
+     "Efficeon", "K7", "HAMMER", "AMD64K10h", "UNKNOWNx86",
+     "IA64Itan", "IA64Itan2",
+     "USI", "USII", "USIII", "USIV", "UST2", "UnknownUS",
+-    "MIPSR1xK", "MIPSICE9"};
++    "MIPSR1xK", "MIPSICE9", "ARM"};
+ enum MACHTYPE {MACHOther, IbmPwr3, IbmPwr4, IbmPwr5, PPCG4, PPCG5,
+                IbmPwr6, IbmPwr7,
+                IntP5, IntP5MMX, IntPPRO, IntPII, IntPIII, IntPM, IntCoreS,
+@@ -34,7 +34,8 @@
+                IA64Itan, IA64Itan2,
+                SunUSI, SunUSII, SunUSIII, SunUSIV, SunUST2, SunUSX,
+                MIPSR1xK, /* includes R10K, R12K, R14K, R16K */
+-               MIPSICE9   /* SiCortex ICE9 -- like MIPS5K */
++               MIPSICE9,   /* SiCortex ICE9 -- like MIPS5K */
++	       ARM
+                };
+ #define MachIsX86(mach_) \
+    ( (mach_) >= IntP5 && (mach_) <= x86X )
+@@ -51,6 +52,8 @@
+ #endif
+ #define MachIsPPC(mach_) \
+    ( (mach_) >= PPCG4 && (mach_) <= PPCG5 )
++#define MachIsARM(mach_) \
++   ( (mach_) == ARM )
+ 
+ static char *f2c_namestr[5] = {"UNKNOWN","Add_", "Add__", "NoChange", "UpCase"};
+ static char *f2c_intstr[5] =
+--- CONFIG/src/probe_comp.c	2011-05-14 13:33:24.000000000 -0400
++++ CONFIG/src/probe_comp.c.new	2011-08-30 14:28:31.103015151 -0400
+@@ -507,6 +507,8 @@
+ 
+    if (MachIsIA64(arch))
+       return(sp);
++   if (MachIsARM(arch))
++      return(sp);
+    if (MachIsMIPS(arch))
+       return((ptrbits == 64) ? "-mabi=64" : "-mabi=n32");
+    if (!CompIsGcc(comp))
diff --git a/atlas-s390port.patch b/atlas-s390port.patch
new file mode 100644
index 0000000..21503cf
--- /dev/null
+++ b/atlas-s390port.patch
@@ -0,0 +1,279 @@
+---
+ CONFIG/include/atlconf.h            |   18 +++++++-----
+ CONFIG/src/Makefile                 |    5 +++
+ CONFIG/src/SpewMakeInc.c            |    5 +++
+ CONFIG/src/atlcomp.txt              |   50 ++++++++++++++++++++++++++++++++++++
+ CONFIG/src/atlconf_misc.c           |    2 +
+ CONFIG/src/backend/Make.ext         |    2 +
+ CONFIG/src/backend/archinfo_linux.c |   12 ++++++++
+ CONFIG/src/backend/probe_gas_s390.S |   13 +++++++++
+ CONFIG/src/probe_comp.c             |    2 +
+ include/atlas_prefetch.h            |    6 ++++
+ 10 files changed, 108 insertions(+), 7 deletions(-)
+
+Index: b/CONFIG/include/atlconf.h
+===================================================================
+--- a/CONFIG/include/atlconf.h
++++ b/CONFIG/include/atlconf.h
+@@ -14,9 +14,9 @@ enum OSTYPE {OSOther=0, OSLinux, OSSunOS
+              OSWin9x, OSWinNT, OSHPUX, OSFreeBSD, OSOSX};
+ #define OSIsWin(OS_) (((OS_) == OSWinNT) || ((OS_) == OSWin9x))
+ 
+-enum ARCHFAM {AFOther=0, AFPPC, AFSPARC, AFALPHA, AFX86, AFIA64, AFMIPS};
++enum ARCHFAM {AFOther=0, AFPPC, AFSPARC, AFALPHA, AFX86, AFIA64, AFMIPS, AFS390};
+ 
+-#define NMACH 37
++#define NMACH 42
+ static char *machnam[NMACH] =
+    {"UNKNOWN", "POWER3", "POWER4", "POWER5", "PPCG4", "PPCG5",
+     "POWER6", "POWER7",
+@@ -25,7 +25,8 @@ static char *machnam[NMACH] =
+     "Efficeon", "K7", "HAMMER", "AMD64K10h", "UNKNOWNx86",
+     "IA64Itan", "IA64Itan2",
+     "USI", "USII", "USIII", "USIV", "UST2", "UnknownUS",
+-    "MIPSR1xK", "MIPSICE9"};
++    "MIPSR1xK", "MIPSICE9",
++    "IBMz900", "IBMz990", "IBMz9", "IBMz10", "IBMz196" };
+ enum MACHTYPE {MACHOther, IbmPwr3, IbmPwr4, IbmPwr5, PPCG4, PPCG5,
+                IbmPwr6, IbmPwr7,
+                IntP5, IntP5MMX, IntPPRO, IntPII, IntPIII, IntPM, IntCoreS,
+@@ -34,7 +35,8 @@ enum MACHTYPE {MACHOther, IbmPwr3, IbmPw
+                IA64Itan, IA64Itan2,
+                SunUSI, SunUSII, SunUSIII, SunUSIV, SunUST2, SunUSX,
+                MIPSR1xK, /* includes R10K, R12K, R14K, R16K */
+-               MIPSICE9   /* SiCortex ICE9 -- like MIPS5K */
++               MIPSICE9,   /* SiCortex ICE9 -- like MIPS5K */
++               IBMz900, IBMz990, IBMz9, IBMz10, IBMz196 /* s390(x) in Linux */
+                };
+ #define MachIsX86(mach_) \
+    ( (mach_) >= IntP5 && (mach_) <= x86X )
+@@ -51,6 +53,8 @@ enum MACHTYPE {MACHOther, IbmPwr3, IbmPw
+ #endif
+ #define MachIsPPC(mach_) \
+    ( (mach_) >= PPCG4 && (mach_) <= PPCG5 )
++#define MachIsS390(mach_) \
++   ( (mach_) >= IBMz900 && (mach_) <= IBMz196 )
+ 
+ static char *f2c_namestr[5] = {"UNKNOWN","Add_", "Add__", "NoChange", "UpCase"};
+ static char *f2c_intstr[5] =
+@@ -68,13 +72,13 @@ static char *ISAXNAM[NISA] =
+    {"", "AltiVec", "SSE3", "SSE2", "SSE1", "3DNow"};
+ enum ISAEXT {ISA_None=0, ISA_AV, ISA_SSE3, ISA_SSE2, ISA_SSE1, ISA_3DNow};
+ 
+-#define NASMD 7
++#define NASMD 8
+ enum ASMDIA
+    {ASM_None=0, gas_x86_32, gas_x86_64, gas_sparc, gas_ppc, gas_parisc,
+-    gas_mips};
++    gas_mips, gas_s390};
+ static char *ASMNAM[NASMD] =
+    {"",     "GAS_x8632", "GAS_x8664", "GAS_SPARC", "GAS_PPC", "GAS_PARISC",
+-    "GAS_MIPS"};
++    "GAS_MIPS", "GAS_S390"};
+ 
+ 
+ /*
+Index: b/CONFIG/src/Makefile
+===================================================================
+--- a/CONFIG/src/Makefile
++++ b/CONFIG/src/Makefile
+@@ -177,6 +177,11 @@ IRun_GAS_x8632 :
+ 	$(MAKE) $(atlrun) atldir=$(mydir) exe=xprobe_gas_x8632 args="$(args)" \
+                 redir=config0.out
+ 	- cat config0.out
++IRun_GAS_S390 :
++	$(CC) $(CCFLAGS) -o xprobe_gas_s390 $(SRCdir)/backend/probe_this_asm.c $(SRCdir)/backend/probe_gas_s390.S
++	$(MAKE) $(atlrun) atldir=$(mydir) exe=xprobe_gas_s390 args="$(args)" \
++                redir=config0.out
++	- cat config0.out
+ 
+ IRunC2C :
+ 	- rm -f config0.out xc2c c2cslave.o
+Index: b/CONFIG/src/SpewMakeInc.c
+===================================================================
+--- a/CONFIG/src/SpewMakeInc.c
++++ b/CONFIG/src/SpewMakeInc.c
+@@ -342,6 +342,9 @@ char *GetPtrbitsFlag(enum OSTYPE OS, enu
+       return(sp);
+    if (MachIsMIPS(arch))
+       return((ptrbits == 64) ? "-mabi=64" : "-mabi=n32");
++   if (MachIsS390(arch))
++      return((ptrbits == 64) ? "-m64" : "-m31");
++
+    if (!CompIsGcc(comp))
+    {
+ /*
+@@ -671,6 +674,8 @@ main(int nargs, char **args)
+       if (OS == OSFreeBSD)
+          fprintf(fpout, "_fbsd");
+    }
++   if (MachIsS390(mach))
++      fprintf(fpout, ptrbits == 32 ? "-m31" : "-m64");
+    fprintf(fpout, "\n   F77SYSLIB = %s\n", f77lib ? f77lib : "");
+    fprintf(fpout, "   BC = $(ICC)\n");
+    fprintf(fpout, "   NCFLAGS = $(ICCFLAGS)\n");
+Index: b/CONFIG/src/atlcomp.txt
+===================================================================
+--- a/CONFIG/src/atlcomp.txt
++++ b/CONFIG/src/atlcomp.txt
+@@ -164,6 +164,56 @@ MACH=ALL OS=WinNT LVL=0 COMPS=f77
+ MACH=P4,PM OS=WinNT LVL=0 COMPS=icc,dmc,smc,dkc,skc,xcc
+    'icl' '-QxN -O3 -Qprec -fp:extended -fp:except -nologo -Oy'
+ #
++# IBM System z or zEnterprise
++#
++
++# z900 or z800
++MACH=IBMz900 OS=ALL LVL=1000 COMPS=f77
++   'gfortran' '-march=z900 -O3 -funroll-loops'
++MACH=IBMz900 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc,xcc
++   'gcc' '-march=z900 -O3 -funroll-loops'
++
++# z990 or z890
++MACH=IBMz990 OS=ALL LVL=1000 COMPS=f77
++   'gfortran' '-march=z990 -O3 -funroll-loops'
++MACH=IBMz990 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc,xcc
++   'gcc' '-march=z990 -O3 -funroll-loops'
++
++# z9-EC z9-BC or z9-109
++MACH=IBMz9 OS=ALL LVL=1000 COMPS=f77
++   'gfortran' '-march=z9-109 -O3 -funroll-loops'
++MACH=IBMz9 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc,xcc
++   'gcc' '-march=z9-109 -O3 -funroll-loops'
++
++# on z10 and z196 gcc emits prefetches which disturb cache size
++# detection and optimization. Therefore, we use fno-prefetch-loop-arrays
++# z10
++MACH=IBMz10 OS=ALL LVL=1000 COMPS=f77
++   'gfortran' '-march=z10 -O3 -funroll-loops -fno-prefetch-loop-arrays'
++MACH=IBMz10 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc,xcc
++   'gcc' '-march=z10 -O3 -funroll-loops -fno-prefetch-loop-arrays'
++
++# z196. we also try to fallback to z10 and z9 for older compilers
++MACH=IBMz196 OS=ALL LVL=1000 COMPS=f77
++   'gfortran' '-march=z196 -O3 -funroll-loops -fno-prefetch-loop-arrays'
++MACH=IBMz196 OS=ALL LVL=800 COMPS=f77
++   'gfortran' '-march=z10 -O3 -funroll-loops -fno-prefetch-loop-arrays'
++MACH=IBMz196 OS=ALL LVL=600 COMPS=f77
++   'gfortran' '-march=z9-109 -O3 -funroll-loops'
++MACH=IBMz196 OS=ALL LVL=1000 COMPS=smc,dmc,skc,dkc,icc,xcc
++   'gcc' '-march=z196 -O3 -funroll-loops -fno-prefetch-loop-arrays'
++MACH=IBMz196 OS=ALL LVL=800 COMPS=smc,dmc,skc,dkc,icc,xcc
++   'gcc' '-march=z10 -O3 -funroll-loops -fno-prefetch-loop-arrays'
++MACH=IBMz196 OS=ALL LVL=600 COMPS=smc,dmc,skc,dkc,icc,xcc
++   'gcc' '-march=z9-109 -O3 -funroll-loops'
++
++# ALL march options failed, go back to conservative defaults
++MACH=IBMz900,IBMz990,IBMz9,IBMz10,IBMz196 OS=ALL LVL=500 COMPS=f77
++   'gfortran' '-O3 -funroll-loops'
++MACH=IBMz900,IBMz990,IBMz9,IBMz10,IBMz196 OS=ALL LVL=500 COMPS=smc,dmc,skc,dkc,icc,xcc
++   'gcc' '-O3 -funroll-loops'
++
++#
+ # Generic defaults
+ #
+ MACH=ALL OS=ALL LVL=5 COMPS=icc,smc,dmc,skc,dkc,xcc
+Index: b/CONFIG/src/atlconf_misc.c
+===================================================================
+--- a/CONFIG/src/atlconf_misc.c
++++ b/CONFIG/src/atlconf_misc.c
+@@ -480,6 +480,7 @@ enum ARCHFAM ProbeArchFam(char *targ)
+       else if (strstr(res, "alpha")) fam = AFALPHA;
+       else if (strstr(res, "ia64")) fam = AFIA64;
+       else if (strstr(res, "mips")) fam = AFMIPS;
++      else if (strstr(res, "s390")) fam = AFS390;
+       else if ( strstr(res, "i686") || strstr(res, "i586") ||
+                 strstr(res, "i486") || strstr(res, "i386") ||
+                 strstr(res, "x86") || strstr(res, "x86_64") ) fam = AFX86;
+@@ -501,6 +502,7 @@ enum ARCHFAM ProbeArchFam(char *targ)
+                    strstr(res, "i486") || strstr(res, "i386") ||
+                    strstr(res, "x86_64") ) fam = AFX86;
+          else if (strstr(res, "mips")) fam = AFMIPS;
++         else if (strstr(res, "s390")) fam = AFS390;
+       }
+    }
+    return(fam);
+Index: b/CONFIG/src/backend/Make.ext
+===================================================================
+--- a/CONFIG/src/backend/Make.ext
++++ b/CONFIG/src/backend/Make.ext
+@@ -43,6 +43,8 @@ probe_gas_parisc.S : $(basf)
+ 	$(extC) -b $(basf) -o probe_gas_parisc.S rout=probe_gas_parisc.S
+ probe_gas_mips.S : $(basf)
+ 	$(extC) -b $(basf) -o probe_gas_mips.S rout=probe_gas_mips.S
++probe_gas_s390.S : $(basf)
++	$(extC) -b $(basf) -o probe_gas_s390.S rout=probe_gas_s390.S
+ probe_SSE3.S : $(basf)
+ 	$(extC) -b $(basf) -o probe_SSE3.S rout=probe_SSE3.S
+ probe_SSE2.S : $(basf)
+Index: b/CONFIG/src/backend/archinfo_linux.c
+===================================================================
+--- a/CONFIG/src/backend/archinfo_linux.c
++++ b/CONFIG/src/backend/archinfo_linux.c
+@@ -193,6 +193,18 @@ enum MACHTYPE ProbeArch()
+       }
+       #endif
+       break;
++   case AFS390:
++      if ( !CmndOneLine(NULL, "cat /proc/cpuinfo | fgrep \"processor \"", res) )
++      {
++         if (strstr(res, "2064") || strstr(res, "2066")) mach = IBMz900;
++         else if (strstr(res, "2084") || strstr(res, "2086")) mach = IBMz990;
++         else if (strstr(res, "2094") || strstr(res, "2096")) mach = IBMz9;
++         else if (strstr(res, "2097") || strstr(res, "2098")) mach = IBMz10;
++         /* we consider anything else to be a z196 or later */
++         else mach = IBMz196;
++      }
++      break;
++
+    default:
+ #if 0
+       if (!CmndOneLine(NULL, "fgrep 'cpu family' /proc/cpuinfo", res))
+Index: b/CONFIG/src/backend/probe_gas_s390.S
+===================================================================
+--- /dev/null
++++ b/CONFIG/src/backend/probe_gas_s390.S
+@@ -0,0 +1,13 @@
++#define ATL_GAS_PPC
++#include "atlas_asm.h"
++/*
++ * Linux S390 assembler for:
++ * int asm_probe(int i)
++ * RETURNS: i*3
++ */
++.globl ATL_asmdecor(asm_probe)
++ATL_asmdecor(asm_probe):
++	lr	r3,r2
++	ar	r2,r3
++	ar	r2,r3
++	br	r14
+Index: b/CONFIG/src/probe_comp.c
+===================================================================
+--- a/CONFIG/src/probe_comp.c
++++ b/CONFIG/src/probe_comp.c
+@@ -509,6 +509,8 @@ char *GetPtrbitsFlag(enum OSTYPE OS, enu
+       return(sp);
+    if (MachIsMIPS(arch))
+       return((ptrbits == 64) ? "-mabi=64" : "-mabi=n32");
++   if (MachIsS390(arch))
++      return((ptrbits == 64) ? "-m64" : "-m31");
+    if (!CompIsGcc(comp))
+    {
+ /*
+Index: b/include/atlas_prefetch.h
+===================================================================
+--- a/include/atlas_prefetch.h
++++ b/include/atlas_prefetch.h
+@@ -149,6 +149,12 @@
+    #define ATL_GOT_L1PREFETCH
+    #define ATL_L1LS 32
+    #define ATL_L2LS 64
++#elif defined(ATL_ARCH_IBMz196) || defined(ATL_ARCH_IBMz10)
++   #define ATL_pfl1R(mem) __builtin_prefetch(mem, 0, 3)
++   #define ATL_pfl1W(mem) __builtin_prefetch(mem, 1, 3)
++   #define ATL_GOT_L1PREFETCH
++   #define ATL_L1LS 256
++   #define ATL_L2LS 256
+ #elif defined(__GNUC__)  /* last ditch, use gcc predefined func */
+    #define ATL_pfl1R(mem) __builtin_prefetch(mem, 0, 3)
+    #define ATL_pfl1W(mem) __builtin_prefetch(mem, 1, 3)
diff --git a/atlas.spec b/atlas.spec
index caa2e47..d5921e4 100644
--- a/atlas.spec
+++ b/atlas.spec
@@ -1,8 +1,11 @@
 %define enable_native_atlas 0
 
 Name:           atlas
-Version:        3.8.3
-Release:        19%{?dist}
+Version:        3.8.4
+%if "%{?enable_native_atlas}" != "0"
+%define dist .native
+%endif
+Release:        1%{?dist}
 Summary:        Automatically Tuned Linear Algebra Software
 
 Group:          System Environment/Libraries
@@ -14,9 +17,13 @@ Source2:        K7323DNow.tgz
 Source3:        README.Fedora
 Source4:        USII64.tgz                                              
 Source5:        USII32.tgz                                              
+Source6:        IBMz1032.tgz
+Source7:        IBMz1064.tgz
+Source8:        IBMz19632.tgz
+Source9:        IBMz19664.tgz
 Patch0:		atlas-fedora_shared.patch
-Patch1:         atlas-sparc-linux.patch  
-Patch2:         atlas-s390-m31.patch
+Patch1:         atlas-s390port.patch
+Patch2:		atlas-fedora-arm.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  gcc-gfortran lapack-static
@@ -64,15 +71,15 @@ Group:          System Environment/Libraries
 %description sse2
 This package contains the ATLAS (Automatically Tuned Linear Algebra
 Software) libraries compiled with optimizations for the SSE2
-extensions to the x86_64 architecture. The base ATLAS builds in Fedora for the
-x86_64 architecture are made fro the SSE3 extensions.
+extensions to the x86_64 architecture. The base ATLAS builds for the x86_64
+architecture in this version of Fedora  are made for the SSE3 extensions.
 
 %package sse2-devel
 Summary:        Development libraries for ATLAS with SSE2 extensions
 Group:          Development/Libraries
 Requires:       %{name}-sse2 = %{version}-%{release}
 Obsoletes:	%name-header <= %version-%release
-Requires(posttans):	chkconfig
+Requires(posttrans):	chkconfig
 Requires(preun):	chkconfig
 
 %description sse2-devel
@@ -181,13 +188,21 @@ shared libraries compiled with optimizations for the SSE3 extensions to the ix86
 %prep
 %setup -q -n ATLAS
 %patch0 -p0 -b .shared
-#%patch1 -p1 -b .sparc
-%patch2 -p1 -b .s390
+%ifarch s390 s390x
+%patch1 -p1 -b .s390
+%endif
+%ifarch %{arm}
+%patch2 -p0 -b .arm
+%endif
 cp %{SOURCE1} CONFIG/ARCHS/
 cp %{SOURCE2} CONFIG/ARCHS/
 cp %{SOURCE3} doc
 cp %{SOURCE4} CONFIG/ARCHS/
 cp %{SOURCE5} CONFIG/ARCHS/
+cp %{SOURCE6} CONFIG/ARCHS/
+cp %{SOURCE7} CONFIG/ARCHS/
+cp %{SOURCE8} CONFIG/ARCHS/
+cp %{SOURCE9} CONFIG/ARCHS/
 
 %build
 for type in %{types}; do
@@ -199,13 +214,13 @@ for type in %{types}; do
 	fi
 	mkdir -p %{_arch}_${type}
 	pushd %{_arch}_${type}
-	../configure -b %{__isa_bits} -D c -DWALL -Fa alg '-g -Wa,--noexecstack -fPIC'\
+	../configure -b %{mode} %{?threads_option} %{?arch_option} -D c -DWALL -Fa alg '-g -Wa,--noexecstack -fPIC'\
 	--prefix=%{buildroot}%{_prefix}			\
 	--incdir=%{buildroot}%{_includedir}		\
 	--libdir=%{buildroot}%{_libdir}/${libname}	\
-	--with-netlib-lapack=%{_libdir}/liblapack_pic.a	\
-	-Si cputhrchk 0
+	--with-netlib-lapack=%{_libdir}/liblapack_pic.a
 
+%if "%{?enable_native_atlas}" == "0"
 %ifarch x86_64
 	if [ "$type" = "sse2" ]; then
 		sed -i 's#ARCH =.*#ARCH = HAMMER64SSE2#' Make.inc
@@ -240,6 +255,54 @@ for type in %{types}; do
 		%define pr_sse3 %(echo $((%{__isa_bits}+4)))
 	fi
 %endif
+
+%ifarch s390 s390x
+# we require a z9/z10/z196 but base,z10 and z196
+# we also need a compiler with -march=z196 support
+# the base support will use z196 tuning
+	if [ "$type" = "base" ]; then
+		%ifarch s390x 
+			sed -i 's#ARCH =.*#ARCH = IBMz19664#' Make.inc
+                %endif
+		%ifarch s390 
+			sed -i 's#ARCH =.*#ARCH = IBMz19632#' Make.inc
+                %endif
+		sed -i 's#-march=z196#-march=z9-109 -mtune=z196#' Make.inc
+		sed -i 's#-march=z10 -mtune=z196#-march=z9-109 -mtune=z196#' Make.inc
+		sed -i 's#-march=z10#-march=z9-109 -mtune=z10#' Make.inc
+		sed -i 's#-DATL_ARCH_IBMz196#-DATL_ARCH_IBMz9#' Make.inc
+		sed -i 's#-DATL_ARCH_IBMz10#-DATL_ARCH_IBMz9#' Make.inc
+		sed -i 's#-DATL_ARCH_IBMz9#-DATL_ARCH_IBMz9#' Make.inc
+	elif [ "$type" = "z10" ]; then
+		%ifarch s390x 
+			sed -i 's#ARCH =.*#ARCH = IBMz1064#' Make.inc
+                %endif
+		%ifarch s390 
+			sed -i 's#ARCH =.*#ARCH = IBMz1032#' Make.inc
+                %endif
+		sed -i 's#-march=z196#-march=z10#' Make.inc
+		sed -i 's#-march=z10 -mtune=z196#-march=z10#' Make.inc
+		sed -i 's#-march=z9-109#-march=z10#' Make.inc
+		sed -i 's#-DATL_ARCH_IBMz196#-DATL_ARCH_IBMz10#' Make.inc
+		sed -i 's#-DATL_ARCH_IBMz9#-DATL_ARCH_IBMz10#' Make.inc
+		%define pr_z10 %(echo $((%{__isa_bits}+1)))
+	elif [ "$type" = "z196" ]; then
+		%ifarch s390x 
+			sed -i 's#ARCH =.*#ARCH = IBMz19664#' Make.inc
+                %endif
+		%ifarch s390 
+			sed -i 's#ARCH =.*#ARCH = IBMz19632#' Make.inc
+                %endif
+		sed -i 's#-march=z196#-march=z10 -mtune=z196#' Make.inc
+		sed -i 's#-march=z10#-march=z10 -mtune=z196#' Make.inc
+		sed -i 's#-march=z9-109#-march=z10 -mtune=z196#' Make.inc
+		sed -i 's#-DATL_ARCH_IBMz10#-DATL_ARCH_IBMz196#' Make.inc
+		sed -i 's#-DATL_ARCH_IBMz9#-DATL_ARCH_IBMz196#' Make.inc
+		%define pr_z196 %(echo $((%{__isa_bits}+2)))
+	fi
+%endif
+
+%endif
 	make build
 	cd lib
 	make shared
@@ -374,6 +437,40 @@ if [ $1 -ge 0 ] ; then
 fi
 
 %endif
+
+%ifarch s390 s390x
+%post -n atlas-z10 -p /sbin/ldconfig
+
+%postun -n atlas-z10 -p /sbin/ldconfig
+
+%posttrans z10-devel
+if [ $1 -eq 0 ] ; then
+/usr/sbin/alternatives	--install %{_includedir}/atlas atlas-inc 	\
+		%{_includedir}/atlas-%{_arch}-z10  %{pr_z10}
+fi
+
+%preun z10-devel
+if [ $1 -ge 0 ] ; then
+/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-z10
+fi
+
+%post -n atlas-z196 -p /sbin/ldconfig
+
+%postun -n atlas-z196 -p /sbin/ldconfig
+
+%posttrans z196-devel
+if [ $1 -eq 0 ] ; then
+/usr/sbin/alternatives	--install %{_includedir}/atlas atlas-inc 	\
+		%{_includedir}/atlas-%{_arch}-z196  %{pr_z196}
+fi
+
+%preun z196-devel
+if [ $1 -ge 0 ] ; then
+/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-z196
+fi
+
+%endif
+
 %endif
 
 %files
@@ -475,9 +572,52 @@ fi
 %ghost %{_includedir}/atlas
 
 %endif
+
+%ifarch s390 s390x
+%files z10
+%defattr(-,root,root,-)
+%doc doc/README.Fedora
+%dir %{_libdir}/atlas-z10
+%{_libdir}/atlas-z10/*.so.*
+%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-z10.conf
+
+%files z10-devel
+%defattr(-,root,root,-)
+%doc doc
+%{_libdir}/atlas-z10/*.so
+%{_includedir}/atlas-%{_arch}-z10/
+%{_includedir}/*.h
+%ghost %{_includedir}/atlas
+
+%files z196
+%defattr(-,root,root,-)
+%doc doc/README.Fedora
+%dir %{_libdir}/atlas-z196
+%{_libdir}/atlas-z196/*.so.*
+%config(noreplace) /etc/ld.so.conf.d/atlas-%{_arch}-z196.conf
+
+%files z196-devel
+%defattr(-,root,root,-)
+%doc doc
+%{_libdir}/atlas-z196/*.so
+%{_includedir}/atlas-%{_arch}-z196/
+%{_includedir}/*.h
+%ghost %{_includedir}/atlas
+%endif
 %endif
 
 %changelog
+* Thu Sep 01 2011 Deji Akingunola <dakingun at gmail.com> - 3.8.4-1
+- Update to 3.8.4
+- Apply patch to enable arm build (Patch provided by Jitesh Shah <jiteshs at marvell.com>)
+- Stop turning off throttle checking, upstream frown at it (seems O.K. for Koji)
+- Use -march=z10 for z196 optimised build because the builder is a z10
+  (Christian Bornträger)
+- Build the default package for SSE2 and add a SSE3 subpackage on x86_64
+  (only on f16 and above)
+- Apply patch (and arch defs.) to build on s390 and s390x (Dan Horák)
+- Fix-up build on s390 and s390x (Christian Bornträger)
+
 * Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org>
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
diff --git a/sources b/sources
index 95752ad..e6a852c 100644
--- a/sources
+++ b/sources
@@ -1,5 +1,9 @@
-6c13be94a87178e7582111c08e9503bc  atlas3.8.3.tar.bz2
-676548252837b1e458181111443f340f  PPRO32.tgz
+1bb3abde499b492b4be1f1a0759fbfa2  atlas3.8.4.tar.bz2
+9ddf8c76e5e9781c542b712f704460e1  IBMz1032.tgz
+ee4cbc1f15cb4cd5f5266969a4bc62a7  IBMz1064.tgz
+edd3cb5602c6282e4a30691e728bd064  IBMz19632.tgz
+21f630520058859ad0b8b798bd17dc5a  IBMz19664.tgz
 3f174cdcb4c964843f27dbfc4ad4b1c8  K7323DNow.tgz
+676548252837b1e458181111443f340f  PPRO32.tgz
 ebb4732aff468bbc223e7f734252173b  USII32.tgz
 31f8ae7583d290e5414a1a61ff6e7e39  USII64.tgz


More information about the scm-commits mailing list