# Yes, include the interepreter, readline, and Template Haskell extensions
SRC_HC_OPTS += -DGHCI -package template-haskell
-PKG_DEPENDS += template_haskell
+PKG_DEPENDS += template-haskell
ALL_DIRS += ghci
PKG_DEPENDS += base haskell98
PACKAGE_CPP_OPTS += -DPKG_DEPENDS='$(PKG_DEPENDS)'
+# disable splitting: it won't really help with GHC, and the specialised
+# build system for ghc/compiler isn't set up to handle it.
+SplitObjs = NO
+
+# the package build system likes to set WAYS=$(GhcLibWays), but we don't
+# really want to build the whole of GHC multiple ways... if you do,
+# set GhcCompilerWays instead.
+GhcLibWays = $(GhcCompilerWays)
+
+# override $(GhcLibHcOpts): we want GhcStage2HcOpts to take precedence
+GhcLibHcOpts =
+
# override default definition of HS_IFACES so we can add $(odir)
HS_IFACES = $(addsuffix .$(way_)hi,$(basename $(HS_OBJS)))
endif