semi-static linux binary

Jeff Sturm jsturm@one-point.com
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 libgcj.so.4.0.0 by renaming it.

All you really need to do is move or remove libgcj.so.  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.

Jeff



More information about the Java mailing list