You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ghc/ghc-use-system-libffi.patch

74 lines
2.7 KiB

This patch could be replaced by a configure call if
http://hackage.haskell.org/trac/ghc/ticket/5743 were fixed.
Index: ghc-7.6.1/rts/package.conf.in
===================================================================
--- ghc-7.6.1.orig/rts/package.conf.in 2012-09-04 19:10:15.000000000 +0200
+++ ghc-7.6.1/rts/package.conf.in 2012-10-08 13:06:55.167887121 +0200
@@ -24,8 +24,9 @@
hs-libraries: "HSrts"
extra-libraries:
+ "ffi"
#ifdef HAVE_LIBM
- "m" /* for ldexp() */
+ , "m" /* for ldexp() */
#endif
#ifdef HAVE_LIBRT
, "rt"
Index: ghc-7.6.1/ghc.mk
===================================================================
--- ghc-7.6.1.orig/ghc.mk 2012-09-04 19:10:15.000000000 +0200
+++ ghc-7.6.1/ghc.mk 2012-10-08 13:06:55.171887120 +0200
@@ -600,7 +600,6 @@
$(MAYBE_GHCI) \
driver/ghc \
driver/haddock \
- libffi \
includes \
rts
Index: ghc-7.6.1/rts/ghc.mk
===================================================================
--- ghc-7.6.1.orig/rts/ghc.mk 2012-09-04 19:10:15.000000000 +0200
+++ ghc-7.6.1/rts/ghc.mk 2012-10-08 13:08:52.019882891 +0200
@@ -177,12 +177,12 @@
# 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
"$$(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 $$@
else
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext)
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
"$$(RM)" $$(RM_OPTS) $$@
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
-no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \
@@ -193,9 +193,9 @@
endif
endif
else
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) $$(rts_ffi_objs_stamp)
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS)
"$$(RM)" $$(RM_OPTS) $$@
- echo $$(rts_ffi_objs) $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
+ echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
$$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
endif
@@ -509,10 +509,8 @@
# installing
INSTALL_LIBS += $(ALL_RTS_LIBS)
-INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
-INSTALL_LIBS += $(wildcard rts/dist/build/$(LIBFFI_DLL))
-install: install_libffi_headers
+install:
.PHONY: install_libffi_headers
install_libffi_headers :