Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Homebrew with alternate GCC

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. Specifically Open-MPI and boost.

Does anyone know how to make Homebrew use this new compiler?

Thanks!

like image 371
Andrew Spott Avatar asked Feb 08 '12 00:02

Andrew Spott


1 Answers

It looks like the latest versions of Homebrew now support the HOMEBREW_CC and HOMEBREW_CXX environment variables.

So now you can do the following:

$ HOMEBREW_CC=gcc-4.2 HOMEBREW_CXX=g++-4.2 brew install ice
like image 171
rcv Avatar answered Oct 07 '22 07:10

rcv