diff options
-rw-r--r-- | rts/ghc.mk | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/rts/ghc.mk b/rts/ghc.mk index 4452add334..b7651b09cf 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -104,13 +104,15 @@ endif ifneq "$(BINDIST)" "YES" ifneq "$(UseSystemLibFFI)" "YES" +ifeq "$(HostOS_CPP)" "mingw32" +rts/dist/build/libffi.dll: libffi/build/inst/bin/$(LIBFFI_DLL) + cp $< $@ +else # This is a little hacky. We don't know the SO version, so we only # depend on libffi.so, but copy libffi.so* rts/dist/build/libffi$(soext): libffi/build/inst/lib/libffi$(soext) cp libffi/build/inst/lib/libffi$(soext)* rts/dist/build - -rts/dist/build/$(LIBFFI_DLL): libffi/build/inst/bin/$(LIBFFI_DLL) - cp $< $@ +endif endif endif @@ -176,10 +178,10 @@ endif # Making a shared library for the RTS. ifneq "$$(findstring dyn, $1)" "" ifeq "$$(HostOS_CPP)" "mingw32" -$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/$$(LIBFFI_DLL) +$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/libffi.dll "$$(RM)" $$(RM_OPTS) $$@ "$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \ - -no-auto-link-packages -Lrts/dist/build -l$(LIBFFI_WINDOWS_LIB) `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@ + -no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@ else ifneq "$$(UseSystemLibFFI)" "YES" LIBFFI_LIBS = -Lrts/dist/build -lffi |