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

Andrew Haley aph@redhat.com
Thu Dec 18 12:47:00 GMT 2008


Paolo Bonzini wrote:
>> 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:

I don't think this bug has anything to do with ENABLE_SHARED.  Not that
I have any objection to the change to the specs, which looks correct,
but surely that's another issue.

FWIW, I can't see any way that libgc_bc.so and static linkage can ever
do anything useful, so it's a don't care...

Andrew.

> 
> 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