This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -findirect-dispatch: broken on Linux, working on Mingw?


Andrew Haley wrote:
Marco Trudel writes:
> Andrew Haley wrote:
> > Marco Trudel writes:
> > > Andrew Haley wrote:
> > > > Marco Trudel writes:
> > > > > Andrew Haley wrote:
> > > > > > Marco Trudel writes:
> > > > > > > > > > > Is there a better way to solve this problem?
> > > > > > > > > > > > > > Notice this fragment:
> > > > > > > > -lgcc -lgcj_bc -lm
> > > > > > > > shouldn't be there. -lgcj_bc should only be linked when linking
> > > > dynamically. It should be > > > > > > > > -lgcc -lgcj -lm
> > > > > > Well then, lets take your suggested line:
> > > *lib: %{static-libgcj:-non_shared -lgcj > > > -call_shared;:%{s-bc-abi:-lgcj_bc;:-lgcj}} -lm -lpthread -lrt -ldl > > > %(libgcc) %(liborig)
> > > and change it to:
> > > *lib: %{static-libgcj:-non_shared -lgcj > > > -call_shared;:%{s-bc-abi:-lgcj;:-lgcj}} -lm -lpthread -lrt -ldl > > > %(libgcc) %(liborig)
> > > > My suggestion is
> > > > *lib: -lgcj -lm -lpthread -lrt -ldl %(libgcc) %(liborig)
> > Sorry, I wasn't sure if you meant this as suggestion or if you meant > that I just should stay with the default. This prints "gcj: unrecognized > option '-s-bc-abi'" as warning but otherwise works.


OK, rewrite that to

*lib: %{s-bc-abi:} -lgcj -lm -lpthread -lrt -ldl %(libgcc) %(liborig)

Yes, that finally does the trick.


Now, I'm very confused.  I don't know why you are getting all this
stuff in Windows.  It shouldn't be there.  The logic (in configure.host)
that controls this is:

case "${host}" in
*linux*|*-kfreebsd*-gnu)
use_libgcj_bc=yes
;;
*)
use_libgcj_bc=no
;;
esac

In my build dir:


config.log:
USE_LIBGCJ_BC_FALSE='#'
USE_LIBGCJ_BC_TRUE=''

config.status:
s,@USE_LIBGCJ_BC_TRUE@,,;t t
s,@USE_LIBGCJ_BC_FALSE@,#,;t t

4 Makefiles:
USE_LIBGCJ_BC_FALSE = #
USE_LIBGCJ_BC_TRUE =


Are these correct? In config.log for instance, I also see: USING_BOEHMGC_FALSE = # USING_BOEHMGC_TRUE = Since I configure with "--enable-java-gc=boehm", I would assume that no value means to set it. So USING_BOEHMGC_TRUE and USE_LIBGCJ_BC_TRUE should be set.

BTW, in my host=Windows target=Linux GCC, I also have a libgcj_bc.a,
libgcj_bc.so.1 and libgcj_bc.so.1.0.0. These shouldn't have been built
either, right?

Without use_libgcj_bc set to "yes" you should get the simple *lib line
above.  There should be no references to -lgcj_bc.

What about the the host=Linux target=Linux compiler? -findirect-dispatch doesn't work either. So I end up with a wrong *lib line there too. And I guess there I really have LIBGCJ_BC.

So, I don't know where your strage Windows *lib line came from.

And what about my Linux one?



thanks Marco


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]