When you choose the architecture, it means the compilation will generate code for some processor family, and you'll have trouble if you change to a different one. If you change to a compatible processor, it should work fine.
If, for example, you compile for an intel core i3, switching to a core i5 will work fine, but might not if you switch to an amd a10, depending on what you targeted.
There are different levels of generality. If you compile for older architectures, it's more likely to get a binary that can run on different processors, at the expense of losing some optimizations.
Wilf is compiling to i586, which is a pentium 32 instruction set. Any modern processor will run that, but it won't make many optimizations. i586 code will run both on an intel core i 5 and an amd a10, and also a celeron, a pentium III, and many others (32 and 64 bits). If you have a 64 bit processor, compile to a 64 bit family, or you won't be really optimizing much.
If you're changing your processor only, not the whole motherboard, to a newer one, you should be fairly safe, as most differences should be between processors using different sockets, AND you're likely changing to a newer version of roughly the same technology.