[PATCH] Don't link ecj1 against libgcj.so.* (PR libgcj/38396)
Paolo Bonzini
bonzini@gnu.org
Thu Dec 18 12:36:00 GMT 2008
> 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
More information about the Gcc-patches
mailing list