Converting a JAR into a gcj-statically-linked SO
David Daney
ddaney@avtrex.com
Wed Jan 9 10:03:00 GMT 2008
Matthijs van de Water wrote:
> On Jan 8, 2008 6:46 PM, David Daney <ddaney@avtrex.com> wrote:
>
>>> > That won't work. The static libgcj (libgcj.a) is not compiled with
>>> > -fPIC, so it cannot be used in a shared object.
>>>
>
> So this means that I cannot compile a shared library which does not
> depend on libgcj?
>
It might work on some targets. It would not work on a mips target.
> Is there any other way I can get this to work (like patching gcc to
> compile libgcj.a with -fPIC)?
>
Of course. It is free software, change it to suit your needs.
> My intended use of the resulting native code depends on the fact that
> it can be a shared library, there is no way I would be able to
> statically link it to the application.
>
> Any suggestions greatly appreciated.
>
Make sure it works with a shared libgcj before making large investments
in linking statically.
David Daney
More information about the Java
mailing list