Permalink
Browse files

workaround for #5485: use -fno-full-laziness with 7.2.1

  • Loading branch information...
1 parent b84cece commit f4e534f030c7f8cafd4877f273118b2e8f38b4b0 @simonmar simonmar committed Oct 3, 2011
Showing with 11 additions and 0 deletions.
  1. +10 −0 mk/config.mk.in
  2. +1 −0 rules/distdir-way-opts.mk
View
10 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
#
View
1 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) \

0 comments on commit f4e534f

Please sign in to comment.