Skip to content

Commit

Permalink
Remove -fhardwire-lib-paths in favour of -dynload sysdep
Browse files Browse the repository at this point in the history
  • Loading branch information
clefru committed Jan 10, 2008
1 parent 6c54855 commit 1b98179
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 7 additions & 3 deletions compiler/main/DriverPipeline.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import Module
import UniqFM ( eltsUFM )
import ErrUtils
import DynFlags
import StaticFlags ( v_Ld_inputs, opt_Static, opt_HardwireLibPaths, WayName(..) )
import StaticFlags ( v_Ld_inputs, opt_Static, WayName(..) )
import Config
import Panic
import Util
Expand Down Expand Up @@ -1197,8 +1197,12 @@ 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 && not opt_Static = ["-L" ++ l, "-Wl,-rpath", "-Wl," ++ l]
| otherwise = ["-L" ++ l]
#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
Expand Down
2 changes: 0 additions & 2 deletions compiler/main/StaticFlags.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ module StaticFlags (
-- Related to linking
opt_PIC,
opt_Static,
opt_HardwireLibPaths,

-- misc opts
opt_IgnoreDotGhci,
Expand Down Expand Up @@ -336,7 +335,6 @@ opt_PIC = True
opt_PIC = lookUp FSLIT("-fPIC")
#endif
opt_Static = lookUp FSLIT("-static")
opt_HardwireLibPaths = lookUp FSLIT("-fhardwire-lib-paths")
opt_Unregisterised = lookUp FSLIT("-funregisterised")

-- Derived, not a real option. Determines whether we will be compiling
Expand Down

0 comments on commit 1b98179

Please sign in to comment.