From 3242c7ad7f5660305059f8542276f86f45a152f0 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 16 Jul 2009 13:45:49 +0000 Subject: fall back on libffi for 'foreign import "wrapper"' if necessary --- mk/config.mk.in | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mk') 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" -- cgit v1.2.1