diff options
author | Simon Marlow <simonmar@microsoft.com> | 2008-04-08 18:34:34 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2008-04-08 18:34:34 +0000 |
commit | e0fcf61dca4dfac99cb5417e1bc4cbee18822cf2 (patch) | |
tree | 32382c35525e71b5f20dea714fb748b0870431e0 /rts/package.conf.in | |
parent | 92986843271f2f400ebc0759b30eb11d47eaa193 (diff) | |
download | haskell-e0fcf61dca4dfac99cb5417e1bc4cbee18822cf2.tar.gz |
Import libffi-3.0.4, and use it to provide FFI support in GHCi
This replaces the hand-rolled architecture-specific FFI support in
GHCi with the standard libffi as used in GCJ, Python and other
projects. I've bundled the complete libffi-3.0.4 tarball in the
source tree in the same way as we do for GMP, the difference being
that we always build and install our own libffi regardless of whether
there's one on the system (it's small, and we don't want
dependency/versioning headaches).
In particular this means that unregisterised builds will now have a
fully working GHCi including FFI out of the box, provided libffi
supports the platform.
There is also code in the RTS to use libffi in place of
rts/Adjustor.c, but it is currently not enabled if we already have
support in Adjustor.c for the current platform. We need to assess the
performance impact before using libffi here too (in GHCi we don't care
too much about performance).
Diffstat (limited to 'rts/package.conf.in')
-rw-r--r-- | rts/package.conf.in | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rts/package.conf.in b/rts/package.conf.in index 1642101ba0..7e0ee020a1 100644 --- a/rts/package.conf.in +++ b/rts/package.conf.in @@ -25,11 +25,13 @@ library-dirs: FPTOOLS_TOP_ABS"/rts" GMP_LIB_DIRS # if !defined(HAVE_LIBGMP) && !defined(HAVE_FRAMEWORK_GMP) , FPTOOLS_TOP_ABS"/gmp" # endif + , FPTOOLS_TOP_ABS"/libffi" #endif hs-libraries: "HSrts" extra-libraries: "m" /* for ldexp() */ + , "ffi" #ifndef HAVE_FRAMEWORK_GMP , "gmp" #ifdef HAVE_LIBDL @@ -56,9 +58,6 @@ extra-libraries: "m" /* for ldexp() */ #if USE_PAPI , "papi" #endif -#ifdef USE_LIBFFI - , "ffi" -#endif #ifdef INSTALLING include-dirs: INCLUDE_DIR GMP_INCLUDE_DIRS |