public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [libjava, testsuite] Link jni tests with -liconv on Tru64 UNIX
@ 2011-04-15 17:11 Rainer Orth
  0 siblings, 0 replies; only message in thread
From: Rainer Orth @ 2011-04-15 17:11 UTC (permalink / raw)
  To: gcc-patches; +Cc: java-patches

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*.

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
 }
 

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-15 17:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-15 17:11 [libjava, testsuite] Link jni tests with -liconv on Tru64 UNIX Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).