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

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


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

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

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

commit a5de5a592f8b2bdae851e0d0c0a0041414dd1c39
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Jan 11 23:44:30 2015 +0000

    Add support for SolarisBrokenShld flag.


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

a5de5a592f8b2bdae851e0d0c0a0041414dd1c39
 src/Oracles/Option.hs | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/Oracles/Option.hs b/src/Oracles/Option.hs
index 0a5506d..029b9bd 100644
--- a/src/Oracles/Option.hs
+++ b/src/Oracles/Option.hs
@@ -1,9 +1,11 @@
+{-# LANGUAGE NoImplicitPrelude #-}
 module Oracles.Option (
     Option (..),
     ghcWithInterpreter, platformSupportsSharedLibs, windowsHost
     ) where
 
 import Base
+import Oracles.Flag
 import Oracles.Base
 
 data Option = TargetOS
@@ -47,14 +49,15 @@ ghcWithInterpreter = do
         &&
         arch `elem` ["i386", "x86_64", "powerpc", "sparc", "sparc64", "arm"]
 
--- TODO: i386-unknown-solaris2 should be in the list if 
--- @SOLARIS_BROKEN_SHLD@ == YES
 platformSupportsSharedLibs :: Condition
 platformSupportsSharedLibs = do
     [platform] <- showArgs TargetPlatformFull
-    return $ platform `notElem` [ "powerpc-unknown-linux"
-                                , "x86_64-unknown-mingw32"
-                                , "i386-unknown-mingw32" ]
+    solarisBrokenShld <- test SolarisBrokenShld
+    return $ notElem platform $
+        [ "powerpc-unknown-linux"
+        , "x86_64-unknown-mingw32"
+        , "i386-unknown-mingw32"] ++
+        [ "i386-unknown-solaris2" | solarisBrokenShld ]
 
 windowsHost :: Condition
 windowsHost = do



More information about the ghc-commits mailing list