summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2014-07-20 10:13:15 -0500
committerAustin Seipp <austin@well-typed.com>2014-07-20 16:55:52 -0500
commit021b7978d14799bae779907faf7490cfd21b3f46 (patch)
treec51ebd2bf233f5b0b0d667a41eb8434a3b5ec88c /compiler
parente0d4386e23a1f67d03fbe67f37ed112830858680 (diff)
downloadhaskell-021b7978d14799bae779907faf7490cfd21b3f46.tar.gz
driver: use absolute paths in ld scripts (#7452)
Patch contributed by slowmo. Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main/DriverPipeline.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 11427e27cf..49126fe738 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