[GHC] #5743: Configurably use system-provided libffi
GHC
cvs-ghc at haskell.org
Fri Nov 30 10:19:57 CET 2012
#5743: Configurably use system-provided libffi
------------------------------+---------------------------------------------
Reporter: nomeata | Owner: trommler
Type: feature request | Status: closed
Priority: normal | Milestone: 7.6.2
Component: Build System | Version: 7.2.1
Resolution: fixed | Keywords:
Os: Linux | Architecture: Unknown/Multiple
Failure: None/Unknown | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related: #4496
------------------------------+---------------------------------------------
Changes (by PHO):
* cc: pho@… (added)
Comment:
Your patch mentions a variable `LIBFFI_LIBS`, which isn't defined
anywhere. I think you need something like:
{{{
diff --git a/rts/ghc.mk b/rts/ghc.mk
index e3c9fa6..d3638ac 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -386,12 +386,14 @@ rts/dist/build/AutoApply_HC_OPTS += -fno-PIC -static
endif
endif
-# add CFLAGS for libffi
+# add CFLAGS and LIBS for libffi
# ffi.h triggers prototype warnings, so disable them here:
ifeq "$(UseSystemLibFFI)" "YES"
LIBFFI_CFLAGS = $(addprefix -I,$(FFIIncludeDir))
+LIBFFI_LIBS = $(addprefix -L,$(FFILibDir)) -lffi
else
LIBFFI_CFLAGS =
+LIBFFI_LIBS = -Lrts/dist/build -lffi
endif
rts/Interpreter_CC_OPTS += -Wno-strict-prototypes $(LIBFFI_CFLAGS)
rts/Adjustor_CC_OPTS += -Wno-strict-prototypes $(LIBFFI_CFLAGS)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5743#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list