From bbd031134a571c1020945b2548e3fc4795b5047a Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Mon, 18 Aug 2014 21:44:25 -0500 Subject: 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 --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile') 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)) -- cgit v1.2.1