I'm currently developing some web application written in Haskell. All Haskell libraries are statically linked; although this "bloats" the executable, it not so much of a problem since it will be the only Haskell programm running on the server.
However, I'd also like to get rid on the dependency on libgmp.so
, i.e. I would like to link the multiprecision library statically into the program as well, but keep all the other system libraries (such as pthread, libc, and libm) dynamically linked.
Which linker switches to ghc do that trick?
EDIT to account for a side question
Is it possible to disable default linkage of the standard libraries, that are pulled in by default into every Haskell programm? Something like the GCC-equivalent to -nostdlib
?