workaround for #5485: use -fno-full-laziness with 7.2.1
authorSimon Marlow <marlowsd@gmail.com>
Mon, 3 Oct 2011 15:44:47 +0000 (16:44 +0100)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 5 Oct 2011 07:53:22 +0000 (08:53 +0100)
mk/config.mk.in
rules/distdir-way-opts.mk

index 05fa1d2..89cce18 100644 (file)
@@ -538,6 +538,16 @@ else
 GhcCanonVersion = $(GhcMajVersion)$(GhcMinVersion)
 endif
 
+# Work around #5453, which causes the stage1 compiler to segfault when
+# built with 7.2.1.
+ifeq "$(GhcVersion)" "7.2.1"
+CONF_HC_OPTS_STAGE0 += -fno-full-laziness
+compiler/cmm/Bitmap_HC_OPTS += -ffull-laziness
+# urgh.  Compiling cmm/Bitmap.hs with -fno-full-laziness results in 
+#   "gmp: overflow in mpz type"
+# for some unknown reason, so turn full-laziness back on for this module.
+endif
+
 #-----------------------------------------------------------------------------
 # C compiler
 #
index 31e915d..2b38c8d 100644 (file)
@@ -51,6 +51,7 @@ $1_$2_$3_MOST_HC_OPTS = \
  $$(foreach pkg,$$($1_$2_DEPS),-package $$(pkg)) \
  $$(if $$(findstring YES,$$($1_$2_SplitObjs)),$$(if $$(findstring dyn,$3),,-split-objs),) \
  $$($1_$2_HC_OPTS) \
+ $$(CONF_HC_OPTS_STAGE$4) \
  $$($1_$2_MORE_HC_OPTS) \
  $$($1_$2_EXTRA_HC_OPTS) \
  $$($1_$2_$3_HC_OPTS) \