the difference between -mtune and -march

Ian Lance Taylor iant@google.com
Wed Feb 9 05:51:00 GMT 2011


kevin diggs <diggskevin38@gmail.com> writes:

> In a similar vein, what is the deal with -march and -mcpu? x86 uses
> -march and powerpc uses -mcpu???

All -m options are target dependent.

Yes, it would probably be better if all targets used -march, -mtune, and
-mcpu consistently.  However, the details are complex.  For the PowerPC,
the actual instruction mnemonics change based on the CPU.  It's not
clear that it's useful to provide -march which only changes the
architecture.

Ian



More information about the Gcc-help mailing list