summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorGintautas Miliauskas <gintautas.miliauskas@gmail.com>2014-10-29 23:13:51 -0500
committerAustin Seipp <austin@well-typed.com>2014-10-29 23:13:51 -0500
commitacb3295c69179159ba8230baff4104414c1db2c2 (patch)
tree22f747388b004019308bdd09ccd7a32e965089b5 /mk
parent5ce1266a7d323fd4fe4262f07be908d65e5b5b43 (diff)
downloadhaskell-acb3295c69179159ba8230baff4104414c1db2c2.tar.gz
Avoid setting -Werror=unused-but-set-variable on Windows.
Summary: The option is not needed (it was only intended to override Debian's default) and causes an error if the host ghc's mingw is too old (which the script does not detect). Fixes T9727 Reviewers: austin Reviewed By: austin Subscribers: thomie, carter, simonmar Differential Revision: https://phabricator.haskell.org/D373 GHC Trac Issues: #9727
Diffstat (limited to 'mk')
-rw-r--r--mk/validate-settings.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/mk/validate-settings.mk b/mk/validate-settings.mk
index b05b289239..52aa648893 100644
--- a/mk/validate-settings.mk
+++ b/mk/validate-settings.mk
@@ -15,7 +15,10 @@ ifneq "$(GccIsClang)" "YES"
# Debian doesn't turn -Werror=unused-but-set-variable on by default, so
# we turn it on explicitly for consistency with other users
ifeq "$(GccLT46)" "NO"
+# Never set the flag on Windows as the host gcc may be too old.
+ifneq "$(HostOS_CPP)" "mingw32"
SRC_CC_WARNING_OPTS += -Werror=unused-but-set-variable
+endif
# gcc 4.6 gives 3 warning for giveCapabilityToTask not being inlined
SRC_CC_WARNING_OPTS += -Wno-error=inline
endif