i386-unknown-freebsd x86_64-unknown-freebsd \
i386-unknown-openbsd x86_64-unknown-openbsd \
i386-unknown-mingw32 \
+ i386-unknown-solaris2 \
i386-apple-darwin powerpc-apple-darwin),YES,NO)
# Build a compiler that will build *unregisterised* libraries and
UseLibFFIForAdjustors=YES
endif
-ifeq "$(findstring $(HostOS_CPP), darwin)" ""
-UseArchivesForGhci = NO
-else
-UseArchivesForGhci = YES
-endif
-
# On Windows we normally want to make a relocatable bindist, to we
# ignore flags like libdir
ifeq "$(Windows)" "YES"
#
# SRC_HC_OPTS += -O
+
+# SRC_HC_OPTS includes flags to be added to *every* Haskell
+# compilation. Setting SRC_HC_OPTS is a good way to set the default
+# optimisation level (-O) and heap size (-H<size>).
+#
+# SRC_HC_OPTS is *not* for adding flags that are required to make your
+# build work. Examples:
+#
+# - instead of using -pgmc/-pgma-/-pgml, use the --with-gcc option to configure
+#
+# - if you need -optc, -opta, or -optl flags, the CONF_CC_* and CONF_LD_*
+# variables are more appropriate (set via configure)
+#
+# Note that SRC_HC_OPTS are added to every Haskell compilation,
+# including when using the bootstrapping compiler (stage 0), So don't
+# put options here that are only supported by very recent GHCs.
+#
SRC_HC_OPTS += -H32m -O
# These flags make flex 8-bit
EXECUTABLE_FILE = chmod +x
#-----------------------------------------------------------------------------
-# Haskell compilers and mkdependHS
+# Installed GHC
-# $(GHC), $(HBC) and $(NHC) point to installed versions of the relevant
-# compilers, if available.
-#
-# $(MKDEPENDHS) is the Haskell dependency generator (ghc -M).
+# $(GHC) points to installed version of the compiler.
#
# NOTE: Don't override $(GHC) in build.mk, use configure --with-ghc instead
# (because the version numbers have to be calculated).
GHC := $(GHC).exe
endif
-GhcDir = $(dir $(GHC))
-
-# Set to YES if $(GHC) has the editline package installed
-GhcHasEditline = @GhcHasEditline@
-
-HBC = @HBC@
-NHC = @NHC@
-
# Sometimes we want to invoke ghc from the build tree in different
# places (eg. it's handy to have a nofib & a ghc build in the same
# tree). We can refer to "this ghc" as $(GHC_INPLACE):
GhcMinVersion = @GhcMinVersion@
# Keep this in sync with the variables in package-config.mk
-ghc_ge_6102 = @ghc_ge_6102@
-ghc_ge_611 = @ghc_ge_611@
ghc_ge_613 = @ghc_ge_613@
# Canonicalised ghc version number, used for easy (integer) version
CONF_LD_OPTS_STAGE0 = @CONF_LD_OPTS_STAGE0@
CONF_LD_OPTS_STAGE1 = @CONF_LD_OPTS_STAGE1@
CONF_LD_OPTS_STAGE2 = @CONF_LD_OPTS_STAGE2@
+CONF_CPP_OPTS_STAGE0 = @CONF_CPP_OPTS_STAGE0@
+CONF_CPP_OPTS_STAGE1 = @CONF_CPP_OPTS_STAGE1@
+CONF_CPP_OPTS_STAGE2 = @CONF_CPP_OPTS_STAGE2@
ifeq "$(TARGETPLATFORM)" "ia64-unknown-linux"
CONF_CC_OPTS += -G0