diff options
author | Austin Seipp <austin@well-typed.com> | 2013-10-25 03:26:23 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2013-10-25 09:14:29 -0500 |
commit | f213e48447050bf468bc4d91fc4d810402c23b85 (patch) | |
tree | 1b90e343bb357755bbd90a97edb763e54484109f /rts/ghc.mk | |
parent | f65473bc4fa8c9664af829629d9d4fb5653154e2 (diff) | |
download | haskell-f213e48447050bf468bc4d91fc4d810402c23b85.tar.gz |
Correctly set relative rpath for OS X (#8266)
This includes both executables (by correcly setting the rpath to the
topDir) and libffi, and GHC itself, so that everything works with no
build tree.
Authored-by: Christiaan Baaj <christiaan.baaij@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'rts/ghc.mk')
-rw-r--r-- | rts/ghc.mk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rts/ghc.mk b/rts/ghc.mk index 9f36811d41..9ed64c6f7c 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -116,6 +116,9 @@ else # depend on libffi.so, but copy libffi.so* rts/dist/build/lib$(LIBFFI_NAME)$(soext): libffi/build/inst/lib/lib$(LIBFFI_NAME)$(soext) cp libffi/build/inst/lib/lib$(LIBFFI_NAME)$(soext)* rts/dist/build +ifeq "$(TargetOS_CPP)" "darwin" + install_name_tool -id @rpath/rts-$(rts_VERSION)/lib$(LIBFFI_NAME)$(soext) rts/dist/build/lib$(LIBFFI_NAME)$(soext) +endif endif endif endif @@ -204,7 +207,7 @@ $$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/dist/libs.depend $$( "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \ -no-auto-link-packages $$(LIBFFI_LIBS) `cat rts/dist/libs.depend` $$(rts_$1_OBJS) \ $$(rts_$1_DTRACE_OBJS) -o $$@ - $(call relative-dynlib-references,rts,dist,1) + $(call relative-dynlib-references,rts,dist,1,$1) endif else $$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) |