semi-static linux binary

Jeff Sturm
Thu Oct 23 17:24:00 GMT 2003

On Thu, 23 Oct 2003, Geoff Strom wrote:
> Here's what works for me to produce a semi-static binary under linux
> (using gcc 3.3.1):
> 1) hide by renaming it.

All you really need to do is move or remove  That is the file
ld looks for.

Hmm... this seems to be desired often enough that a -static-libgcj flag
might be worthwhile.

> 2) export LD_LIBRARY_PATH=.
> 3) use -static-libgcc when linking your binary (don't use -static)

This works for me, too.


More information about the Java mailing list