[commit: ghc] master: Testsuite: only add -fno-warn-missed-specialisations for ghc>=7.11 (c0bdfee)

git at git.haskell.org git at git.haskell.org
Sun Oct 4 21:29:09 UTC 2015


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

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

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

commit c0bdfee72de789d0cfbd8d93a2111f348660cfbc
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Sun Oct 4 18:46:12 2015 +0200

    Testsuite: only add -fno-warn-missed-specialisations for ghc>=7.11
    
    It should be possible to run the testsuite with older versions of GHC.
    
    Reviewed by: austin
    
    Differential Revision: https://phabricator.haskell.org/D1308


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

c0bdfee72de789d0cfbd8d93a2111f348660cfbc
 testsuite/mk/ghc-config.hs | 6 ++++++
 testsuite/mk/test.mk       | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/testsuite/mk/ghc-config.hs b/testsuite/mk/ghc-config.hs
index 9a6a5e7..c5ad5ff 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 27d7f73..e20a522 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 =
 



More information about the ghc-commits mailing list