From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22432 invoked by alias); 16 Apr 2013 08:59:38 -0000 Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org Received: (qmail 22413 invoked by uid 89); 16 Apr 2013 08:59:37 -0000 X-Spam-SWARE-Status: No, score=-5.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_GC autolearn=ham version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from mail-we0-f181.google.com (HELO mail-we0-f181.google.com) (74.125.82.181) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 16 Apr 2013 08:59:37 +0000 Received: by mail-we0-f181.google.com with SMTP id r6so176831wey.40 for ; Tue, 16 Apr 2013 01:59:34 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.91.106 with SMTP id cd10mr2114471wib.6.1366102774815; Tue, 16 Apr 2013 01:59:34 -0700 (PDT) Received: by 10.194.5.9 with HTTP; Tue, 16 Apr 2013 01:59:34 -0700 (PDT) In-Reply-To: <20130416083855.GM12880@tucnak.redhat.com> References: <20130416083855.GM12880@tucnak.redhat.com> Date: Tue, 16 Apr 2013 08:59:00 -0000 Message-ID: Subject: Re: [PATCH] Fix linking with -findirect-dispatch From: Bryce McKinlay To: Jakub Jelinek Cc: Andreas Schwab , Java Patch List , GCC Patches Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-q2/txt/msg00022.txt.bz2 On Tue, Apr 16, 2013 at 9:38 AM, Jakub Jelinek wrote: > On Tue, Apr 16, 2013 at 10:35:29AM +0200, Andreas Schwab wrote: >> Linking with -findirect-dispatch fails with this error: >> >> x86_64-linux-gcj -o ecjx -findirect-dispatch --main=org.eclipse.jdt.internal.compiler.batch.GCCMain ../../../gcc/libjava/../ecj.jar ecjx.o >> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: /tmp/ccppO92n.o: undefined reference to symbol '_Jv_MonitorExit' >> /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: note: '_Jv_MonitorExit' is defined in DSO /usr/lib64/libgcj.so.13 so try adding it to the linker command line >> >> Andreas. >> >> * configure.ac (LIBGCJ_SPEC_LGCJ_BC): Append -lgcj. >> (libgcj_spec_lgcj_bc_override): Likewise. >> * configure: Regenerate. > > That doesn't look right, if -findirect-dispatch now newly needs > _Jv_MonitorExit (when has that been added?), then the symbol should > be added to libgcj_bc.so. That's right. -findirect-dispatch code should not link libgcj directly. _Jv_MonitorExit has always been defined in libgcj_bc (see libgcj_bc.c), so something else is going wrong here. Bryce