Using profile-guided optimization (PGO)
gcc -O3 -march=native -pg -fprofile-generate ...
# Run a benchmark or program's typical load
gcc -O3 -march=native -fprofile-use ...
Check compiler preprocessor defines
# E.g. check for the version of OpenMP supported
echo | cpp -fopenmp -dM | grep -i open
#define _OPENMP 200805