How to produce a statically linked binary with GHC?

Don Stewart dons at
Tue Aug 12 16:21:38 EDT 2008

>    It seems that the -static flag serves a different purpose: according to
>    the GHC manual it forces the compiler use the static Haskell libraries,
>    but the resulting binary is still dynamically linked to the C libraries.
>    What is the correct flag to create a static binary? Thanks

Pass -optl-static to GHC.

-- Don

More information about the Glasgow-haskell-users mailing list