public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Making -findirect-dispatch the default?
@ 2009-12-19 11:44 Herman ten Brugge
  2009-12-19 17:27 ` Andrew Haley
  0 siblings, 1 reply; 2+ messages in thread
From: Herman ten Brugge @ 2009-12-19 11:44 UTC (permalink / raw)
  To: java

I would like to make a suggestion to make the "-findirect-dispatch" the 
default when compiling code with gcj.

If you do not do this you some times get the message:

"Incorrect library ABI version detected.  Aborting."

This is really puzzling the first time you see it. You compiled you 
source code from scratch and
still this message is given when running it.

I found the solution on the internet and used "-findirect-dispatch" to 
solve it.
Why is this still not the default. I see that is was first introduced in the
"ftp://gcc.gnu.org/pub/gcc/summit/2004/GCJ New ABI.pdf"
because of serious ABI problems. But this was 5 years ago.

I also see that it has some performance penalties. But for optimizing 
code we
always have to use some optimizing flags. We can then supply 
"-fno-indirect-dispatch"
is we want faster code (and ABI incompatible).

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Making -findirect-dispatch the default?
  2009-12-19 11:44 Making -findirect-dispatch the default? Herman ten Brugge
@ 2009-12-19 17:27 ` Andrew Haley
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Haley @ 2009-12-19 17:27 UTC (permalink / raw)
  To: Herman ten Brugge; +Cc: java

Herman ten Brugge wrote:
> I would like to make a suggestion to make the "-findirect-dispatch" the 
> default when compiling code with gcj.
> 
> If you do not do this you some times get the message:
> 
> "Incorrect library ABI version detected.  Aborting."
> 
> This is really puzzling the first time you see it. You compiled you 
> source code from scratch and
> still this message is given when running it.

No, you only get this if you install binaries that are not compatible
with the installed libraries.  If you build with the same version you'll
be fine.

> I found the solution on the internet and used "-findirect-dispatch" to 
> solve it.
> Why is this still not the default. I see that is was first introduced in the
> "ftp://gcc.gnu.org/pub/gcc/summit/2004/GCJ New ABI.pdf"
> because of serious ABI problems. But this was 5 years ago.

Well, these were not, exactly, problems, although they could be.
gcj defaults to the same ABI that C++ uses.

> I also see that it has some performance penalties. But for optimizing 
> code we
> always have to use some optimizing flags. We can then supply 
> "-fno-indirect-dispatch"
> is we want faster code (and ABI incompatible).

There are not many packages that depend on gcj's "old" ABI, the default.
But there are some, and these include all of the packages that use CNI.
If we change the default, we will break their build scripts.  This is a
Bad Thing.  If indirect dispatch worked with CNI, this would be much
easier, but it doesn't.

gcc is in stage 3: bug fixes only.  While there is considerable merit
in making indirect dispatch the dafault, this isn't the time to make
such an ABI-breaking change.

Andrew.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-19 17:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-19 11:44 Making -findirect-dispatch the default? Herman ten Brugge
2009-12-19 17:27 ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).