gcc generic march for all the x64 platforms

2020-06-09 11:45发布

问题:

GCC have -march= and -mtune option as described here. But it is not obvious which of the options to choose for x64 platform as generic one. Say, -mtune= have the generic value, but -march= for x64 have no.

I suspect that -march=nocona (as frequently seen everywhere) or even -march=i686 -m64 is the solution, but I'm not sure.

回答1:

The generic x86-64 -march is -march=x86-64.

It is usually the default for GCC targeting x86-64, but that default can be changed at configure time by passing appropriate value to --with-arch.



标签: gcc 64-bit