summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2014-08-18 21:44:25 -0500
committerAustin Seipp <austin@well-typed.com>2014-08-18 23:26:19 -0500
commitbbd031134a571c1020945b2548e3fc4795b5047a (patch)
tree854e8b0828580955e7e130bbc5fa1fde115b93b7 /Makefile
parentd9a20573f473cc7389004470999b8a318aa6b3f2 (diff)
downloadhaskell-bbd031134a571c1020945b2548e3fc4795b5047a.tar.gz
Bug #9439: Ensure that stage 0 compiler isn't affected
Summary: Bug #9439 will cause miscompilation of GHC's LLVM backend. Here we ensure that an affected compiler isn't used to bootstrap. Test Plan: Attempt to bootstrap GHC with an affected stage 0 compiler. Reviewers: rwbarton, austin Reviewed By: austin Subscribers: simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D159
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c4cce6d405..2cc62b5566 100644
--- a/Makefile
+++ b/Makefile
@@ -44,6 +44,13 @@ endif
include mk/custom-settings.mk
+# Verify that stage 0 LLVM backend isn't affected by Bug #9439 if needed
+ifeq "$(GHC_LLVM_AFFECTED_BY_9439)" "1"
+ifneq "$(findstring -fllvm,$(GhcHcOpts) $(GhcStage1HcOpts))" ""
+$(error Stage 0 compiler is affected by Bug #9439. Refusing to bootstrap with -fllvm)
+endif
+endif
+
# No need to update makefiles for these targets:
REALGOALS=$(filter-out binary-dist binary-dist-prep bootstrapping-files framework-pkg clean clean_% distclean maintainer-clean show echo help test fulltest,$(MAKECMDGOALS))