Commit 51bf3653 authored by's avatar

Fix build with non-Linux ELF OSes

We were only setting an RPATH for the RTS DLL on Linux, but as far
as I can see we should be doing it for all ELF OSes. Hopefully this
will fix the problem where the installed ghc-pkg can't find libffi.dll
on FreeBSD.
parent 0f49dd69
......@@ -88,7 +88,13 @@ GhcDynamic=NO
# GhcProfiled=YES means compile a profiled stage-2 compiler
# Soem platforms don't support shared libraries
ifeq "$(findstring $(TargetOS_CPP),linux freebsd dragonfly openbsd netbsd solaris2 kfreebsdgnu haiku linux-android)" ""
TargetElf = NO
TargetElf = YES
# Some platforms don't support shared libraries
NoSharedLibsPlatformList =
......@@ -194,7 +194,7 @@ $$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/b
ifneq "$(UseSystemLibFFI)" "YES"
LIBFFI_LIBS = -Lrts/dist/build -lffi
ifeq "$$(TargetOS_CPP)" "linux"
ifeq "$$(TargetElf)" "YES"
LIBFFI_LIBS += -optl-Wl,-rpath -optl-Wl,'$$$$ORIGIN'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment