The -march option defines a list of instructions that can be used, the -mtune parameter subsequently changes the optimization process.
Typically, you should use -march to specify minimum requirements and -mtune to optimize what most users have.
For example, the IA32 architecture defines various instructions for processing strings and repeating instructions. At 386 and 486, they are faster and smaller than the explicit assembler code, since the steps of extracting and decoding instructions can be skipped, and on newer models these instructions clog the instruction pipeline, since each processing step immediately depends on the previous one, therefore the functionality of parallel execution of the CPU is wasted.
Linux distributions typically use -march=i486 -mtune=i686 to make sure you can still install and run on 486, but since most users have modern processors, the focus is on ensuring optimal performance for them.
source share