Static executables
Andrew Haley
aph@redhat.com
Tue Jan 31 12:01:00 GMT 2006
Tom Tromey writes:
> >>>>> "Andrzej" == Andrzej Bialecki <ab@getopt.org> writes:
>
> Andrzej> The question is: is it possible to build static binaries on Linux/BSD,
> Andrzej> and if yes, what is the right incantation to do this, for input files
> Andrzej> consisting of a mix of *.java, *.jar, and JNI *.o objects? Eg. if I'm
> Andrzej> using Fedora Core 4, which sports gcc 4.0.2, whenever I try to pass
> Andrzej> the -static flag, the compiler complains that static compilation is
> Andrzej> not supported.
>
> Funny, I didn't realize that this error was in there.
> I don't remember this decision.
It's a Fedora-only thing. If people really want to do this they can
build their own gcj from upstream. Static linkage on Linux is likely
to be deprecated anyway, not just for gcj: you don't want a private
copy of the resolver library in your executable.
Andrew.
More information about the Java
mailing list