What does -march=native boil down to?

Viewed 799

Currently we compile and run code on same hardware, so -march=native flag is used.

We are going to keep running on this hardware but compile on different architecture. So I need to replace native with whatever it is equivalent to on current hardware.

Is there a way to get gcc to report what native is equivalent to on particular hardware?

1 Answers

Yes, you can run the command

gcc -march=native -Q --help=target

to see the flags applied, including the resolved -march flag.

Related