Add build.mk.sample entry for Cross Compilation
authorAustin Seipp <austin@well-typed.com>
Fri, 25 Oct 2013 08:42:42 +0000 (03:42 -0500)
committerAustin Seipp <austin@well-typed.com>
Fri, 25 Oct 2013 14:14:30 +0000 (09:14 -0500)
This is suitable e.g. for iOS.

Authored-by: Authored-by: Luke Iannini <lukexi@me.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
mk/build.mk.sample

index 1b05dde..94d09e1 100644 (file)
@@ -20,6 +20,9 @@
 # Fast build with optimised libraries, no profiling, with LLVM:
 #BuildFlavour = quick-llvm
 
+# Fast build configured for a cross compiler
+#BuildFlavour  = quick-cross
+
 # Even faster build.  NOT RECOMMENDED: the libraries will be
 # completely unoptimised, so any code built with this compiler
 # (including stage2) will run very slowly:
@@ -137,6 +140,27 @@ DYNAMIC_GHC_PROGRAMS = NO
 
 endif
 
+# -------- A Fast build configured for cross-compilation ----------------------
+
+ifeq "$(BuildFlavour)" "quick-cross"
+
+SRC_HC_OPTS        = -H64m -O0
+GhcStage1HcOpts    = -O -fllvm
+GhcStage2HcOpts    = -O0 -fllvm
+GhcLibHcOpts       = -O -fllvm
+SplitObjs          = NO
+HADDOCK_DOCS       = NO
+BUILD_DOCBOOK_HTML = NO
+BUILD_DOCBOOK_PS   = NO
+BUILD_DOCBOOK_PDF  = NO
+INTEGER_LIBRARY    = integer-simple
+Stage1Only         = YES
+
+DYNAMIC_BY_DEFAULT   = NO
+DYNAMIC_GHC_PROGRAMS = NO
+
+endif
+
 # -------- Profile the stage2 compiler ----------------------------------------
 
 ifeq "$(BuildFlavour)" "prof"