summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-04-27 00:26:06 +0100
committerIan Lynagh <ian@well-typed.com>2013-04-27 00:26:06 +0100
commit9843083601adb7db03844aecd9a855b0d06609a7 (patch)
treee5db2f8227d4e7722b1ac1633359cbef868b0427 /rules
parentebc4305e7c98d4443c94f570dac2a9c3046f90f6 (diff)
downloadhaskell-9843083601adb7db03844aecd9a855b0d06609a7.tar.gz
When linking with $ORIGIN rpaths, use the "-z origin" linker flag too
On FreeBSD, one needs use "-z origin" in order to enable resolution of $ORIGIN in RPATH. Part of #7819.
Diffstat (limited to 'rules')
-rw-r--r--rules/distdir-way-opts.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk
index 8d2649f074..c78723dacb 100644
--- a/rules/distdir-way-opts.mk
+++ b/rules/distdir-way-opts.mk
@@ -128,7 +128,7 @@ ifneq "$4" "0"
ifeq "$$(TargetOS_CPP)" "linux"
$1_$2_$3_GHC_LD_OPTS += \
-fno-use-rpaths \
- $$(foreach d,$$($1_$2_TRANSITIVE_DEPS),-optl-Wl$$(comma)-rpath -optl-Wl$$(comma)'$$$$ORIGIN/../$$d')
+ $$(foreach d,$$($1_$2_TRANSITIVE_DEPS),-optl-Wl$$(comma)-rpath -optl-Wl$$(comma)'$$$$ORIGIN/../$$d') -optl-Wl,-z -optl-Wl,origin
else ifeq "$$(TargetOS_CPP)" "darwin"
$1_$2_$3_GHC_LD_OPTS += -optl-Wl,-headerpad_max_install_names
endif