static linking with ghc

Patrick Scheibe mai99dnn at
Sat Mar 26 09:11:43 EST 2005


I have a programm which is linked against some shared object libraries. Now I 
want to run my prog on a different machine (but same type, x86 linux). So I 
took the compiled prog and the needed .so files, put both in one directory 
and tried it on the other machine. That worked fine.

Is it possible to tell ghc to take all stuff out of the .so libs and compile 
my source to a "all-including" executable?
I know that ghc just calls the linker which is doing this part. The --static 
flag for the linker just says: "take the static library if possible for 
But I don't have a static version of these libs and I don't want to recompile 
all libraries.

Am I totally wrong?
Is this possible in general?
Are there some good papers except of the "man ld"??


More information about the Glasgow-haskell-users mailing list