Optionally use libffi to implement 'foreign import "wrapper"' (#793)
authorSimon Marlow <simonmar@microsoft.com>
Thu, 3 Jan 2008 17:02:36 +0000 (17:02 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Thu, 3 Jan 2008 17:02:36 +0000 (17:02 +0000)
commit5123ae93cfc5cdfcecc84340a9517580ad900d64
treea5b25baa091a0932b9495737652f5ba90f76ca2b
parenta068566188bba9d808dfbe1b00c735b6c6952194
Optionally use libffi to implement 'foreign import "wrapper"' (#793)
To enable this, set UseLibFFI=YES in mk/build.mk.

The main advantage here is that this reduces the porting effort for
new platforms: libffi works on more architectures than our current
adjustor code, and it is probably more heavily tested.  We could
potentially replace our existing code, but since it is probably faster
than libffi (just a guess, I'll measure later) and is already working,
it doesn't seem worthwhile.

Right now, you must have libffi installed on your system.  I used the
one supplied by Debian/Ubuntu.
compiler/Makefile
compiler/deSugar/DsForeign.lhs
rts/Adjustor.c
rts/Makefile
rts/package.conf.in