From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10180 invoked by alias); 15 Apr 2011 17:11:18 -0000 Received: (qmail 10151 invoked by uid 22791); 15 Apr 2011 17:11:11 -0000 X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_50,TW_CX,TW_GC,TW_IB,TW_XX,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Apr 2011 17:10:39 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 6D357685; Fri, 15 Apr 2011 19:10:38 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id HTe+XF-J08kD; Fri, 15 Apr 2011 19:10:38 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 1E769684; Fri, 15 Apr 2011 19:10:38 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p3FHAbeq029699; Fri, 15 Apr 2011 19:10:37 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: java-patches@gcc.gnu.org Subject: [libjava, testsuite] Link jni tests with -liconv on Tru64 UNIX Date: Fri, 15 Apr 2011 17:28:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg01228.txt.bz2 Message-ID: <20110415172800.YIqyljZWb-sFcGjL6cWPqgxvo5op9dgUXV85dYkeAIc@z> 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 * 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