[commit: ghc] wip/nfs-locking: Set CONFIG_SHELL, such that libtool obtains the bash header. (cb74ce8)

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


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

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

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

commit cb74ce8f2ca00bc2cfac8b003c4c7adade5734af
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date:   Wed Jan 6 14:37:10 2016 +0800

    Set CONFIG_SHELL, such that libtool obtains the bash header.
    
    This improves on #103 and fixes #114, hopefully.


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

cb74ce8f2ca00bc2cfac8b003c4c7adade5734af
 src/Rules/Actions.hs    | 6 +++++-
 src/Rules/IntegerGmp.hs | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/Rules/Actions.hs b/src/Rules/Actions.hs
index 9250357..e32a42f 100644
--- a/src/Rules/Actions.hs
+++ b/src/Rules/Actions.hs
@@ -94,7 +94,11 @@ runConfigure :: FilePath -> [CmdOption] -> [String] -> Action ()
 runConfigure dir opts args = do
     need [dir -/- "configure"]
     putBuild $ "| Run configure in " ++ dir ++ "..."
-    quietly $ cmd Shell (EchoStdout False) [Cwd dir] "bash configure" opts args
+    quietly $ cmd Shell (EchoStdout False) [Cwd dir] "bash configure" opts' args
+    where
+        -- Always configure with bash.
+        -- This also injects /bin/bash into `libtool`, instead of /bin/sh
+        opts' = opts ++ [AddEnv "CONFIG_SHELL" "/bin/bash"]
 
 runMake :: FilePath -> [String] -> Action ()
 runMake dir args = do
diff --git a/src/Rules/IntegerGmp.hs b/src/Rules/IntegerGmp.hs
index 2b9bbd9..7ef124f 100644
--- a/src/Rules/IntegerGmp.hs
+++ b/src/Rules/IntegerGmp.hs
@@ -114,7 +114,7 @@ integerGmpRules = do
             copyFile integerGmpLibraryFakeH integerGmpLibraryH
         else do
             putBuild "| No GMP framework detected; in tree GMP will be built"
-            runMake integerGmpBuild ["MAKEFLAGS='LIBTOOL=bash\\ libtool'"]
+            runMake integerGmpBuild []
 
             copyFile (integerGmpBuild -/- "gmp.h") integerGmpLibraryInTreeH
             copyFile (integerGmpBuild -/- "gmp.h") integerGmpLibraryH



More information about the ghc-commits mailing list