summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rwxr-xr-xboot3
-rw-r--r--ghc.mk2
3 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6be584f536..82ab2f78f6 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,13 @@
MAKEFLAGS += --no-builtin-rules
.SUFFIXES:
+
+# -----------------------------------------------------------------------------
+# Sanitize environment
+
+# See Trac #11530
+export GREP_OPTIONS :=
+
ifneq "$(filter maintainer-clean distclean clean clean_% help,$(MAKECMDGOALS))" ""
-include mk/config.mk
else
diff --git a/boot b/boot
index 18d43aabda..45f5bf06c2 100755
--- a/boot
+++ b/boot
@@ -11,6 +11,9 @@ my %required_tag;
my $validate;
my $curdir;
+# See Trac #11530
+$ENV{GREP_OPTIONS} = '';
+
$required_tag{"-"} = 1;
$validate = 0;
diff --git a/ghc.mk b/ghc.mk
index 8f4aaba491..4034a92d4e 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -92,7 +92,7 @@ $(error Your make does not support abspath. You need GNU make >= 3.81)
endif
##################################################
-
+# -----------------------------------------------------------------------------
# Catch make if it runs away into an infinite loop
ifeq "$(MAKE_RESTARTS)" ""
else ifeq "$(MAKE_RESTARTS)" "1"