This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PATCH] Don't link ecj1 against libgcj.so.* (PR libgcj/38396)
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org, Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Thu, 18 Dec 2008 13:21:33 +0100
- Subject: Re: [PATCH] Don't link ecj1 against libgcj.so.* (PR libgcj/38396)
- References: <20081218093733.GW17496@tyan-ft48-01.lab.bos.redhat.com> <494A248A.2060203@redhat.com> <494A2C7E.9070400@gnu.org> <494A2DDA.6020407@redhat.com>
> Which of those OSes support libgcj_bc.so? None, I think.
Hmm, yes, none.
> Despite my crossness about how this happened, I'm tempted to accept
> Jakub's patch because it's less intrusive than mine.
I'll leave to you. What I did not undersstand by the way is why, for
!ENABLE_SHARED, the specs do not already include -lgcj.
In other words, something like this, if it works at all, should fix the PR:
Index: configure.ac
===================================================================
--- configure.ac (revisione 134435)
+++ configure.ac (copia locale)
@@ -983,9 +983,11 @@ AC_CONFIG_LINKS(sysdep/locks.h:sysdep/$s
AC_CONFIG_LINKS(sysdep/backtrace.h:$fallback_backtrace_h)
AC_CONFIG_LINKS(sysdep/descriptor.h:$descriptor_h)
+case "$use_libgcj_bc:$enable_shared" in
+ yes:yes) LIBGCJ_SPEC="%{s-bc-abi:-lgcj_bc;:-lgcj}"
+ yes:no) LIBGCJ_SPEC="%{s-bc-abi:-lgcj_bc} -lgcj"
+ no:*) LIBGCJ_SPEC="%{s-bc-abi:} -lgcj"
+esac
LIBGCJ_SPEC="%{s-bc-abi:} -lgcj"
-if test "$use_libgcj_bc" = yes; then
- LIBGCJ_SPEC="%{s-bc-abi:-lgcj_bc;:-lgcj}"
-fi
AC_SUBST(LIBGCJ_SPEC)
Index: Makefile.am
===================================================================
--- Makefile.am (revisione 134435)
+++ Makefile.am (copia locale)
@@ -711,7 +711,7 @@ gij_LDADD = -L$(here)/.libs libgij.la
gij_DEPENDENCIES = libgij.la
## Build an ecjx from a .jar.
-ecjx_SOURCES =
+ecjx_SOURCES = dummy.cc
## We use the BC ABI here so that we don't need to compile ecj.jar.
## Hopefully the user has compiled it into his system .db.
## However, even if not it will run reasonably quickly.
@@ -732,6 +732,6 @@ else !ENABLE_SHARED
endif !ENABLE_SHARED
-ecjx_LDADD = -L$(here)/.libs libgcj.la
+ecjx_LDADD = -L$(here)/.libs
ecjx_DEPENDENCIES = libgcj.la libgcj.spec
if USE_LIBGCJ_BC
ecjx_DEPENDENCIES += libgcj_bc.la
Paolo