
Per Larsson wrote:
[...] Is there a GHC switch that I have missed that enables you to statically link the parts of libc that is used by the haskell program? [...]
Passing "-static" to the GNU linker results in a, well, statically linked program. :-) Using "-optl -static" with GHC does what you want, see: http://haskell.org/ghc/docs/latest/html/users_guide/options-phases.html#FORC... And here the proof: panne@jeanluc:> ghc --make -optl -static Main.hs Chasing modules from: Main.hs Compiling Main ( Main.hs, Main.o ) Linking ... panne@jeanluc:> file a.out a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, statically linked, not stripped panne@jeanluc:> ldd a.out not a dynamic executable For non-GNU linkers consult the man pages for "ld", differing linking techniques are one of the most annoying incompatibilities between different *nices IMHO. Cheers, S.