The rpms' are usually compiled down to i586 generally anyway, as i remember it. I think some distros will do "-mcpu=i686 -march=i586", deb likes to set it all at "i386" ... If you pipe the compiler output to a file "make 2>&1 |tee make-out" the clis' used should reveal whats going on there. The hint can be seen in the rpm name as well. In that, the file should have its' compile level expressed as part of its' name.
The main thing though is that a cpu is designed to be backward compatable. So, an i686 should run anthing up to and including i686. Which gives you the whole rang. An i585 processor, like a standard pentium, will likely have problems with a program compiled for an i686, but will do i386 to i586.
The "-march=" switch is the sensitive one, if the "-mcpu=" switch isn't given, it will imply it. It will determine the type of cpu level native code to assemple for. So an earlier processor will likely not have the instuctions that the program will want to use, if the compile is above the earlier processors level.
The "-cpu=" swich sets the scheduling level to use. If the processor dosen't have those scheduling levels/coded facilities, then they just wont be used. But it wont interfer with the programming being run. But if they are available, then they can be taken advantage.
If i'm remembering correctly, i think thats why some distros will compile their rpms for a i586 "-march=", but will schedule for an i686 "-mcpu=". That used to confuse me a bit, i would have thought the "-mcpu=" switch was referening to the assembled instuction set, but i was wrong, it is the "-march=" one.
There are other switches that may be used that will imply both. Such as "-mpentium" or is i, "-pentium=" for an i586, "-mathlon", -"athlonk7" etc.
The man and info pages have a lot of stuff on this, but, if you can navigate through those files with getting really irratated, you will be doing well
So, I understand that the program will be compatible with i686 CPUs. To make sure that is compatible with i586 I should use:
# export CFLAGS="-O2 -march=i586"
# export CXXFLAGS="-O2 -march=i586"
That will set the assemble micro-code to be of that used by a standard "pentium", it will run on a i586, i686, or any of the athlons. It wont be suitable for anything below an i586, such as i486 or i386. It will also imply the "-mcpu=" scheduling level used should also be for the i586.