Patch: FYI: Fix pr11951 JNI test case

Ranjit Mathew rmathew@gmail.com
Thu May 6 05:54:00 GMT 2004


Bryce McKinlay wrote:
> This patch adds a missing System.loadLibrary() call to this test case. 
> Odd that it wasn't failing before.

That's because in "libjava.jni/jni.exp", gcj_jni_test_one()
explicitly adds "-L. -l$main" to the compilation flags
and in "lib/libjava.exp", gcj_invoke() adds "." to
LD_LIBRARY_PATH.

I don't know whether this is an intended shortcut to
avoid having to write System.loadLibrary() calls in the
testcases or whether this is an oversight/bug.

What I don't understand is why the linker would leave
a reference to libpr11951.so even though nothing gets
linked in from there (or does it?) - this can be verified
by an "ldd" on the "a.out" created by adding
"-L. -lpr11951".

:-/

Ranjit.

-- 
Ranjit Mathew          Email: rmathew AT gmail DOT com

Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/



More information about the Java-patches mailing list