Skip to content

Instantly share code, notes, and snippets.

@terlar
Last active October 12, 2015 14:57
Show Gist options
  • Save terlar/4043969 to your computer and use it in GitHub Desktop.
Save terlar/4043969 to your computer and use it in GitHub Desktop.
Build ruby
mkdir $HOME/.local/lib/ry/rubies/1.9.3-p327-perf
cd /tmp
curl -O http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar -xf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix="$HOME/.local/lib/ry/rubies/1.9.3-p327-perf"
make
make install
cd ..
curl -O http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz
tar -xf ruby-1.9.3-p327.tar.gz
cd ruby-1.9.3-p327
curl https://raw.github.com/gist/4136373/falcon-gc.diff | patch -p1
autoconf
# optional
# setenv CFLAGS "-march=native -O3 -pipe -fomit-frame-pointer"
# or
# setenv CFLAGS "-march=core2 -O3 -pipe -fomit-frame-pointer"
setenv CPPFLAGS -I"$HOME/.local/lib/ry/rubies/1.9.3-p327-perf/include"
setenv LDFLAGS -L"$HOME/.local/lib/ry/rubies/1.9.3-p327-perf/lib"
./configure --prefix="$HOME/.local/lib/ry/rubies/1.9.3-p327-perf"
make -j 8
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment