Commit 74430537 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Turn off split objects on Darwin if XCode < 3.2 (#4013)

parent 7bb9d776
......@@ -414,6 +414,29 @@ FP_ARG_WITH_PATH_GNU_PROG([NM], [nm])
NmCmd="$NM"
AC_SUBST([NmCmd])
SplitObjsBroken=NO
if test "$TargetOS_CPP" = "darwin"
then
XCodeVersion=`xcodebuild -version | grep Xcode | sed "s/Xcode //"`
XCodeVersion1=`echo "$XCodeVersion" | sed 's/\..*//'`
XCodeVersion2=`echo "$XCodeVersion" | sed 's/.*\.//'`
# Old XCode versions don't actually give the XCode version
if test "$XCodeVersion" = ""
then
SplitObjsBroken=YES
fi
# Split objects is broken (#4013) with XCode < 3.2
if test "$XCodeVersion1" -lt 3
then
SplitObjsBroken=YES
fi
if test "$XCodeVersion1" -eq 3 && test "$XCodeVersion2" -lt 2
then
SplitObjsBroken=YES
fi
fi
AC_SUBST([SplitObjsBroken])
dnl ** Mac OS X: explicit deployment target
dnl --------------------------------------------------------------
AC_ARG_WITH([macosx-deployment-target],
......
......@@ -295,11 +295,13 @@ PackageSourceURL = http://darcs.haskell.org/packages/$(PACKAGE)/%{FILE}
ArchSupportsSplitObjs=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 powerpc sparc),YES,NO))
OsSupportsSplitObjs=$(strip $(if $(filter $(TargetOS_CPP),mingw32 cygwin32 linux darwin solaris2 freebsd dragonfly netbsd openbsd),YES,NO))
SplitObjsBroken = @SplitObjsBroken@
# lazy test, so that $(GhcUnregisterised) can be set in build.mk
SupportsSplitObjs=$(strip \
$(if $(and $(filter YES,$(ArchSupportsSplitObjs)),\
$(filter YES,$(OsSupportsSplitObjs)),\
$(filter NO,$(SplitObjsBroken)),\
$(filter NO,$(BootingFromHc)),\
$(filter NO,$(GhcUnregisterised))),\
YES,NO))
......
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