[commit: ghc] master: Hadrian: Fix rpath so shared objects work after being copied (4cf2160)
git at git.haskell.org
git at git.haskell.org
Tue Mar 12 13:15:13 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/4cf2160afe0e08fe29576895a1eced863d3a521d/ghc
>---------------------------------------------------------------
commit 4cf2160afe0e08fe29576895a1eced863d3a521d
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date: Sun Mar 10 17:37:48 2019 +0000
Hadrian: Fix rpath so shared objects work after being copied
After being copied all the shared objects end up in the same directory.
Therefore the correct rpath is `$ORIGIN` rather than the computed
path which is relative to the directory where it is built.
>---------------------------------------------------------------
4cf2160afe0e08fe29576895a1eced863d3a521d
hadrian/src/Settings/Builders/Ghc.hs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs
index 7fb3082..0d0d58a 100644
--- a/hadrian/src/Settings/Builders/Ghc.hs
+++ b/hadrian/src/Settings/Builders/Ghc.hs
@@ -82,8 +82,8 @@ ghcLinkArgs = builder (Ghc LinkHs) ? do
[ arg "-dynamic"
-- TODO what about windows?
, isLibrary pkg ? pure [ "-shared", "-dynload", "deploy" ]
- , notStage0 ?
- hostSupportsRPaths ? arg ("-optl-Wl,-rpath," ++ rpath)
+ , hostSupportsRPaths ? arg ("-optl-Wl,-rpath," ++ rpath)
+ , hostSupportsRPaths ? arg ("-optl-Wl,-rpath,$ORIGIN")
]
, arg "-no-auto-link-packages"
, nonHsMainPackage pkg ? arg "-no-hs-main"
More information about the ghc-commits
mailing list