I\'ve installed gcc-4.6 using the homebrew-alternatives gcc formula, but I can\'t seem to get it to use that GCC to install other formulas. Specifi
gcc-4.6
homebrew-alternatives gcc
It looks like the latest versions of Homebrew now support the HOMEBREW_CC and HOMEBREW_CXX environment variables.
HOMEBREW_CC
HOMEBREW_CXX
So now you can do the following:
$ HOMEBREW_CC=gcc-4.2 HOMEBREW_CXX=g++-4.2 brew install ice