diff options
author | Christiaan Baaj <christiaan.baaij@gmail.com> | 2014-01-28 08:24:55 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-01-28 08:24:55 -0600 |
commit | f7be53ac9dac85b83e7fe5ecede01b98a572ba48 (patch) | |
tree | ddf358efae5f9ba93ef9dd7e252311399417b00c /compiler/main/SysTools.lhs | |
parent | 943f22a4c959a2d0c0e47fc40c2163ef7760b6d9 (diff) | |
download | haskell-f7be53ac9dac85b83e7fe5ecede01b98a572ba48.tar.gz |
Fix inplace dynamic linking on OS X (#8266)
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'compiler/main/SysTools.lhs')
-rw-r--r-- | compiler/main/SysTools.lhs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs index 2150c6d594..ad059d7fe6 100644 --- a/compiler/main/SysTools.lhs +++ b/compiler/main/SysTools.lhs @@ -1293,7 +1293,8 @@ linkDynLib dflags0 o_files dep_packages let pkg_lib_paths = collectLibraryPaths pkgs let pkg_lib_path_opts = concatMap get_pkg_lib_path_opts pkg_lib_paths get_pkg_lib_path_opts l - | osElfTarget (platformOS (targetPlatform dflags)) && + | ( osElfTarget (platformOS (targetPlatform dflags)) || + osMachOTarget (platformOS (targetPlatform dflags)) ) && dynLibLoader dflags == SystemDependent && not (gopt Opt_Static dflags) = ["-L" ++ l, "-Wl,-rpath", "-Wl," ++ l] @@ -1390,9 +1391,7 @@ linkDynLib dflags0 o_files dep_packages instName <- case dylibInstallName dflags of Just n -> return n - Nothing -> do - pwd <- getCurrentDirectory - return $ pwd `combine` output_fn + Nothing -> return $ "@rpath" `combine` (takeFileName output_fn) runLink dflags ( map Option verbFlags ++ [ Option "-dynamiclib" |