The Pentium4 native options are probably OK, if you want a 32-bit build. If you are able to get auto-vectorization at -O3, -march=pentium4 -mtune=barcelona will favor performance on CoreI7 while still running on Pentium4. Adding -msse4should help certain applications (e.g. complex data types), but won't run on Pentium4. The -march=corei7 option of gcc 4.6 (replacing the pentium4 and barcelona options)is intended for the original Core I7 (still OK for I7-2). With gcc 4.5 on I7-2,you can use -mavx in place of -msse4and sometimes get an advantage. I expect 4.6 would get more out of -mavx.I've never tried -mavx for 32-bit compilation.