Follow changes in Cabal
[ghc-hetmet.git] / mk / config.mk.in
index d0e683f..b478997 100644 (file)
@@ -294,13 +294,14 @@ PackageSourceURL = http://darcs.haskell.org/packages/$(PACKAGE)/%{FILE}
 #              doing object-file splitting
 
 ArchSupportsSplitObjs=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 powerpc sparc),YES,NO))
-# Object splitting is disabled on darwin due to #4013
-OsSupportsSplitObjs=$(strip $(if $(filter $(TargetOS_CPP),mingw32 cygwin32 linux solaris2 freebsd dragonfly netbsd openbsd),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))
@@ -559,6 +560,12 @@ ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux"
 CONF_CC_OPTS += -G0
 endif
 
+# The .hsc files aren't currently safe for cross-compilation on Windows:
+#     libraries\haskeline\.\System\Console\Haskeline\Backend\Win32.hsc:160
+#     directive "let" is not safe for cross-compilation
+ifneq "$(Windows)" "YES"
+SRC_HSC2HS_OPTS += --cross-safe
+endif
 SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS) $(CONF_CC_OPTS_STAGE0)))
 SRC_HSC2HS_OPTS += $(foreach d,$(GMP_INCLUDE_DIRS),-I$(d))
 
@@ -624,9 +631,7 @@ TR                  = tr
 SHELL                  = /bin/sh
 
 HaveDtrace             = @HaveDtrace@
-# There are problems with dtrace on 64bit 10.5. For now at least, we
-# just turn dtrace off unless you override USE_DTRACE
-USE_DTRACE = NO
+USE_DTRACE = $(HaveDtrace)
 DTRACE                 = @DtraceCmd@
 
 LD = @LdCmd@