Building static libraries with -fPIC

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Building static libraries with -fPIC

Nikolay Amiantov
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)?

Thanks,
Nikolay.
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe