title: How to build openmpi with homebrew and gcc-4.9?
body: <p>By default <code>brew install openmpi</code> uses <code>clang</code> to create its wrapper.</p>
  
  <p>I need to specify <code>gcc-4.9</code>(Homebrew installed) for the wrapper.</p>
  
  <p>I have tried</p>
  
  <pre><code>$export CC=gcc-4.9
  $brew install openmpi
  
  $brew install --cc=gcc-4.9 openmpi
  
  $brew install --with-gcc49 openmpi
  
  $brew install -CC=gcc-4.9 -CXX=g++-4.9 -FC=gfortran -F77=gfortran openmpi
  
  $brew install openmpi --cc=gcc-4.9 
  
  $brew install openmpi --CC=gcc-4.9 --CXX=g++-4.9 --FC=gfortran --F77=gfortran
  </code></pre>
  
  <p>Finally, I've modified the <code>openmpi</code> formula adding: </p>
  
  <pre><code> args = %W[
    CC=gcc-4.9 
    CXX=g++-4.9 
    FC=gfortran 
    F77=gfortran
  </code></pre>
  
  <p>I still get </p>
  
  <pre><code>$mpicc --showme
  clang -I/usr/local/Cellar/open-mpi/1.8.4/include -L/usr/local/opt/libevent/lib -L/usr/local/Cellar/open-mpi/1.8.4/lib -lmpi
  </code></pre>