[commit: ghc] wip/nfs-locking: Add support for SolarisBrokenShld flag. (e77d98b)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:04:19 UTC 2017


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

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/e77d98ba7ad9c4eef57f28784267ba6da339d8fe/ghc

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

commit e77d98ba7ad9c4eef57f28784267ba6da339d8fe
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Jan 11 23:43:31 2015 +0000

    Add support for SolarisBrokenShld flag.


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

e77d98ba7ad9c4eef57f28784267ba6da339d8fe
 cfg/default.config.in |  1 +
 src/Oracles/Flag.hs   | 17 ++++++++++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/cfg/default.config.in b/cfg/default.config.in
index 50c3937..b1eadd0 100644
--- a/cfg/default.config.in
+++ b/cfg/default.config.in
@@ -31,6 +31,7 @@ gcc-lt-46    = @GccLT46@
 lax-dependencies     = NO
 dynamic-ghc-programs = NO
 supports-package-key = @SUPPORTS_PACKAGE_KEY@
+solaris-broken-shld  = @SOLARIS_BROKEN_SHLD@
 
 # Information about host and target systems:
 #===========================================
diff --git a/src/Oracles/Flag.hs b/src/Oracles/Flag.hs
index 946c4fb..7a235a4 100644
--- a/src/Oracles/Flag.hs
+++ b/src/Oracles/Flag.hs
@@ -13,23 +13,30 @@ import Prelude hiding (not, (&&), (||))
 import Base
 import Oracles.Base
 
-data Flag = LaxDeps | DynamicGhcPrograms
-          | GccIsClang | GccLt46 | CrossCompiling | Validating
+data Flag = LaxDeps
+          | DynamicGhcPrograms
+          | GccIsClang
+          | GccLt46
+          | CrossCompiling
+          | Validating
           | SupportsPackageKey
+          | SolarisBrokenShld
 
+-- TODO: Give the warning *only once* per key
 test :: Flag -> Action Bool
 test flag = do
     (key, defaultValue) <- return $ case flag of
-        LaxDeps            -> ("lax-dependencies"     , False) -- TODO: move flags to a separate file
+        LaxDeps            -> ("lax-dependencies"     , False)
         DynamicGhcPrograms -> ("dynamic-ghc-programs" , False)
         GccIsClang         -> ("gcc-is-clang"         , False)
         GccLt46            -> ("gcc-lt-46"            , False)
         CrossCompiling     -> ("cross-compiling"      , False)
         Validating         -> ("validating"           , False)
         SupportsPackageKey -> ("supports-package-key" , False)
+        SolarisBrokenShld  -> ("solaris-broken-shld"  , False)
     let defaultString = if defaultValue then "YES" else "NO"
     value <- askConfigWithDefault key $
-        do putLoud $ "\nFlag '" -- TODO: Give the warning *only once* per key
+        do putLoud $ "\nFlag '"
                 ++ key
                 ++ "' not set in configuration files. "
                 ++ "Proceeding with default value '"
@@ -103,4 +110,4 @@ instance ToCondition a => AndOr Flag a where
     x && y = toCondition x && y
     x || y = toCondition x || y
 
-
+-- TODO: need one more instance?
\ No newline at end of file



More information about the ghc-commits mailing list