summaryrefslogtreecommitdiff
path: root/testsuite/mk
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/mk')
-rw-r--r--testsuite/mk/ghc-config.hs6
-rw-r--r--testsuite/mk/test.mk2
2 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/mk/ghc-config.hs b/testsuite/mk/ghc-config.hs
index 9a6a5e74df..c5ad5ff3b7 100644
--- a/testsuite/mk/ghc-config.hs
+++ b/testsuite/mk/ghc-config.hs
@@ -34,6 +34,12 @@ main = do
_ -> "package-conf"
putStrLn $ "GhcPackageDbFlag" ++ '=':pkgdb_flag
+ let minGhcVersion711 = case lookup "Project version" fields of
+ Just v
+ | parseVersion v >= [7,11] -> "YES"
+ _ -> "NO"
+ putStrLn $ "MinGhcVersion711" ++ '=':minGhcVersion711
+
getGhcFieldOrFail :: [(String,String)] -> String -> String -> IO ()
getGhcFieldOrFail fields mkvar key
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index 27d7f733af..e20a522219 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -44,9 +44,11 @@ TEST_HC_OPTS = -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-
#
TEST_HC_OPTS += -fno-warn-tabs
+ifeq "$(MinGhcVersion711)" "YES"
# Don't warn about missing specialisations. They can only occur with `-O`, but
# we want tests to produce the same output for all test ways.
TEST_HC_OPTS += -fno-warn-missed-specialisations
+endif
RUNTEST_OPTS =