I'm compiling my C++ app using GCC 4.3. Instead of manually selecting the optimization flags I'm using -march=native
, which in theory should add all optimization flags applicable to the hardware I'm compiling on. But how can I check which flags is it actually using?
You can use the -Q --help=target
options:
gcc -march=native -Q --help=target ...
The -v
option may also be of use.
You can see the documentation on the --help
option here.