[commit: ghc] wip/nfs-locking: Add configuration for libdw (96d66f0)

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


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

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

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

commit 96d66f0c27df839072ee01555fa98529e3be6ef9
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Wed Dec 16 02:42:11 2015 +0100

    Add configuration for libdw


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

96d66f0c27df839072ee01555fa98529e3be6ef9
 cfg/system.config.in       | 6 ++++++
 src/Oracles/Config/Flag.hs | 2 ++
 src/Rules/Generate.hs      | 5 ++++-
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/cfg/system.config.in b/cfg/system.config.in
index 60dae28..9de3166 100644
--- a/cfg/system.config.in
+++ b/cfg/system.config.in
@@ -116,3 +116,9 @@ iconv-lib-dirs     = @ICONV_LIB_DIRS@
 
 gmp-include-dirs   = @GMP_INCLUDE_DIRS@
 gmp-lib-dirs       = @GMP_LIB_DIRS@
+
+
+# Optional Dependencies:
+#=======================
+
+with-libdw         = @HaveLibdw@
diff --git a/src/Oracles/Config/Flag.hs b/src/Oracles/Config/Flag.hs
index 631a6fc..47ea75d 100644
--- a/src/Oracles/Config/Flag.hs
+++ b/src/Oracles/Config/Flag.hs
@@ -17,6 +17,7 @@ data Flag = ArSupportsAtFile
           | SolarisBrokenShld
           | SplitObjectsBroken
           | SupportsComponentId
+          | WithLibdw
 
 -- Note, if a flag is set to empty string we treat it as set to NO. This seems
 -- fragile, but some flags do behave like this, e.g. GccIsClang.
@@ -32,6 +33,7 @@ flag f = do
         SolarisBrokenShld  -> "solaris-broken-shld"
         SplitObjectsBroken -> "split-objects-broken"
         SupportsComponentId -> "supports-component-id"
+        WithLibdw          -> "with-libdw"
     value <- askConfigWithDefault key . putError
         $ "\nFlag '" ++ key ++ "' not set in configuration files."
     unless (value == "YES" || value == "NO" || value == "") . putError
diff --git a/src/Rules/Generate.hs b/src/Rules/Generate.hs
index 069d88f..53b7dd6 100644
--- a/src/Rules/Generate.hs
+++ b/src/Rules/Generate.hs
@@ -106,6 +106,7 @@ generateConfigHs = do
     cGHC_SPLIT_PGM             <- fmap takeBaseName $ getBuilderPath GhcSplit
     cLibFFI                    <- lift useLibFFIForAdjustors
     rtsWays                    <- getRtsWays
+    cGhcRtsWithLibdw           <- getFlag WithLibdw
     let cGhcRTSWays = unwords $ map show rtsWays
     return $ unlines
         [ "{-# LANGUAGE CPP #-}"
@@ -169,7 +170,9 @@ generateConfigHs = do
         , "cGhcThreaded :: Bool"
         , "cGhcThreaded = " ++ show (threaded `elem` rtsWays)
         , "cGhcDebugged :: Bool"
-        , "cGhcDebugged = " ++ show ghcDebugged ]
+        , "cGhcDebugged = " ++ show ghcDebugged
+        , "cGhcRtsWithLibdw :: Bool"
+        , "cGhcRtsWithLibdw = " ++ show cGhcRtsWithLibdw ]
 
 generatePlatformH :: Expr String
 generatePlatformH = do



More information about the ghc-commits mailing list