This is the mail archive of the java-discuss@sourceware.cygnus.com 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]

Re: Big Project Ported


Steven Ashe wrote:
> 6) mysteries I found some adhoc solution to.
>    The most perplexing is the J?? undefined message.  When compiling from
>    .java, sometimes I get undefined's with short names (I don't remember
>    them exactly, something like ?J?? that don't correspond to any symbols
>    in the .java file).  However, if I compile to .class with jikes or javac
>    first, and go to .o from that, this fixes the problem.
>    Also, when I took libgcj-2.95.1 and tried to build it with -02, it
>    had the exact same problem when trying to link 'javaconvert' or some
>    such-named utility.

I saw this frequently in the early compilers, and have been unable to
build an optimized libgcj for that reason.  Recent snapshots are much
better.  I finally built libgcj successfully with -O2 using the 10/13
snapshot.

I would have filed a bug report, but it seems to be fixed...

> 8) Misc: Needing to make the calls to loadLibrary conditional on gcj compilation;
>    in the gcj-built executable there is no need to dynamically link, so I
>    conditionally bypass these calls.  I can't think of anything gcj itself
>    can do about this.  Also, it sure seems like the no-threads runtime spends
>    a lot of instructions, esp. during instantiation, doing threads-related
>    stuff (mutexes/monitors?) before it discovers there are no threads. [This
>    may be my misunderstanding of what the code is doing]

Perhaps instead of conditional compilation you can wrap calls to
System.loadLibrary() around try/catch and ignore the exception from
libgcj?

The runtime startup code is confusing... it would sure be nice to have
it documented at some point.

-- 
Jeff Sturm
jsturm@sigma6.com

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