What is the difference between -O2 and -O6 optimizations ?
Ans: Nothing at present. If you look at the source code for GCC (eww! yuck!) with an i386/i486 host/target, you will see that -Ox for x>=2 does the same thing. In fact it is a bad thing to use x>2 in your Makefiles, because if GCC implements -O3 on Intel targets in the future, it may be an optimization that breaks your code.