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: libgcj linking and licensing issues


Jim Plak wrote:

Question 1:
Based on the special exception I know if I statically
link with libgcj (and libgcc) I'm OK. I found,
however, that building a shared object (using -shared)
that statically links libgcj and libgcc was somewhat
difficult.

In the end I
had to modify libgcj.spec, replacing -lgcj with
/usr/local/lib/libgcj.a. This produced the desired
result but it is unclear to me if this is the
"correct" way to do such a thing. Thoughts?


This isn't really a supported configuration. I would expect that linking libgcj.a into a .so would not work because libgcj.a is not built as PIC code. But I guess you can tweak the build to make a PIC libgcj.a.

Question 2: As an alternative to the results from Question 1 I
would also like to ship the library with dynamic links
to libgcj.so and libgcc.so. Can I do this? Can I also
ship the actual libgcj.so and libgcc.so binaries on
which the library will depend?


Sure, there is no reason why you can't do this. The exception statement does not differentiate between shared and static linking.

Bryce


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