[Haskell-cafe] Building static libraries with -fPIC

Nikolay Amiantov nikoamia at gmail.com
Wed Jun 18 12:01:13 UTC 2014

Hello all,

I'm trying to build a shared (.so) library written in Haskell with
"foreign export"s, which is statically linked with all needed
dependencies. To do this, as far as I understood, I need to build all
my dependencies (I use Cabal) with -fPIC flag, and also somehow get
RTS static library built with -fPIC. Two questions regarding to this:

1) How can I add a build flag which will be added while building all
my dependencies in Cabal.
2) How can I get needed RTS library.
3) How can I deal with "base"? Can I just build it with Cabal, so this
question reduces to (1)?


More information about the Haskell-Cafe mailing list