[PATCH] Don't link ecj1 against libgcj.so.* (PR libgcj/38396)

Andrew Haley aph@redhat.com
Thu Dec 18 10:57:00 GMT 2008


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.



More information about the Gcc-patches mailing list