[commit: ghc] master: Avoid setting -Werror=unused-but-set-variable on Windows. (acb3295)

git at git.haskell.org git at git.haskell.org
Thu Oct 30 04:15:42 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/acb3295c69179159ba8230baff4104414c1db2c2/ghc

>---------------------------------------------------------------

commit acb3295c69179159ba8230baff4104414c1db2c2
Author: Gintautas Miliauskas <gintautas.miliauskas at gmail.com>
Date:   Wed Oct 29 23:13:51 2014 -0500

    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


>---------------------------------------------------------------

acb3295c69179159ba8230baff4104414c1db2c2
 mk/validate-settings.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mk/validate-settings.mk b/mk/validate-settings.mk
index b05b289..52aa648 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



More information about the ghc-commits mailing list