Merged r147174:
Use xcrun to find clang, instead of hardcoded /Developer/usr/bin path.

llvm-svn: 147201
diff --git a/llvm-gcc-4.2/build_gcc b/llvm-gcc-4.2/build_gcc
index 82c8fef..ac5611c 100755
--- a/llvm-gcc-4.2/build_gcc
+++ b/llvm-gcc-4.2/build_gcc
@@ -267,13 +267,11 @@
 # If the user has set CC or CXX, respect their wishes.  If not,
 # compile with clang/clang++ if available; if LLVM is not
 # available, fall back to usual GCC/G++ default.
-savedPATH=$PATH ; PATH="/Developer/usr/bin:$PATH"
-XTMPCC=$(which clang)
+XTMPCC=`xcrun -find clang`
 if [ x$CC  = x -a x$XTMPCC != x ] ; then export CC=$XTMPCC  forcedCC=1  ; fi
-XTMPCC=$(which clang++)
+XTMPCC=`xcrun -find clang++`
 if [ x$CXX = x -a x$XTMPCC != x ] ; then export CXX=$XTMPCC forcedCXX=1 ; fi
-PATH=$savedPATH
-unset XTMPCC savedPATH
+unset XTMPCC
 
 # Build the native GCC.  Do this even if the user didn't ask for it
 # because it'll be needed for the bootstrap.