X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fmain%2FDriverPipeline.hs;h=c8cf4c9a804519a5dc91d576469d84378bfb54b1;hp=225fc6007ea83a932a99461c5fa23204b1015a4b;hb=527f52a72acf214994921ad36de92f934e9632da;hpb=6efacfe8bcbe66dfc3b52397ccbd34a58890520d diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 225fc60..c8cf4c9 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1561,7 +1561,13 @@ linkDynLib dflags o_files dep_packages = do let pkgs_no_rts = pkgs #endif let pkg_lib_paths = collectLibraryPaths pkgs_no_rts - let pkg_lib_path_opts = map ("-L"++) pkg_lib_paths + let pkg_lib_path_opts = concatMap get_pkg_lib_path_opts pkg_lib_paths +#ifdef linux_TARGET_OS + get_pkg_lib_path_opts l | (dynLibLoader dflags)==SystemDependent && not opt_Static = ["-L" ++ l, "-Wl,-rpath", "-Wl," ++ l] + | otherwise = ["-L" ++ l] +#else + get_pkg_lib_path_opts l = ["-L" ++ l] +#endif let lib_paths = libraryPaths dflags let lib_path_opts = map ("-L"++) lib_paths