"-march=native" possibly being misled on Debian i386?

Toby Douglass toby.douglass@minodes.com
Sun Jun 11 14:43:00 GMT 2017


And in fact;

minnow@minnow:~$ gcc -mtune=native -dM -E - < /dev/null | grep 86
#define __i586 1
#define __DBL_MAX__ ((double)1.79769313486231570815e+308L)
#define __i386 1
#define __i586__ 1
#define __i386__ 1
#define i386 1

The docs say;

"While picking a specific cpu-type will schedule things appropriately
for that particular chip, the compiler will not generate any code that
does not run on the i386 without the -march=cpu-type option being
used."

But in fact if I understand the output of the command Ruoyao provided,
tune *is* setting arch (whilst not setting tune =-) so this compiler
in this specific case ends up setting arch correctly.



More information about the Gcc-help mailing list