summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-05-04 16:26:59 +0100
committerIan Lynagh <igloo@earth.li>2012-05-04 16:26:59 +0100
commitf3c24c53bcbd029f107476e24cf048b221e1cb94 (patch)
tree31f99d35b805c5f7f1b636610c3c9014195f2340
parent1169351dca19dc3973448336ae168ddba154e606 (diff)
downloadhaskell-f3c24c53bcbd029f107476e24cf048b221e1cb94.tar.gz
Follow libffi changes on Windows
-rw-r--r--compiler/ghc.mk2
-rw-r--r--libffi/ghc.mk3
-rw-r--r--rts/ghc.mk8
3 files changed, 8 insertions, 5 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 505c985bbe..e4a8368795 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -497,7 +497,7 @@ ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
define windowsDynLinkToFfi
# $1 = way
ifneq "$$(findstring dyn, $1)" ""
-compiler_stage2_$1_ALL_HC_OPTS += -lffi-5
+compiler_stage2_$1_ALL_HC_OPTS += -l$$(LIBFFI_WINDOWS_LIB)
endif
endef
$(foreach way,$(GhcLibWays),$(eval $(call windowsDynLinkToFfi,$(way))))
diff --git a/libffi/ghc.mk b/libffi/ghc.mk
index 879d482da8..fc474d2010 100644
--- a/libffi/ghc.mk
+++ b/libffi/ghc.mk
@@ -35,6 +35,9 @@ libffi_STATIC_LIB = libffi/build/inst/lib/libffi.a
libffi_HEADERS = rts/dist/build/ffi.h \
rts/dist/build/ffitarget.h
+LIBFFI_WINDOWS_LIB = ffi-6
+LIBFFI_DLL = lib$(LIBFFI_WINDOWS_LIB).dll
+
ifeq "$(OSTYPE)" "cygwin"
LIBFFI_PATH_MANGLE = PATH=$$(cygpath "$(TOP)")/libffi:$$PATH; export PATH;
endif
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 95faea8f77..6155002b83 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -116,7 +116,7 @@ $(rts_ffi_objs_stamp): $(libffi_STATIC_LIB) $(TOUCH_DEP) | $$(dir $$@)/.
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-5.dll: libffi/build/inst/bin/libffi-5.dll
+rts/dist/build/$(LIBFFI_DLL): libffi/build/inst/bin/$(LIBFFI_DLL)
cp $< $@
endif
@@ -172,10 +172,10 @@ rts_dist_$1_CC_OPTS += -DRtsWay=\"rts_$1\"
# Making a shared library for the RTS.
ifneq "$$(findstring dyn, $1)" ""
ifeq "$$(HOSTPLATFORM)" "i386-unknown-mingw32"
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/libffi-5.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 -lffi-5 `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
+ -no-auto-link-packages -Lrts/dist/build -l$(LIBFFI_WINDOWS_LIB) `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
else
$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext)
"$$(RM)" $$(RM_OPTS) $$@
@@ -510,7 +510,7 @@ endif
INSTALL_LIBS += $(ALL_RTS_LIBS)
INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
-INSTALL_LIBS += $(wildcard rts/dist/build/libffi-5.dll)
+INSTALL_LIBS += $(wildcard rts/dist/build/$(LIBFFI_DLL))
install: install_libffi_headers