SPECS: john.spec - use non-mmx exec fallback on i[56]86 build x8...
qboosh
qboosh at pld-linux.org
Sat Feb 18 14:55:21 CET 2006
Author: qboosh Date: Sat Feb 18 13:55:21 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use non-mmx exec fallback on i[56]86
build x86-any on i[34]86, x86-mmx on athlon/pentium[234], both on i[56]86
---- Files affected:
SPECS:
john.spec (1.45 -> 1.46)
---- Diffs:
================================================================
Index: SPECS/john.spec
diff -u SPECS/john.spec:1.45 SPECS/john.spec:1.46
--- SPECS/john.spec:1.45 Sat Feb 18 14:33:53 2006
+++ SPECS/john.spec Sat Feb 18 14:55:15 2006
@@ -1,12 +1,16 @@
# $Revision$, $Date$
#
-# Conditional build:
-%bcond_with mmx # MMX optimization
-# Optimization must be chosen at compile time :(
-# Maybe some patch...? But not yet.
-#
-%ifarch athlon
-%define with_mmx 1
+%ifarch i586 i686 athlon pentium2 pentium3 pentium4
+%define do_mmx 1
+%else
+%define do_mmx 0
+%endif
+%ifarch i586 i686
+%define do_mmxfb 1
+%define optmmxfb -DCPU_FALLBACK=1
+%else
+%define do_mmxfb 0
+%undefine optmmxfb
%endif
Summary: Password cracker
Summary(pl): Łamacz haseł
@@ -46,10 +50,16 @@
%build
cd src
-# bleh... MMX code must be chosen at compile time :(
-# cannot use MMX for generic i586 nor i686 (Pentium/Pentium Pro have no MMX)
+%if %{do_mmxfb}
+%{__make} linux-x86-any \
+ CFLAGS="-c -Wall -fomit-frame-pointer %{rpmcflags} -DJOHN_SYSTEMWIDE=1" \
+ CC="%{__cc}"
+mv ../run/john ../run/john-non-mmx
+%{__make} clean
+%endif
+
%ifarch %{ix86}
- %if %{with mmx}
+ %if %{do_mmx}
TARG=linux-x86-mmx
%else
TARG=linux-x86-any
@@ -71,7 +81,7 @@
%endif
%{__make} $TARG \
- CFLAGS="-c -Wall -fomit-frame-pointer %{rpmcflags} -DJOHN_SYSTEMWIDE=1" \
+ CFLAGS="-c -Wall -fomit-frame-pointer %{rpmcflags} -DJOHN_SYSTEMWIDE=1 -DJOHN_SYSTEMWIDE_EXEC=\\\"%{_libdir}/john\\\" %{?optmmxfb}" \
CC="%{__cc}"
%install
@@ -80,6 +90,10 @@
install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/john}
install run/{*.conf,*.chr,*.lst} $RPM_BUILD_ROOT%{_datadir}/john
install run/john $RPM_BUILD_ROOT%{_bindir}
+%if %{do_mmxfb}
+install -d $RPM_BUILD_ROOT%{_libdir}/john
+install run/john-non-mmx $RPM_BUILD_ROOT%{_libdir}/john
+%endif
rm -f doc/INSTALL
@@ -95,6 +109,10 @@
%defattr(644,root,root,755)
%doc doc/* run/mailer
%attr(755,root,root) %{_bindir}/*
+%if %{do_mmxfb}
+%dir %{_libdir}/john
+%attr(755,root,root) %{_libdir}/john/john-non-mmx
+%endif
%{_datadir}/john
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -103,6 +121,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.46 2006/02/18 13:55:15 qboosh
+- use non-mmx exec fallback on i[56]86
+ build x86-any on i[34]86, x86-mmx on athlon/pentium[234], both on i[56]86
+
Revision 1.45 2006/02/18 13:33:53 qboosh
- dropped obsolete K6 comment, updated sparc* targets
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/john.spec?r1=1.45&r2=1.46&f=u
More information about the pld-cvs-commit
mailing list