projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FIX read030 (error message wibble)
[ghc-hetmet.git]
/
compiler
/
main
/
DriverPipeline.hs
diff --git
a/compiler/main/DriverPipeline.hs
b/compiler/main/DriverPipeline.hs
index
4dc287a
..
3a0fefa
100644
(file)
--- a/
compiler/main/DriverPipeline.hs
+++ b/
compiler/main/DriverPipeline.hs
@@
-35,7
+35,7
@@
import Module
import UniqFM ( eltsUFM )
import ErrUtils
import DynFlags
import UniqFM ( eltsUFM )
import ErrUtils
import DynFlags
-import StaticFlags ( v_Ld_inputs, opt_Static, WayName(..) )
+import StaticFlags ( v_Ld_inputs, opt_Static, opt_HardwireLibPaths, WayName(..) )
import Config
import Panic
import Util
import Config
import Panic
import Util
@@
-1173,7
+1173,9
@@
linkBinary dflags o_files dep_packages = do
-- dependencies, and eliminating duplicates.
pkg_lib_paths <- getPackageLibraryPath dflags dep_packages
-- dependencies, and eliminating duplicates.
pkg_lib_paths <- getPackageLibraryPath dflags dep_packages
- let pkg_lib_path_opts = map ("-L"++) pkg_lib_paths
+ let pkg_lib_path_opts = concat (map get_pkg_lib_path_opts pkg_lib_paths)
+ 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
let lib_path_opts = map ("-L"++) lib_paths
let lib_paths = libraryPaths dflags
let lib_path_opts = map ("-L"++) lib_paths