Skip to content

Instantly share code, notes, and snippets.

@bnferguson
Created May 3, 2013 17:48
Show Gist options
  • Save bnferguson/5511919 to your computer and use it in GitHub Desktop.
Save bnferguson/5511919 to your computer and use it in GitHub Desktop.
Getting at the CFLAGS of your installed ruby. You want to make sure some optimization flags are set. -O2 is the recommended one on GCC 4.x according to http://www.gentoo.org/doc/en/gcc-optimization.xml
# What you might see (note the complete lack of response - esp look for the lack of an optimization flag, eg -O2)
$ ruby -r rbconfig -e 'puts RbConfig::CONFIG["CFLAGS"]'
# What you should see (note the -O2 optimization):
$ ruby -r rbconfig -e 'puts RbConfig::CONFIG["CFLAGS"]'
-fno-strict-aliasing -g -O2 -fPIC'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment