This PDF tutorial will teach you how to optimized i686 binaries that should run on Athlon, Duron, Pentium IV, PIII PII, Pentium or Celeron based PC. The tutorial also teaches how to specifically optimize QT and KDE and includes some interesting links to some more Linux optimization sites.
This is the rpmc file that will not run very well, if you just copy from the tutorial. If you look were the “optflags:” (without the qoutes)section is, you will find that all the string commands are meant to be on the same line.
So the example bellow here will not work untill you edit the “optflags:” section as stated above.
#############################################################
#2001/12/23, modified by
#Frank Krunchio [New Zealand]
#Konstantin Malakhanov [Germany]
#Any per-system configuration should be added to /etc/rpmc
#while per-user configeration should be added to ~/.rpmc
#
#############################################################
#Values for the gcc/g++ compiler, Add these flags on 1 line !
#-mcpu=i686 is redundant
#add -malign-functions=4 -mpreferredpstack-boundary=2 for Athlon
#############################################################
optflags: i686 -03 -march=i686 -fomit-frame-pointer -funroll-loops -fforce-mem -fforce-addr -fexpensive-optimizations
#############################################################
#Canonical arch names and numbers
arch_canon: i686: i686 1
#############################################################
# Canonical OS names and numbers
os_canon: Linux: Linux 1
#############################################################
# For a given uname () .machine, the default build architecture
buildarchtranslate: i686: i686
#############################################################
# Architecture compatibility
arch_compat: i686: i686
buildarch_compat: i686: i686
#############################################################