Skip to content

Instantly share code, notes, and snippets.

@jepio
Last active August 29, 2015 14:02
Show Gist options
  • Save jepio/5dea3d4c69d7a72299b4 to your computer and use it in GitHub Desktop.
Save jepio/5dea3d4c69d7a72299b4 to your computer and use it in GitHub Desktop.
Check what flags are enabled by march=native.
gcc -### -march=native -x c++ -
# or
gcc -march=native -E -v - </dev/null 2>&1 | grep cc1
# or better yet
gcc -march=native -Q --help=target
@jepio
Copy link
Author

jepio commented Jun 23, 2014

What you're looking for is the line that starts with

COLLECT_GCC_OPTIONS='-march=native'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.7.3/cc1plus -quiet -D_GNU_SOURCE - "-march=core2" (...)

The important stuff is the march flag, and things in (...) that don't begin with mno.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment