These flags are only used for creating static GHCi libraries
(HS*.o). Setting them to ${LDFLAGS} does more harm than good because
our ${LDFLAGS} contains -Wl,* flags. It's true that
../../mk/wrapper/cmd-sink-ld transforms them but those flags will also
be baked into the compiler (see ${WRKSRC}/compiler/ghc.mk) so they
cause problems when used outside the buildlink.
In Haskell FFI, "ccall" is actually an interface to C ABI rather than
C API. That is, GHC generates direct references to the symbol even if
it's actually defined as a cpp macro or something like that, because
GHC knows nothing about those macros in foreign headers.
I will later send these patches to the upstream.
Based on wip/ghc, mostly worked by phonohawk, with patches from jperkin@.
And some modifications and buit of Bootstrap binaries for 7.6.3 by me.
GHC: The Glasgow Haskell Compiler.
The Glasgow Haskell Compiler is a robust, fully-featured, optimising
compiler for the functional programming language Haskell 98
(http://www.haskell.org). GHC compiles Haskell to either native code
or C. It implements numerous experimental language extensions to
Haskell, including concurrency, a foreign language interface, several
type-system extensions, exceptions, and so on. GHC comes with a
generational garbage collector, a space and time profiler, and a
comprehensive set of libraries.