This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
"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.
Andrzej> * it's not supported, because it's broken in some well-defined cases
Any code that uses reflection will not work properly. This is a
problem because parts of the core class library depend on reflection.
For instance, character set translators and locales are loaded this
way.
You can work around this by explicitly linking in the ones you need,
but you need to know some internal details of libgcj to make this
work. We've talked occasionally of adding compiler options to make
this simpler, but nobody has done that yet.
It would be helpful if someone wrote a page for the gcc wiki about
static linking.
-- Best regards, Andrzej Bialecki <>< ___. ___ ___ ___ _ _ __________________________________ [__ || __|__/|__||\/| Information Retrieval, Semantic Web ___|||__|| \| || | Embedded Unix, System Integration http://www.sigram.com Contact: info at sigram dot com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |