From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26530 invoked by alias); 16 Apr 2013 08:36:01 -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 26492 invoked by uid 89); 16 Apr 2013 08:36:00 -0000 X-Spam-SWARE-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,TW_GC,TW_LG autolearn=ham version=3.3.1 X-Spam-User: qpsmtpd, 2 recipients Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 16 Apr 2013 08:35:31 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 935B2A5527; Tue, 16 Apr 2013 10:35:29 +0200 (CEST) From: Andreas Schwab To: java-patches@gcc.gnu.org Subject: [PATCH] Fix linking with -findirect-dispatch Cc: gcc-patches@gcc.gnu.org X-Yow: OVER the undertow! UNDER the overpass! Around the FUTURE and BEYOND REPAIR!! Date: Tue, 16 Apr 2013 08:36:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-q2/txt/msg00020.txt.bz2 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. diff --git a/libjava/configure.ac b/libjava/configure.ac index ba6b363..d378125 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -266,7 +266,7 @@ if test "$enable_libgcj_sublibs" = yes ; then # words in the string and you're relying on the ordering to # append the correct one. libgcj_spec_lgcj_override="-lgcj-noncore -lgcj" - libgcj_spec_lgcj_bc_override="-lgcj-noncore -lgcj_bc" + libgcj_spec_lgcj_bc_override="-lgcj-noncore -lgcj_bc -lgcj" fi @@ -1165,7 +1165,7 @@ AC_CONFIG_LINKS(sysdep/backtrace.h:$fallback_backtrace_h) AC_CONFIG_LINKS(sysdep/descriptor.h:$descriptor_h) LIBGCJ_SPEC_LGCJ=-lgcj -LIBGCJ_SPEC_LGCJ_BC=-lgcj_bc +LIBGCJ_SPEC_LGCJ_BC="-lgcj_bc -lgcj" if test x"$libgcj_spec_lgcj_override" != x ; then LIBGCJ_SPEC_LGCJ=$libgcj_spec_lgcj_override fi -- 1.8.2.1 -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."