Bug 700175 - Port Bug 697881 "XCode 4.2 no longer provides a gcc-4.2" to c-c. r=Callek, a=Standard8
authorNomis101 <Nomis101@web.de>
Tue, 20 Dec 2011 16:40:01 +0530
changeset 9016 c12dd46941ce5a8df2a9792750b457adc17b17b1
parent 9015 587bf3f19e32568a1e8451fbf6fc0d169d2f2685
child 9017 5cca813898ccab9547f30c693a46e85e31e38b11
push id6912
push usersid.bugzilla@gmail.com
push dateTue, 20 Dec 2011 11:16:20 +0000
treeherdercomm-central@d33123c68cf2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek, Standard8
bugs700175, 697881
Bug 700175 - Port Bug 697881 "XCode 4.2 no longer provides a gcc-4.2" to c-c. r=Callek, a=Standard8
configure.in
--- a/configure.in
+++ b/configure.in
@@ -184,17 +184,17 @@ then
 	***
 	EOF
     exit 1
     break
   fi
 fi
 MOZ_BUILD_ROOT=`pwd`
 
-dnl Default to MSVC for win32 and gcc-4.2 for darwin
+dnl Default to MSVC for win32 and gcc for darwin
 dnl ==============================================================
 if test -z "$CROSS_COMPILE"; then
 case "$target" in
 *-cygwin*|*-mingw*|*-msvc*|*-mks*)
     if test -z "$CC"; then CC=cl; fi
     if test -z "$CXX"; then CXX=cl; fi
     if test -z "$CPP"; then CPP="cl -E -nologo"; fi
     if test -z "$CXXCPP"; then CXXCPP="cl -TP -E -nologo"; ac_cv_prog_CXXCPP="$CXXCPP"; fi
@@ -207,18 +207,20 @@ case "$target" in
         x86_64)
             AS=ml64;
             ;;
         esac
     fi
     if test -z "$MIDL"; then MIDL=midl; fi
     ;;
 *-darwin*)
-    if test -z "$CC"; then CC=gcc-4.2; fi
-    if test -z "$CXX"; then CXX=g++-4.2; fi
+    # we prefer gcc-4.2 over gcc on older darwin, so
+    # use that specific version if it's available.
+    MOZ_PATH_PROGS(CC, $CC gcc-4.2 gcc)
+    MOZ_PATH_PROGS(CXX, $CXX g++-4.2 g++)
     ;;
 esac
 fi
 
 COMPILE_ENVIRONMENT=1
 MOZ_ARG_DISABLE_BOOL(compile-environment,
 [  --disable-compile-environment
                            Disable compiler/library checks.],