zlib compiles with a '-mcpu=k6' on all (non-k6) ix86-platforms. It would make more sense when writing ------------------ ZLIB_OPT_FLAGS=$RPM_OPT_FLAGS %ifarch i386 i486 i586 i686 ZLIB_OPT_FLAGS="$ZLIB_OPT_FLAGS -O2 -fschedule-insns -fschedule-insns2 -malign-loops=1 -malign-jumps=1 -fomit -frame-pointer" %endif ------------------ instead of the formerly ------------------ %ifarch i386 i486 i586 i686 ZLIB_OPT_FLAGS="-mcpu=k6 -O2 -fschedule-insns -fschedule-insns2 -malign-loops=1 -malign-jumps=1 -fomit -frame-pointer" %else ZLIB_OPT_FLAGS="$RPM_OPT_FLAGS" %endif ------------------ code in zlib.spec. Because $RPM_OPT_FLAGS contains architecture specific optimizations, an option corresponding to '-mcpu=k6' will be set by this variant also.
This (the k6 flag) was added when Ben went on an optimization spree for zlib... Ben, should the -march=k6 be there?
This is intentional. Specifying K6 optimizations seems to have the best overall performance for the Athlon/PIII/Pentium/K6 mix of CPUs (it makes a 30% difference on K6s but only a ~3% difference for other cpus). -march=k6 can't be specified as the resulting code wouldn't run on 386/486s.