diff options
author | Simon Marlow <marlowsd@gmail.com> | 2009-07-16 13:45:49 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2009-07-16 13:45:49 +0000 |
commit | 3242c7ad7f5660305059f8542276f86f45a152f0 (patch) | |
tree | 17f6cd897745638c68c1def87cc24fbddf8419a3 /mk | |
parent | 5b49434484d86b2dfad682d5eb26ef7f3e2e2b56 (diff) | |
download | haskell-3242c7ad7f5660305059f8542276f86f45a152f0.tar.gz |
fall back on libffi for 'foreign import "wrapper"' if necessary
Diffstat (limited to 'mk')
-rw-r--r-- | mk/config.mk.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in index 0502f11162..ac0059919b 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -177,6 +177,16 @@ else GhcEnableTablesNextToCode=YES endif +# Whether to use libffi for adjustors (foreign import "wrapper") or +# not. If we have built-in support (rts/Adjustor.c) then we use that, +# otherwise we fall back on libffi, which is slightly slower. +ArchHasAdjustorSupport=$(strip $(if $(findstring $(HostArch_CPP),i386 x86_64 alpha powerpc ia64,),YES,NO)) +ifeq "$(ArchHasAdjustorSupport)" "YES" +UseLibFFIForAdjustors=NO +else +UseLibFFIForAdjustors=YES +endif + # On Windows we normally want to make a relocatable bindist, to we # ignore flags like libdir ifeq "$(Windows)" "YES" |