This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: semi-static linux binary
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Geoff Strom <stromgt at speakeasy dot net>
- Cc: Norbert Frese <postfach at nfrese dot net>, <java at gcc dot gnu dot org>
- Date: Thu, 23 Oct 2003 13:24:00 -0400 (EDT)
- Subject: Re: semi-static linux binary
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