Use -rpath flags on all Elf OSes, not just Linux
authorIan Lynagh <ian@well-typed.com>
Fri, 26 Apr 2013 23:28:31 +0000 (00:28 +0100)
committerIan Lynagh <ian@well-typed.com>
Fri, 26 Apr 2013 23:28:43 +0000 (00:28 +0100)
Patch from pgj; part of #7819.

rules/distdir-way-opts.mk

index c78723d..acf6882 100644 (file)
@@ -125,7 +125,7 @@ $1_$2_$3_ALL_HC_OPTS = \
 
 ifeq "$3" "dyn"
 ifneq "$4" "0"
-ifeq "$$(TargetOS_CPP)" "linux"
+ifeq "$$(TargetElf)" "YES"
 $1_$2_$3_GHC_LD_OPTS += \
     -fno-use-rpaths \
     $$(foreach d,$$($1_$2_TRANSITIVE_DEPS),-optl-Wl$$(comma)-rpath -optl-Wl$$(comma)'$$$$ORIGIN/../$$d') -optl-Wl,-z -optl-Wl,origin