[commit: ghc] master: driver: use absolute paths in ld scripts (#7452) (021b797)

git at git.haskell.org git at git.haskell.org
Sun Jul 20 21:58:11 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/021b7978d14799bae779907faf7490cfd21b3f46/ghc

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

commit 021b7978d14799bae779907faf7490cfd21b3f46
Author: Austin Seipp <austin at well-typed.com>
Date:   Sun Jul 20 10:13:15 2014 -0500

    driver: use absolute paths in ld scripts (#7452)
    
    Patch contributed by slowmo.
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


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

021b7978d14799bae779907faf7490cfd21b3f46
 compiler/main/DriverPipeline.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 11427e2..49126fe 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -2166,7 +2166,9 @@ joinObjectFiles dflags o_files output_fn = do
   if ldIsGnuLd
      then do
           script <- newTempName dflags "ldscript"
-          writeFile script $ "INPUT(" ++ unwords o_files ++ ")"
+          cwd <- getCurrentDirectory
+          let o_files_abs = map (cwd </>) o_files
+          writeFile script $ "INPUT(" ++ unwords o_files_abs ++ ")"
           ld_r [SysTools.FileOption "" script] ccInfo
      else if sLdSupportsFilelist mySettings
      then do



More information about the ghc-commits mailing list