gcc -march选项的默认值是什么?

Beh*_*Cat 13 gcc gcc4 gcc4.7

gcc信息文件在x86-64特定标志的部分中说明,其中包括:

      There is no `-march=generic' option because `-march'
      indicates the instruction set the compiler can use, and there
      is no generic instruction set applicable to all processors.
      In contrast, `-mtune' indicates the processor (or, in this
      case, collection of processors) for which the code is
      optimized.
Run Code Online (Sandbox Code Playgroud)

我的问题是,当没有给出-march选项时,gcc编译的指令(子)集是什么?在webosphere中有很多关于-march和-mtune的相关信息,但我找不到哪个能回答这个简单的问题.它不能是march = native,否则就不可能编译通用分发内核和二进制包.

nos*_*nos 17

编译gcc本身时,可以设置gcc的默认标志.跑:

  gcc -Q --help=target 
Run Code Online (Sandbox Code Playgroud)

查看计算机上的默认设置.可能它只是x86-64, 即使手册页没有记录为-march-的值

  • 据我所知,文档说在 386 和 x86-64 CPU 的上下文中,这是真的,它们之间没有通用的指令集。但是对于 x86-64 CPU,有。 (3认同)
  • ...这是文件所说的东西不存在:-P (2认同)
  • 对于任何关心的人,x86-64 选项已添加到文档中 https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html (2认同)