summaryrefslogtreecommitdiff
path: root/rules/build-prog.mk
diff options
context:
space:
mode:
authorAustin Seipp <austin@well-typed.com>2013-10-25 03:26:23 -0500
committerAustin Seipp <austin@well-typed.com>2013-10-25 09:14:29 -0500
commitf213e48447050bf468bc4d91fc4d810402c23b85 (patch)
tree1b90e343bb357755bbd90a97edb763e54484109f /rules/build-prog.mk
parentf65473bc4fa8c9664af829629d9d4fb5653154e2 (diff)
downloadhaskell-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 'rules/build-prog.mk')
-rw-r--r--rules/build-prog.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/rules/build-prog.mk b/rules/build-prog.mk
index 437cfbdb74..54424cf37e 100644
--- a/rules/build-prog.mk
+++ b/rules/build-prog.mk
@@ -262,7 +262,8 @@ $1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$
$$(call cmd,$1_$2_HC) -o $$@ $$($1_$2_$$($1_$2_PROGRAM_WAY)_ALL_HC_OPTS) $$(LD_OPTS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_GHC_LD_OPTS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES))
ifeq "$$($1_$2_PROGRAM_WAY)" "dyn"
- $(call relative-dynlib-references,$1,$2,$3)
+ $(call relative-dynlib-references,$1,$2,$3)
+ $(call relative-dynlib-path,$3)
endif
else
$1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_$$($1_$2_PROGRAM_WAY)_HS_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_C_OBJS) $$($1_$2_$$($1_$2_PROGRAM_WAY)_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/.