RPM optimizations

RPM optimizations

Yes, you can compile the RPM packages optimized for pentium and pentium pro (or some other CPUs) by using some defines in your rpmrc file. You can either modify your system's /etc/rpmrc file or the .rpmrc file in your home directory. There you can specify option lines like these:

% optflags: i386 -O2 -m486 -DNDEBUG
% optflags: i586 -O2 -march=pentium -DNDEBUG -fomit-frame-pointer
% optflags: i686 -O2 -march=pentiumpro -DNDEBUG -fomit-frame-pointer
(I found those nice tricks at http://www.keywarrior.net/duesti/rpmopt.en.html. Thanks to Matthias Düsterhöft!).

This means that on an i586 architecture the rpm package will be compiled using "-march=pentium" as compiler option and so on, you might extend or adapt these to your own needs. The settings apply to all of the sections before in all places where "rpm -ta" is used or wher a binary RPM is to be created out of a source rpm using "rpm --rebuild".

Note

The options specified here are set into the environment variable RPM_OPT_FLAGS during compilation, so if you don't have an rpm based environment and have to compile like described in the chapter Manual compilation, you can set this variable manually and get the same effect. For example:

% export RPM_OPT_FLAGS="-O2 -march=pentium -fomit-frame-pointer"

KDE Logo