Obtaining current GCC architecture

前端 未结 5 2014
长情又很酷
长情又很酷 2020-12-14 05:57

How can I find out what the -march default argument is for the current architecture if I don\'t supply any?

5条回答
  •  佛祖请我去吃肉
    2020-12-14 06:41

    You can use gcc -Q --help= to list the current option values of the given . Thus:

    $ gcc -Q --help=target | grep march
      -march=                           x86-64
    $ gcc -m32 -Q --help=target | grep march
      -march=                           i686
    $ i686-w64-mingw32-gcc -Q --help=target | grep march
      -march=                           pentiumpro
    

    Edit: Actually, this option is not as generally useful as it appears, because target-specific defaults are not reflected in the output.

提交回复
热议问题