From ac901d9e45321d0f3d764d3eb9f93a0a6700c923 Mon Sep 17 00:00:00 2001 From: Jitesh Shah Date: Tue, 13 Oct 2009 11:54:14 +0200 Subject: [PATCH] Include support for ARM Signed-off-by: Jitesh Shah --- atlas-arm.patch | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ atlas.spec | 12 ++++++++++-- 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 atlas-arm.patch diff --git a/atlas-arm.patch b/atlas-arm.patch new file mode 100644 index 0000000..5e090ab --- /dev/null +++ b/atlas-arm.patch @@ -0,0 +1,51 @@ +Only in ATLAS: arm_base +diff -dur ATLAS.backup/CONFIG/include/atlconf.h ATLAS/CONFIG/include/atlconf.h +--- ATLAS.backup/CONFIG/include/atlconf.h 2009-02-18 19:47:37.000000000 +0100 ++++ ATLAS/CONFIG/include/atlconf.h 2009-10-13 11:40:08.198080808 +0200 +@@ -16,13 +16,13 @@ + + enum ARCHFAM {AFOther=0, AFPPC, AFSPARC, AFALPHA, AFX86, AFIA64, AFMIPS}; + +-#define NMACH 33 ++#define NMACH 34 + static char *machnam[NMACH] = + {"UNKNOWN", "POWER3", "POWER4", "POWER5", "PPCG4", "PPCG5", + "P5", "P5MMX", "PPRO", "PII", "PIII", "PM", "CoreSolo", + "CoreDuo", "Core2Solo", "Core2", "Corei7", "P4", "P4E", "Efficeon", "K7", + "HAMMER", "AMD64K10h", "UNKNOWNx86", "IA64Itan", "IA64Itan2", +- "USI", "USII", "USIII", "USIV", "UnknownUS", "MIPSR1xK", "MIPSICE9"}; ++ "USI", "USII", "USIII", "USIV", "UnknownUS", "MIPSR1xK", "MIPSICE9", "ARM"}; + enum MACHTYPE {MACHOther, IbmPwr3, IbmPwr4, IbmPwr5, PPCG4, PPCG5, + IntP5, IntP5MMX, IntPPRO, IntPII, IntPIII, IntPM, IntCoreS, + IntCoreDuo, IntCore2Solo, IntCore2, IntCorei7, IntP4, IntP4E, +@@ -30,7 +30,8 @@ + AmdAthlon, AmdHammer, Amd64K10h, x86X, IA64Itan, IA64Itan2, + SunUSI, SunUSII, SunUSIII, SunUSIV, 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 ) +@@ -42,6 +43,8 @@ + ( (mach_) >= MIPSR1xK && (mach_) <= MIPSICE9 ) + #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] = +diff -dur ATLAS.backup/CONFIG/src/probe_comp.c ATLAS/CONFIG/src/probe_comp.c +--- ATLAS.backup/CONFIG/src/probe_comp.c 2009-02-18 19:47:37.000000000 +0100 ++++ ATLAS/CONFIG/src/probe_comp.c 2009-10-13 11:33:27.178082471 +0200 +@@ -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.spec b/atlas.spec index 88c20d6..d75a0ff 100644 --- a/atlas.spec +++ b/atlas.spec @@ -1,8 +1,11 @@ %define enable_native_atlas 0 +%ifarch %{arm} +%define arch_option -A 33 +%endif Name: atlas Version: 3.8.3 -Release: 10%{?dist} +Release: 10%{?dist}.fa1 Summary: Automatically Tuned Linear Algebra Software Group: System Environment/Libraries @@ -13,6 +16,7 @@ Source1: PPRO32.tgz Source2: K7323DNow.tgz Source3: README.Fedora Patch0: atlas-fedora_shared.patch +Patch100: atlas-arm.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc-gfortran lapack-devel @@ -146,6 +150,7 @@ optimizations for the sse3 extensions to the ix86 architecture. %prep %setup -q -n ATLAS %patch0 -p0 -b .shared +%patch100 -p1 -b .arm cp %{SOURCE1} CONFIG/ARCHS/ cp %{SOURCE2} CONFIG/ARCHS/ cp %{SOURCE3} doc @@ -159,7 +164,7 @@ for type in %{types}; do fi mkdir -p %{_arch}_${type} pushd %{_arch}_${type} - ../configure -b %{mode} -D c -DWALL -Fa alg '-g -Wa,--noexecstack -fPIC'\ + ../configure -b %{mode} %{?arch_option} -D c -DWALL -Fa alg '-g -Wa,--noexecstack -fPIC'\ --prefix=%{buildroot}%{_prefix} \ --incdir=%{buildroot}%{_includedir} \ --libdir=%{buildroot}%{_libdir}/${libname} \ @@ -322,6 +327,9 @@ rm -rf %{buildroot} %endif %changelog +* Tue Oct 13 2009 Jitesh shah - 3.8.3-10.fa1 +- ARM gcc doesn't take -m32 option. So, add a special condition for ARM + * Sat Sep 26 2009 Deji Akingunola - 3.8.3-10 - Use the new arch. default for Pentium PRO (Fedora bug #510498) - (Re-)Introduce 3dNow subpackage -- 1.5.5.6