From 7bf017383327288ccfb1e83f0d9aa436fd8d81dc Mon Sep 17 00:00:00 2001 From: rrt Date: Tue, 6 Mar 2001 15:00:25 +0000 Subject: [PATCH] [project @ 2001-03-06 15:00:25 by rrt] Use TMPDIR, not /tmp. --- ghc/compiler/main/DriverPipeline.hs | 4 ++-- ghc/compiler/main/DriverUtil.hs | 5 +++-- ghc/compiler/main/HscMain.lhs | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ghc/compiler/main/DriverPipeline.hs b/ghc/compiler/main/DriverPipeline.hs index 079ff72..f568672 100644 --- a/ghc/compiler/main/DriverPipeline.hs +++ b/ghc/compiler/main/DriverPipeline.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverPipeline.hs,v 1.52 2001/02/27 12:36:37 rrt Exp $ +-- $Id: DriverPipeline.hs,v 1.53 2001/03/06 15:00:25 rrt Exp $ -- -- GHC Driver -- @@ -101,7 +101,7 @@ getGhcMode flags -- genPipeline -- -- Herein is all the magic about which phases to run in which order, whether --- the intermediate files should be in /tmp or in the current directory, +-- the intermediate files should be in TMPDIR or in the current directory, -- what the suffix of the intermediate files should be, etc. -- The following compilation pipeline algorithm is fairly hacky. A diff --git a/ghc/compiler/main/DriverUtil.hs b/ghc/compiler/main/DriverUtil.hs index 91fd3ca..e6f7cff 100644 --- a/ghc/compiler/main/DriverUtil.hs +++ b/ghc/compiler/main/DriverUtil.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverUtil.hs,v 1.16 2000/12/20 15:44:01 rrt Exp $ +-- $Id: DriverUtil.hs,v 1.17 2001/03/06 15:00:25 rrt Exp $ -- -- Utils for the driver -- @@ -171,7 +171,8 @@ kludgedSystem cmd phase_name (\_ -> throwDyn (PhaseFailed phase_name (ExitFailure 1))) #else pid <- myGetProcessID - let tmp = "/tmp/sh" ++ show pid + tmp_dir <- readIORef v_TmpDir + let tmp = tmp_dir++"/sh"++show pid h <- openFile tmp WriteMode hPutStrLn h cmd hClose h diff --git a/ghc/compiler/main/HscMain.lhs b/ghc/compiler/main/HscMain.lhs index 4bbf855..ab8730c 100644 --- a/ghc/compiler/main/HscMain.lhs +++ b/ghc/compiler/main/HscMain.lhs @@ -97,8 +97,8 @@ data HscResult | HscRecomp PersistentCompilerState -- updated PCS ModDetails -- new details (HomeSymbolTable additions) ModIface -- new iface (if any compilation was done) - (Maybe String) -- generated stub_h filename (in /tmp) - (Maybe String) -- generated stub_c filename (in /tmp) + (Maybe String) -- generated stub_h filename (in TMPDIR) + (Maybe String) -- generated stub_c filename (in TMPDIR) (Maybe ([UnlinkedBCO],ItblEnv)) -- interpreted code, if any -- 1.7.10.4