summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-10-03 16:44:47 +0100
committerSimon Marlow <marlowsd@gmail.com>2011-10-05 08:53:22 +0100
commitf4e534f030c7f8cafd4877f273118b2e8f38b4b0 (patch)
treef9fee15fb09885aae7865719c5af564a27eeb365
parentb84cece343bbc1ac455b832e066ba7cf53553f4a (diff)
downloadhaskell-f4e534f030c7f8cafd4877f273118b2e8f38b4b0.tar.gz
workaround for #5485: use -fno-full-laziness with 7.2.1
-rw-r--r--mk/config.mk.in10
-rw-r--r--rules/distdir-way-opts.mk1
2 files changed, 11 insertions, 0 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 05fa1d2a0e..89cce18261 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -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
#
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index 31e915d8c8..2b38c8d337 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -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) \