Skip to content

Instantly share code, notes, and snippets.

@prathe
Created February 25, 2012 19:06
Show Gist options
  • Save prathe/1910116 to your computer and use it in GitHub Desktop.
Save prathe/1910116 to your computer and use it in GitHub Desktop.
Installing gcc from sources on OSX
# Grab and unpack the tarball
$ mkdir -p ~/src && cd ~/src
$ curl -O http://opensource.apple.com/tarballs/gcc/gcc-5666.3.tar.gz
$ tar zxf gcc-5666.3.tar.gz
$ cd gcc-5666.3
# Setup some stuff it requires
$ mkdir -p build/obj build/dst build/sym
# And then build it. You should go make a cup of tea or five whilst this runs.
$ sudo gnumake install RC_OS=macos RC_ARCHS='i386 x86_64' TARGETS='i386 x86_64' \
SRCROOT=`pwd` OBJROOT=`pwd`/build/obj DSTROOT=`pwd`/build/dst SYMROOT=`pwd`/build/sym
# And finally install it
$ sudo ditto build/dst /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment