This page describes how to alter RedHat's rpm configuration so that rpm produces CPU-optimized binaries. You will also need a modified rpm package and, if you use the Intel compiler, the intel-extras package.
Once this modified redhat-rpm-config has been installed, you can invoke rpmbuild as follows to build CPU-optimized RPMs with it: rpmbuild -bb --target prescott-redhat-linux some.spec, where prescott can be replaced with pentium4, pentiumm, nocona, or core2. To build with icc/icpc instead of gcc/g++, use the intel-extras package.
Start with the upstream redhat-rpm-config source RPM.
Add the following patch file.
Finally, apply redhat-rpm-config.spec.patch to the spec file and build.