From: Clemens Fruhwirth Date: Wed, 1 Aug 2007 09:24:29 +0000 (+0000) Subject: Only add -rpath to linker invocation when -dynamic X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=1aa7ab237f38be02a9f4c2752cd5042ff5810a38 Only add -rpath to linker invocation when -dynamic --- diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index a9e9ab4..3a0fefa 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1174,7 +1174,7 @@ linkBinary dflags o_files dep_packages = do pkg_lib_paths <- getPackageLibraryPath dflags dep_packages let pkg_lib_path_opts = concat (map get_pkg_lib_path_opts pkg_lib_paths) - get_pkg_lib_path_opts l | opt_HardwireLibPaths = ["-L" ++ l, "-Wl,-rpath", "-Wl," ++ l] + get_pkg_lib_path_opts l | opt_HardwireLibPaths && not opt_Static = ["-L" ++ l, "-Wl,-rpath", "-Wl," ++ l] | otherwise = ["-L" ++ l] let lib_paths = libraryPaths dflags