Commit eb01af6b authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.

On OS X, use gcc-4.2 with Xcode 4 and up

parent 47481e80
......@@ -403,25 +403,6 @@ then
fi
fi
dnl ** Which gcc to use?
dnl --------------------------------------------------------------
FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
export CC
WhatGccIsCalled="$CC"
AC_SUBST(WhatGccIsCalled)
dnl ** Which ld to use?
dnl --------------------------------------------------------------
FP_ARG_WITH_PATH_GNU_PROG([LD], [ld])
LdCmd="$LD"
AC_SUBST([LdCmd])
dnl ** Which nm to use?
dnl --------------------------------------------------------------
FP_ARG_WITH_PATH_GNU_PROG([NM], [nm])
NmCmd="$NM"
AC_SUBST([NmCmd])
SplitObjsBroken=NO
if test "$TargetOS_CPP" = "darwin"
then
......@@ -457,6 +438,33 @@ changequote([, ])dnl
fi
AC_SUBST([SplitObjsBroken])
dnl ** Which gcc to use?
dnl --------------------------------------------------------------
if test "$TargetOS_CPP" = "darwin" &&
test "$XCodeVersion1" -ge 4
then
# From Xcode 4, use 'gcc-4.2' to force the use of the gcc legacy backend (instead of the LLVM
# backend)
FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc-4.2])
else
FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
fi
export CC
WhatGccIsCalled="$CC"
AC_SUBST(WhatGccIsCalled)
dnl ** Which ld to use?
dnl --------------------------------------------------------------
FP_ARG_WITH_PATH_GNU_PROG([LD], [ld])
LdCmd="$LD"
AC_SUBST([LdCmd])
dnl ** Which nm to use?
dnl --------------------------------------------------------------
FP_ARG_WITH_PATH_GNU_PROG([NM], [nm])
NmCmd="$NM"
AC_SUBST([NmCmd])
dnl ** Mac OS X: explicit deployment target
dnl --------------------------------------------------------------
AC_ARG_WITH([macosx-deployment-target],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment