This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] Fix linking with -findirect-dispatch
- From: Bryce McKinlay <bmckinlay at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Andreas Schwab <schwab at suse dot de>, Java Patch List <java-patches at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 16 Apr 2013 09:59:34 +0100
- Subject: Re: [PATCH] Fix linking with -findirect-dispatch
- References: <mvmy5ciub3i dot fsf at hawking dot suse dot de> <20130416083855 dot GM12880 at tucnak dot redhat dot com>
On Tue, Apr 16, 2013 at 9:38 AM, Jakub Jelinek <jakub@redhat.com> 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