gcc 4.3.3 compiler options enabled by default

后端 未结 4 1361
旧巷少年郎
旧巷少年郎 2020-12-13 20:19

I have moved from gcc version 4.0.3 to 4.3.3 and realized that -mfpmath was set to sse by default in gcc 4.3.3. This actually caused errors in my application. In 4.0.3 the

相关标签:
4条回答
  • 2020-12-13 21:11

    gcc -Q -v (inputfile)

    With just a basic tiny c or cpp file as an input file. Should give you a big list of all the options passed to gcc by default, one of those might be causing sse fp math to be enabled.

    0 讨论(0)
  • 2020-12-13 21:14

    In addition to compiling a specific file -Q -v, which outputs the list of passed and enabled options, as well as a lots of other version, configuration, and timing information, you can also use gcc -Q --help=target to just list default target-specific compiler options:

    $ gcc --version | head -1
    gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
    $ gcc -Q --help=target
    The following options are target specific:
      -m128bit-long-double                  [disabled]
      -m32                                  [disabled]
      -m3dnow                               [disabled]
      -m3dnowa                              [disabled]
      -m64                                  [enabled]
      -m80387                               [enabled]
      -m8bit-idiv                           [disabled]
      -m96bit-long-double                   [enabled]
      -mabi=
      -mabm                                 [disabled]
      -maccumulate-outgoing-args            [disabled]
      -maes                                 [disabled]
      -malign-double                        [disabled]
      -malign-functions=
      -malign-jumps=
      -malign-loops=
      -malign-stringops                     [enabled]
      -mandroid                             [disabled]
      -march=                               x86-64
    ...
    

    To also include a list of target-specific assembler and linker options (but not currently their default settings), use --target-help instead of --help=target.

    0 讨论(0)
  • 2020-12-13 21:15

    In addition to -Q --help=target for target-specific options, you can use -Q -O<n> --help=optimize to display which optimizer passes are on or off at a given optimization level. -Q also appears to work by itself with other --help=<blah> arguments as well.

    0 讨论(0)
  • 2020-12-13 21:22
    1. The version I've here of gcc 4.3.3 hasn't the behavior you are complaining about. I compiled it myself so I'm pretty sure that there must be another reason for the change you are seeing than just the gcc version (like compiling for 64 bit which has always used sse AFAIR).

    2. gcc has release notes which notifies of behavior changes. They are packaged with gcc source distribution and are available on the web. For gcc 4.3 see http://gcc.gnu.org/gcc-4.3/changes.html.

    0 讨论(0)
提交回复
热议问题