diff mbox

[libjava,testsuite] Link jni tests with -liconv on Tru64 UNIX

Message ID yddipufa1d4.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth April 15, 2011, 5:08 p.m. UTC
While checking Tru64 UNIX libjava testsuite results, I noticed that the
libjava.jni/invocation/PR16923.c execution test was failing like this:

277710:./PR16923: /sbin/loader: Error: libgcj.so.12: symbol "iconv" unresolved
277710:./PR16923: /sbin/loader: Fatal Error: Load of "./PR16923" failed: Unresolved symbol name
FAIL: PR16923 run
UNTESTED: PR16923 output

This happens because the test isn't linked with gcj (which handles this
in libgcj.spec), but with gcc, which does not.  Perhaps this could (and
should) be done, or rather libgcj.so always linked with -liconv on
targets that require that, but I chose the easy way out for now,
following the Darwin lead.

Tested with the appropriate runtest invocation (which unfortunately
means running all of jni.exp, not just the single testcase, installed on
mainline, 4.5 and 4.6 branches.

	Rainer


2011-04-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
	Add $libiconv to cxxflags for alpha*-dec-osf*.

Comments

Tom Tromey April 18, 2011, 1:13 p.m. UTC | #1
>>>>> "Rainer" == Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

Rainer> 2011-04-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
Rainer> 	* testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
Rainer> 	Add $libiconv to cxxflags for alpha*-dec-osf*.

This is ok, thanks.

Tom
diff mbox

Patch

diff --git a/libjava/testsuite/libjava.jni/jni.exp b/libjava/testsuite/libjava.jni/jni.exp
--- a/libjava/testsuite/libjava.jni/jni.exp
+++ b/libjava/testsuite/libjava.jni/jni.exp
@@ -280,6 +280,11 @@  proc gcj_jni_get_cxxflags_invocation {} 
     lappend cxxflags "-shared-libgcc"
   }
 
+  # Tru64 UNIX needs -liconv linked explicitly since gcc does the linking.
+  if { [istarget "alpha*-dec-osf*"] } {
+    lappend cxxflags $libiconv
+  }
+
   return $cxxflags
 }