summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-11-29 22:22:39 +0000
committerIan Lynagh <ian@well-typed.com>2012-11-29 22:22:39 +0000
commit3005e90936c47c1f71672bf6c84fff20cb14014b (patch)
treefc2c6afe163460596b197665f68544de8c3ad044 /ghc.mk
parentbd9e029927b25274f574104d837de0028e45a3d6 (diff)
downloadhaskell-3005e90936c47c1f71672bf6c84fff20cb14014b.tar.gz
Add configure option to use system provided libffi; fixes #5743
Based on patch from Peter Trommler: From 293495d40f62e691520331a41c6d85d82e120169 Mon Sep 17 00:00:00 2001 From: Peter Trommler <ptrommler@acm.org> Date: Sun, 21 Oct 2012 18:47:01 +0200 Subject: [PATCH] Add configure option to use system provided libffi This fixes track # 5743 and #4496.
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk11
1 files changed, 9 insertions, 2 deletions
diff --git a/ghc.mk b/ghc.mk
index 39af75cf87..852baa9f32 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -52,7 +52,7 @@
# * For each package:
# o configure, generate package-data.mk and inplace-pkg-info
# o register each package into inplace/lib/package.conf
-# * build libffi
+# * build libffi (if not disabled by --with-system-libffi)
# * With bootstrapping compiler:
# o Build libraries/{filepath,hpc,Cabal}
# o Build compiler (stage 1)
@@ -618,12 +618,18 @@ else
MAYBE_GHCI=driver/ghci
endif
+ifeq "$(UseSystemLibFFI)" "YES"
+MAYBE_LIBFFI=
+else
+MAYBE_LIBFFI=libffi
+endif
+
BUILD_DIRS += \
driver \
$(MAYBE_GHCI) \
driver/ghc \
driver/haddock \
- libffi \
+ $(MAYBE_LIBFFI) \
includes \
rts
@@ -1044,6 +1050,7 @@ unix-binary-dist-prep:
echo "BUILD_DOCBOOK_PDF = $(BUILD_DOCBOOK_PDF)" >> $(BIN_DIST_MK)
echo "BUILD_MAN = $(BUILD_MAN)" >> $(BIN_DIST_MK)
echo "GHC_CABAL_INPLACE = utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist" >> $(BIN_DIST_MK)
+ echo "UseSystemLibFFI = $(UseSystemLibFFI)" >> $(BIN_DIST_MK)
cd $(BIN_DIST_PREP_DIR) && autoreconf
$(call removeFiles,$(BIN_DIST_PREP_TAR))
# h means "follow symlinks", e.g. if aclocal.m4 is a symlink to a source