Keep separate linker flags, for when we want to link with gcc or ld
[ghc-hetmet.git] / mk / config.mk.in
index 38672af..d0e683f 100644 (file)
@@ -109,6 +109,7 @@ PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),\
        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
@@ -145,9 +146,6 @@ GhcWithNativeCodeGen=$(strip\
     $(if $(filter YESYESNO,\
                  $(OsSupportsNCG)$(ArchSupportsNCG)$(GhcUnregisterised)),YES,NO))
 
-# Build a compiler with the llvm code generator backend
-GhcWithLlvmCodeGen=NO
-
 HaveLibDL = @HaveLibDL@
 
 # ArchSupportsSMP should be set iff there is support for that arch in
@@ -190,12 +188,6 @@ else
 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"
@@ -392,6 +384,23 @@ WINDOWS_INSTALLER = $(WINDOWS_INSTALLER_BASE)$(exeext)
 #
 #      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
@@ -425,7 +434,6 @@ GHC_PKG_PGM             = ghc-pkg$(exeext)
 GHC_LTX_PGM             = ltx$(exeext)
 GHC_MKDIRHIER_PGM       = mkdirhier
 GHC_LNDIR_PGM           = lndir
-GHC_DUMMY_GHC_PGM       = dummy-ghc$(exeext)
 
 ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
 GHC_CP                 = "xcopy /y"
@@ -451,7 +459,6 @@ GHC_PKG_INPLACE             = $(INPLACE_BIN)/$(GHC_PKG_PGM)
 GHCTAGS_INPLACE                = $(INPLACE_BIN)/$(GHC_GHCTAGS_PGM)
 HSC2HS_INPLACE         = $(INPLACE_BIN)/$(GHC_HSC2HS_PGM)
 GENPRIMOP_INPLACE      = $(INPLACE_BIN)/$(GHC_GENPRIMOP_PGM)
-DUMMY_GHC_INPLACE      = $(INPLACE_BIN)/$(GHC_DUMMY_GHC_PGM)
 
 GENERATED_FILE  = chmod a-w
 EXECUTABLE_FILE = chmod +x
@@ -472,8 +479,6 @@ ifneq "$(wildcard $(GHC).exe)" ""
 GHC := $(GHC).exe
 endif
 
-GhcDir          = $(dir $(GHC))
-
 # 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):
@@ -503,8 +508,6 @@ GhcMajVersion       = @GhcMajVersion@
 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
@@ -542,9 +545,15 @@ endif
 CONF_CC_OPTS_STAGE0 = @CONF_CC_OPTS_STAGE0@
 CONF_CC_OPTS_STAGE1 = @CONF_CC_OPTS_STAGE1@
 CONF_CC_OPTS_STAGE2 = @CONF_CC_OPTS_STAGE2@
-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_GCC_LINKER_OPTS_STAGE0 = @CONF_GCC_LINKER_OPTS_STAGE0@
+CONF_GCC_LINKER_OPTS_STAGE1 = @CONF_GCC_LINKER_OPTS_STAGE1@
+CONF_GCC_LINKER_OPTS_STAGE2 = @CONF_GCC_LINKER_OPTS_STAGE2@
+CONF_LD_LINKER_OPTS_STAGE0 = @CONF_LD_LINKER_OPTS_STAGE0@
+CONF_LD_LINKER_OPTS_STAGE1 = @CONF_LD_LINKER_OPTS_STAGE1@
+CONF_LD_LINKER_OPTS_STAGE2 = @CONF_LD_LINKER_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
@@ -590,16 +599,18 @@ CTAGS                     = $(ETAGS)
 RAWCPP_FLAGS            = -undef -traditional
 FIND                   = @FindCmd@
 SORT                   = @SortCmd@
-INSTALL                        = @INSTALL@
+
 #
 # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback
 # install-sh script (if chosen). This not terribly useful to us, so we convert
 # it into an abs. path.
 # 
+INSTALL                        = @INSTALL@
 INSTALL                        := $(subst .././install-sh,$(TOP)/install-sh,$(INSTALL))
+
 LATEX                  = latex
-PDFLATEX        = pdflatex
-BIBTEX          = bibtex
+PDFLATEX                = pdflatex
+BIBTEX                  = bibtex
 LN_S                   = @LN_S@
 MV                     = mv
 NROFF                  = nroff
@@ -613,6 +624,9 @@ 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
 DTRACE                 = @DtraceCmd@
 
 LD = @LdCmd@
@@ -714,10 +728,6 @@ HAPPY_VERSION              = @HappyVersion@
 #
 SRC_HAPPY_OPTS         = -agc --strict
 
-# Temp. to work around performance problems in the HEAD around 8/12/2003,
-# A Happy compiled with this compiler needs more stack.
-SRC_HAPPY_OPTS         += +RTS -K2m -RTS
-
 #
 # Alex
 #