From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15892 invoked by alias); 16 Jun 2011 14:33:36 -0000 Received: (qmail 15875 invoked by uid 22791); 16 Jun 2011 14:33:35 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_GC,TW_LG,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 16 Jun 2011 14:33:20 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id 40084B005D for ; Thu, 16 Jun 2011 10:33:19 -0400 (EDT) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id p5GEXJ0e012601 for java@gcc.gnu.org; Thu, 16 Jun 2011 10:33:19 -0400 Date: Thu, 16 Jun 2011 14:33:00 -0000 From: Jack Howarth To: java@gcc.gnu.org Subject: why doesn't libgcj link against libiconv? Message-ID: <20110616143319.GA11931@bromo.med.uc.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00020.txt.bz2 I am running into a very odd bug on darwin with both gcc-4_6-branch and gcc trunk. Last year I added a patch to insure that when gcc was built with -with-libiconv-prefix=/sw, that libgcj.spec would provide the necessary linkage "-L/sw/lib -liconv" to access the correct libiconv. For some unknown reason the installed libgcj.spec now loses LDLIBICONV. The weird part is that the libgcj.spec generated in the build directory still has it... [MacPro:~] howarth% cd /sw/src/fink.build/gcc47-4.7.0-1000/darwin_objdir/x86_64-apple-darwin11.0.0/libjava [MacPro:darwin_objdir/x86_64-apple-darwin11.0.0/libjava] howarth% more libgcj.spec # # This spec file is read by gcj when linking. # It is used to specify the standard libraries we need in order # to link with libgcj. # %rename startfile startfileorig *startfile: %(startfileorig) %rename lib liborig *lib: %{s-bc-abi:} -lgcj -L/sw/lib -liconv -lz %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}} %(libgcc) %(liborig) -no_pie *jc1: -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions but the installed libgcc.spec doesn't... [MacPro:~] howarth% cd /sw/lib/gcc4.7/lib [MacPro:lib/gcc4.7/lib] howarth% more libgcj.spec # # This spec file is read by gcj when linking. # It is used to specify the standard libraries we need in order # to link with libgcj. # %rename startfile startfileorig *startfile: %(startfileorig) %rename lib liborig *lib: %{s-bc-abi:} -lgcj -lz %{!Zdynamiclib:%{!Zbundle:-allow_stack_execute}} %(libgcc) %(liborig) -no_pie *jc1: -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions Note that I hardcoded -no_pie I added to libgcj.spec.in is retained. I am wondering if we really need to have @LDLIBICONV@ in libgcj.spec.in to solve this. Why can't we simply pass @LDLIBICONV@ to the linkage of libgcj itself so that libgcj,dylib is directly linked against the appropriate libiconv to resolve those iconv symbols? Would this approach be acceptable? Jack