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]

Re: Converting a JAR into a gcj-statically-linked SO


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]