This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[libjava, testsuite] Link jni tests with -liconv on Tru64 UNIX
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Cc: java-patches at gcc dot gnu dot org
- Date: Fri, 15 Apr 2011 19:08:39 +0200
- Subject: [libjava, testsuite] Link jni tests with -liconv on Tru64 UNIX
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