Homebrew breaks with gcc out-of-date after Lion OSX install ➤ brew doctor

/Developer/usr/bin/gcc
/Developer/usr/bin/gcc
Your gcc 4.2.x version is older than the recommended version. It may be advisable
to upgrade to the latest release of Xcode.

We couldn't detect gcc 4.0.x. Some formulae require this compiler.

$GREP_OPTIONS was set to "--color=auto".
Having $GREP_OPTIONS set can cause CMake builds to fail.


Xcode 4.1 is installed, gcc -v:


➤ gcc -v

Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~89/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)


Any idea how to fix this?
Until all the kinks get worked out, you'll want to track 10.7 and Xcode 4.x issues at https://github.com/mxcl/homebrew/issues

In this case, be sure you actively manage your $PATH variable to keep your preferred versions of redundant apps first in the expansion.

Always hard coding full paths is tedious, but lack of it causes these bumps when new binaries show up in your path unexpectedly.