summaryrefslogtreecommitdiff
path: root/extra/ghc/build.mk
diff options
context:
space:
mode:
Diffstat (limited to 'extra/ghc/build.mk')
-rw-r--r--extra/ghc/build.mk59
1 files changed, 42 insertions, 17 deletions
diff --git a/extra/ghc/build.mk b/extra/ghc/build.mk
index f918a0f16..bc26a21fe 100644
--- a/extra/ghc/build.mk
+++ b/extra/ghc/build.mk
@@ -7,15 +7,17 @@
# Uncomment one of these to select a build profile below:
-# Full build with max optimisation (slow build)
+# Full build with max optimisation and everything enabled (very slow build)
BuildFlavour = perf
-# Fastest build (libs unoptimised):
-#BuildFlavour = quickest
-
-# Fast build with optimised libraries:
+# Fast build with optimised libraries, no profiling (RECOMMENDED):
#BuildFlavour = quick
+# Even faster build. NOT RECOMMENDED: the libraries will be
+# completely unoptimised, so any code built with this compiler
+# (including stage2) will run very slowly:
+#BuildFlavour = quickest
+
# Profile the stage2 compiler:
#BuildFlavour = prof
@@ -25,6 +27,9 @@ BuildFlavour = perf
# A development build, working on the stage 2 compiler:
#BuildFlavour = devel2
+# An unregisterised, optimised build of ghc, for porting:
+#BuildFlavour = unreg
+
GhcLibWays = v
# -------- 1. A Performance/Distribution build--------------------------------
@@ -37,7 +42,7 @@ SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -O2 -fasm
GhcHcOpts = -Rghc-timing
-GhcLibHcOpts = -O2 -XGenerics
+GhcLibHcOpts = -O2
GhcLibWays += p
ifeq "$(PlatformSupportsSharedLibs)" "YES"
@@ -112,6 +117,7 @@ HADDOCK_DOCS = NO
BUILD_DOCBOOK_HTML = NO
BUILD_DOCBOOK_PS = NO
BUILD_DOCBOOK_PDF = NO
+LAX_DEPENDENCIES = NO
endif
@@ -128,23 +134,42 @@ HADDOCK_DOCS = NO
BUILD_DOCBOOK_HTML = NO
BUILD_DOCBOOK_PS = NO
BUILD_DOCBOOK_PDF = NO
+LAX_DEPENDENCIES = NO
+
+# After stage 1 and the libraries have been built, you can uncomment this line:
+
+# stage=2
+
+# Then stage 1 will not be touched by the build system, until
+# you comment the line again. This is a useful trick for when you're
+# working on stage 2 and want to freeze stage 1 and the libraries for
+# a while.
endif
-# -----------------------------------------------------------------------------
-# Other settings that might be useful
+# -------- A Unregisterised build) -------------------------------------------
-# profiled RTS
-#GhcRtsCcOpts = -pg -g
+ifeq "$(BuildFlavour)" "unreg"
-# Optimised/profiled RTS
-#GhcRtsCcOpts = -O2 -pg
+GhcUnregisterised = YES
+GhcWithNativeCodeGen = NO
-#GhcRtsWithFrontPanel = YES
-#SRC_HC_OPTS += `gtk-config --libs`
+SRC_HC_OPTS = -O -H64m
+GhcStage1HcOpts = -O
+GhcStage2HcOpts = -O2
+GhcHcOpts = -Rghc-timing
+GhcLibHcOpts = -O2
+SplitObjs = NO
+HADDOCK_DOCS = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS = NO
+BUILD_DOCBOOK_PDF = NO
-# NoFib settings
-NoFibWays =
-STRIP=:
+endif
+# -----------------------------------------------------------------------------
+# Other settings that might be useful
+# NoFib settings
+NoFibWays =
+STRIP_CMD = :