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: linking a .so with libgcj.a ?




On Wed, 15 Dec 2004, Andrew Haley wrote:

Basically.  But the capabilities of linkers varies widely between
systems, even when the linkers are all variants of GNU ld.

> Or did the person behind the Mingw tool chain
> do something special ? If it is smart enough to produce something
> that works on Windows, wouldn't the same apply on Linux ?

Probably. But to be sure I'd have to try it.

I'm willing to give it a try myself, is it enough to just force CCFLAGS to contain -fPIC when building libgcj.a ?


It may well be that your problem has nothing to do with PIC, but it's
worth fixing that first.  As has been pointed out in this thread,
there are other potential problems.

Yes, dynamically loading classes was mentionned. I don't do that, neither does the Java Lucene codebase which I'm compiling in.
Libgcj may do this too but I haven't hit a class load error on Windows yet where the python extension DLL is statically linked with libgcj.a and about 6 Mb in size. The project is a year old now, so I guess/hope dynamically loading classes is not a required feature in this case.


Andi..


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