diff options
author | Simon Marlow <simonmar@microsoft.com> | 2008-01-03 17:02:36 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2008-01-03 17:02:36 +0000 |
commit | 5123ae93cfc5cdfcecc84340a9517580ad900d64 (patch) | |
tree | a5b25baa091a0932b9495737652f5ba90f76ca2b /rts/Makefile | |
parent | a068566188bba9d808dfbe1b00c735b6c6952194 (diff) | |
download | haskell-5123ae93cfc5cdfcecc84340a9517580ad900d64.tar.gz |
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.
Diffstat (limited to 'rts/Makefile')
-rw-r--r-- | rts/Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/Makefile b/rts/Makefile index 943f3fe863..74a37fdcb9 100644 --- a/rts/Makefile +++ b/rts/Makefile @@ -148,6 +148,11 @@ SRC_CC_OPTS += -DNOSMP SRC_HC_OPTS += -optc-DNOSMP endif +ifeq "$(UseLibFFI)" "YES" +SRC_CC_OPTS += -DUSE_LIBFFI +PACKAGE_CPP_OPTS += -DUSE_LIBFFI +endif + ifneq "$(DYNAMIC_RTS)" "YES" SRC_HC_OPTS += -static else |