summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-04-26 19:28:39 +0100
committerIan Lynagh <igloo@earth.li>2012-04-26 19:28:39 +0100
commit3d8dd48620ac8297d183447e5fa9687521752820 (patch)
treeab87ba9509dd6d0d702a887ce7f57184ec0b4ec0 /mk
parentdd96644c9001fe3f6f78ed48caaad84f7a6820ec (diff)
downloadhaskell-3d8dd48620ac8297d183447e5fa9687521752820.tar.gz
Add SRC_[CH]C_WARNING_OPTS
This allows you to say things like SRC_HC_WARNING_OPTS += -fno-warn-unsupported-calling-conventions in mk/validate.mk. Unfortunately, we can't just use SRC_HC_OPTS, as that gets put before the more specific options (e.g. ghc-options in a .cabal file), many of which include -Wall. So now we have: ghc $(SRC_HC_OPTS) ... options from .cabal etc ... $(SRC_HC_WARNING_OPTS)
Diffstat (limited to 'mk')
-rw-r--r--mk/validate-settings.mk12
1 files changed, 7 insertions, 5 deletions
diff --git a/mk/validate-settings.mk b/mk/validate-settings.mk
index 119dce10bb..fa5add53a1 100644
--- a/mk/validate-settings.mk
+++ b/mk/validate-settings.mk
@@ -1,20 +1,22 @@
# DO NOT EDIT! Instead, create a file mk/validate.mk, whose settings will
# override these. See also mk/custom-settings.mk.
-WERROR = -Werror
+WERROR = -Werror
+SRC_CC_WARNING_OPTS =
+SRC_HC_WARNING_OPTS =
HADDOCK_DOCS = YES
-SRC_CC_OPTS += -Wall $(WERROR)
# 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"
-SRC_CC_OPTS += -Werror=unused-but-set-variable
+SRC_CC_WARNING_OPTS += -Werror=unused-but-set-variable
# gcc 4.6 gives 3 warning for giveCapabilityToTask not being inlined
-SRC_CC_OPTS += -Wno-error=inline
+SRC_CC_WARNING_OPTS += -Wno-error=inline
endif
-SRC_HC_OPTS += -Wall $(WERROR) -H64m -O0
+SRC_CC_OPTS += $(WERROR) -Wall
+SRC_HC_OPTS += $(WERROR) -Wall -H64m -O0
GhcStage1HcOpts += -O -fwarn-tabs