The native Linux/GNU toolchain GCC got an option where you map architecture flag to native (-march=native). It allows compiler to generate optimized code supported by the underlying targeted machine.
To determine which other options are enabled on passing -march=native, use following command:
gcc -Q --help=target -march=native
Following command can be useful too to see help
gcc --help=target -march=native