This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Don't link ecj1 against libgcj.so.* (PR libgcj/38396)
- From: Andrew Haley <aph at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Paolo Bonzini <bonzini at gnu dot org>, Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 18 Dec 2008 10:23:06 +0000
- Subject: Re: [PATCH] Don't link ecj1 against libgcj.so.* (PR libgcj/38396)
- References: <20081218093733.GW17496@tyan-ft48-01.lab.bos.redhat.com>
Jakub Jelinek wrote:
> When libjava is configured --with-ecj-jar=/some/path/eclipse-ecj.jar,
> ecj1 is linked against both libgcj_bc.so.1 (because if USE_LIBGCJ_BC
> it is compiled/linked with -findirect-dispatch) and libgcj.so.*
> (because of explicit LDADD). Now if such ecj1 linked say against
> libgcj.so.9 in GCC 4.3 is run against libgcj_bc.so.1 from GCC 4.4 build,
> libgcj_bc.so.1 depends on libgcj.so.10 and so ecj1 dynamically links against
> both libgcj.so.9 and libgcj.so.10, which is fatal.
> Java programs either have to be linked against libgcj.so.* only, no
> libgcj_bc.so.1 (for direct dispatch), or only against libgcj_bc.so.1
> and no libgcj.so.*.
>
> The following patch fixes it, tested on x86_64-linux.
> The addition of dummy ecjx.cc was needed, because otherwise ecjx would
> be without any sources, which confuses libtool.
> Ok for trunk (and after some time also 4.3)?
No. It's in conflict with the patch that I already wrote and posted
to the list, and I'm about to commit.
Andrew.