update ghc-use-system-libffi.patch for ghc-7.0.1

This commit is contained in:
Jens Petersen 2010-11-16 19:09:11 +10:00
parent 7df9981038
commit 802b9bee4e

View File

@ -1,58 +1,69 @@
Index: ghc6-6.12.3/ghc.mk diff -up ghc-7.0.1/compiler/ghc.cabal.in.libffi ghc-7.0.1/compiler/ghc.cabal.in
=================================================================== --- ghc-7.0.1/compiler/ghc.cabal.in.libffi 2010-11-13 04:10:03.000000000 +1000
--- ghc6-6.12.3.orig/ghc.mk 2010-06-09 21:10:12.000000000 +0300 +++ ghc-7.0.1/compiler/ghc.cabal.in 2010-11-16 19:04:28.000000000 +1000
+++ ghc6-6.12.3/ghc.mk 2010-07-17 11:52:25.000000000 +0300 @@ -83,7 +83,7 @@ Library
@@ -369,11 +369,6 @@ if flag(ghci)
endif Build-Depends: template-haskell
BOOT_LIBS = $(foreach lib,$(BOOT_PKGS),$(libraries/$(lib)_dist-boot_v_LIB)) CPP-Options: -DGHCI
- Include-Dirs: ../libffi/build/include
+ pkgconfig-depends: libffi
-OTHER_LIBS = libffi/dist-install/build/libHSffi$(v_libsuf) libffi/dist-install/build/HSffi.o if !flag(ncg)
-ifeq "$(BuildSharedLibs)" "YES" CPP-Options: -DOMIT_NATIVE_CODEGEN
-OTHER_LIBS += libffi/dist-install/build/libHSffi$(dyn_libsuf) diff -up ghc-7.0.1/ghc.mk.libffi ghc-7.0.1/ghc.mk
-endif --- ghc-7.0.1/ghc.mk.libffi 2010-11-13 04:10:05.000000000 +1000
- +++ ghc-7.0.1/ghc.mk 2010-11-16 19:04:28.000000000 +1000
# We cannot run ghc-cabal to configure a package until we have @@ -437,7 +437,6 @@ utils/runghc/dist/package-data.mk: compi
# configured and registered all of its dependencies. So the following
# hack forces all the configure steps to happen in exactly the order
@@ -406,7 +401,6 @@
# add the final two package.conf dependencies: ghc-prim depends on RTS, # add the final two package.conf dependencies: ghc-prim depends on RTS,
# and RTS depends on libffi. # and RTS depends on libffi.
libraries/ghc-prim/dist-install/package-data.mk : rts/package.conf.inplace libraries/ghc-prim/dist-install/package-data.mk : rts/package.conf.inplace
-rts/package.conf.inplace : libffi/package.conf.inplace -rts/package.conf.inplace : libffi/package.conf.inplace
endif endif
# ----------------------------------------------------------------------------- # --------------------------------
@@ -518,7 +512,6 @@ @@ -452,11 +451,6 @@ ALL_STAGE1_LIBS += $(foreach lib,$(PACKA
driver \ endif
BOOT_LIBS = $(foreach lib,$(STAGE0_PACKAGES),$(libraries/$(lib)_dist-boot_v_LIB))
-OTHER_LIBS = libffi/dist-install/build/libHSffi$(v_libsuf) libffi/dist-install/build/HSffi.o
-ifeq "$(BuildSharedLibs)" "YES"
-OTHER_LIBS += libffi/dist-install/build/libHSffi$(dyn_libsuf)
-endif
-
# ----------------------------------------
# Special magic for the ghc-prim package
@@ -581,7 +575,6 @@ BUILD_DIRS += \
driver/ghci \ driver/ghci \
driver/ghc \ driver/ghc \
driver/haddock \
- libffi \ - libffi \
includes \ includes \
rts rts
@@ -863,11 +856,10 @@ @@ -937,11 +930,10 @@ INSTALL_DISTDIR_compiler = stage2
$(addprefix libraries/,$(PACKAGES_STAGE2))
# Now we can do the installation
install_packages: install_libexecs install_packages: install_libexecs
-install_packages: libffi/package.conf.install rts/package.conf.install -install_packages: libffi/package.conf.install rts/package.conf.install
+install_packages: rts/package.conf.install +install_packages: rts/package.conf.install
$(INSTALL_DIR) "$(DESTDIR)$(topdir)" $(INSTALL_DIR) "$(DESTDIR)$(topdir)"
"$(RM)" -r $(RM_OPTS) "$(INSTALLED_PACKAGE_CONF)" "$(RM)" $(RM_OPTS_REC) "$(INSTALLED_PACKAGE_CONF)"
$(INSTALL_DIR) "$(INSTALLED_PACKAGE_CONF)" $(INSTALL_DIR) "$(INSTALLED_PACKAGE_CONF)"
- "$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update libffi/package.conf.install - "$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update libffi/package.conf.install
"$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update rts/package.conf.install "$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update rts/package.conf.install
$(foreach p, $(ALL_INSTALLED_PACKAGES),\ $(foreach p, $(INSTALLED_PKG_DIRS), \
"$(GHC_CABAL_INPLACE)" install \ $(call make-command, \
@@ -942,7 +934,7 @@ @@ -1024,7 +1016,7 @@ BIN_DIST_MK = $(BIN_DIST_PREP_DIR)/bindi
unix-binary-dist-prep: unix-binary-dist-prep:
"$(RM)" $(RM_OPTS) -r bindistprep/ "$(RM)" $(RM_OPTS_REC) bindistprep/
"$(MKDIRHIER)" $(BIN_DIST_PREP_DIR) "$(MKDIRHIER)" $(BIN_DIST_PREP_DIR)
- set -e; for i in LICENSE compiler ghc rts libraries utils docs libffi includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh extra-gcc-opts.in ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done - set -e; for i in packages LICENSE compiler ghc rts libraries utils docs libffi includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh extra-gcc-opts.in ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done
+ set -e; for i in LICENSE compiler ghc rts libraries utils docs includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh extra-gcc-opts.in ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done + set -e; for i in packages LICENSE compiler ghc rts libraries utils docs includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh extra-gcc-opts.in ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done
echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(BIN_DIST_MK) echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(BIN_DIST_MK)
echo "LATEX_DOCS = $(LATEX_DOCS)" >> $(BIN_DIST_MK) echo "LATEX_DOCS = $(LATEX_DOCS)" >> $(BIN_DIST_MK)
echo "BUILD_DOCBOOK_HTML = $(BUILD_DOCBOOK_HTML)" >> $(BIN_DIST_MK) echo "BUILD_DOCBOOK_HTML = $(BUILD_DOCBOOK_HTML)" >> $(BIN_DIST_MK)
@@ -1020,7 +1012,7 @@ @@ -1102,7 +1094,7 @@ SRC_DIST_DIR=$(shell pwd)/$(SRC_DIST_NAM
# #
# Files to include in source distributions # Files to include in source distributions
# #
@ -61,16 +72,16 @@ Index: ghc6-6.12.3/ghc.mk
SRC_DIST_FILES += \ SRC_DIST_FILES += \
configure.ac config.guess config.sub configure \ configure.ac config.guess config.sub configure \
aclocal.m4 README ANNOUNCE HACKING LICENSE Makefile install-sh \ aclocal.m4 README ANNOUNCE HACKING LICENSE Makefile install-sh \
Index: ghc6-6.12.3/rts/ghc.mk diff -up ghc-7.0.1/rts/ghc.mk.libffi ghc-7.0.1/rts/ghc.mk
=================================================================== --- ghc-7.0.1/rts/ghc.mk.libffi 2010-11-13 04:10:06.000000000 +1000
--- ghc6-6.12.3.orig/rts/ghc.mk 2010-06-09 21:10:14.000000000 +0300 +++ ghc-7.0.1/rts/ghc.mk 2010-11-16 19:06:09.000000000 +1000
+++ ghc6-6.12.3/rts/ghc.mk 2010-07-17 11:52:25.000000000 +0300 @@ -430,15 +430,15 @@ endif
@@ -333,15 +333,13 @@
$(eval $(call build-dependencies,rts,dist,1)) $(eval $(call build-dependencies,rts,dist,1))
-$(rts_dist_depfile) : libffi/dist-install/build/ffi.h -$(rts_dist_depfile_c_asm) : libffi/dist-install/build/ffi.h $(DTRACEPROBES_H)
- +$(rts_dist_depfile_c_asm) : $(DTRACEPROBES_H)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# libffi stuff # libffi stuff
@ -84,12 +95,11 @@ Index: ghc6-6.12.3/rts/ghc.mk
+rts_LD_OPTS += $(shell pkg-config --libs libffi) +rts_LD_OPTS += $(shell pkg-config --libs libffi)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# compile generic patchable dyn-wrapper # compile dtrace probes if dtrace is supported
Index: ghc6-6.12.3/rts/package.conf.in diff -up ghc-7.0.1/rts/package.conf.in.libffi ghc-7.0.1/rts/package.conf.in
=================================================================== --- ghc-7.0.1/rts/package.conf.in.libffi 2010-11-13 04:10:06.000000000 +1000
--- ghc6-6.12.3.orig/rts/package.conf.in 2010-06-09 21:10:14.000000000 +0300 +++ ghc-7.0.1/rts/package.conf.in 2010-11-16 19:04:28.000000000 +1000
+++ ghc6-6.12.3/rts/package.conf.in 2010-07-17 11:53:57.000000000 +0300 @@ -24,8 +24,9 @@ library-dirs: TOP"/rts/dist/build" PAPI
@@ -28,8 +28,9 @@
hs-libraries: "HSrts" hs-libraries: "HSrts"
extra-libraries: extra-libraries:
@ -100,7 +110,7 @@ Index: ghc6-6.12.3/rts/package.conf.in
#endif #endif
#ifdef HAVE_LIBRT #ifdef HAVE_LIBRT
, "rt" , "rt"
@@ -59,7 +60,6 @@ @@ -55,7 +56,6 @@ include-dirs: TOP"/includes"
#endif #endif
includes: Stg.h includes: Stg.h
@ -108,15 +118,3 @@ Index: ghc6-6.12.3/rts/package.conf.in
hugs-options: hugs-options:
cc-options: cc-options:
diff -u ghc-6.12.3/compiler/ghc.cabal.in\~ ghc-6.12.3/compiler/ghc.cabal.in
--- ghc-6.12.3/compiler/ghc.cabal.in~ 2010-06-10 04:10:09.000000000 +1000
+++ ghc-6.12.3/compiler/ghc.cabal.in 2010-11-05 18:08:11.000000000 +1000
@@ -83,7 +83,7 @@
if flag(ghci)
Build-Depends: template-haskell
CPP-Options: -DGHCI
- Include-Dirs: ../libffi/build/include
+ pkgconfig-depends: libffi
if !flag(ncg)
CPP-Options: -DOMIT_NATIVE_CODEGEN