public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dave Korn <dave.korn.cygwin@googlemail.com>
To: Andrew Haley <aph@redhat.com>
Cc: Dave Korn <dave.korn.cygwin@googlemail.com>,
	  Java Patches <java-patches@gcc.gnu.org>,
	 GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] [4.5 regression] Fix PR42811: java.lang.ExceptionInInitializerError  in ecj1 and associated issues.
Date: Mon, 22 Feb 2010 16:49:00 -0000	[thread overview]
Message-ID: <4B82B9B4.7070306@gmail.com> (raw)
In-Reply-To: <4B825892.6060008@redhat.com>

On 22/02/2010 10:12, Andrew Haley wrote:

>>   Bootstrapped and tested on i686-pc-cygwin; fixes PR42811 and doesn't cause
>> any further regressions (there are some preexisting fails that this makes no
>> difference to).  OK for head?
> 
> A couple of things:
> 
> 1.  Bounce the gc changes off gcSPLATnapali.hpl.hp.com .

  Certainly shall, I imagine Hans will be expecting me to.  (It'll take me
some work though, the patch doesn't apply cleanly against upstream cvs, I
already checked; I'll need to verify how much has changed and make sure the
patch is still correct wrt. any internals differences.)

> 2.  Is it really necessary to make the main program depend on a symbol
>     in libgcj-noncore when BC compiling?  Can't you make the libgcj
>     itself depend on libgcj-noncore?

  I probably could, in stage 1, but it would require a large amount of build
system hackery that I don't want to risk at stage 3.  The noncore dll already
depends on the core dll, so if I added a dependency the other way round we'd
have a circular loop.  You can only link a DLL if it's fully resolved
(critical difference from ELF DSOs there), so whichever one we tried to link
first, it would have missing imports from the other.  There is a way round
that, we could use 'dlltool' to build just an import stub library for one of
them separately, first, then fully link the other, generating its own import
library in the process that would let libtool link the original library in the
first place.  But... that would require having a complete list of exports (to
make a .DEF file), and we don't have such a list either, we just have a
version script with some pattern matches; so we'd have to build the dll fully
and find out which symbols did actually get hidden and which made visible ....
at which point we'd have an import library anyway.  So probably the only way
to make it work would be to invoke libtool twice for the same library, once to
build the core dll without this dependency, so that we can then link (and
fully resolve) the noncore dll, and once again after linking the noncore dll,
to relink a version of the core dll with the dependency against the noncore
one added this time round.  (On slightly deeper thought, it might be possible
to generate a fake import stub library, just for the purpose of linking the
core dll, with a single import for the one manually chosen symbol that I'm
using anyway, but I haven't tested that theory yet; I'm making it up as I type
here.)

  So, yeh, I've thought about it, because until I figured out a partitioning
which only had dependencies in one direction, I thought I was going to have to
do it that way all along, and avoiding having to do so was the reason I chose
to try and partition the libraries according to the dependencies between the
object files in the first place.  (That worked, so I stopped thinking about it!)

  If we can think of a non-ugly way of making a circular dependency between
the two libraries, we can change that in the future and stop adding this
dependency to executables without affecting binary compatibility in any way
either forward- or backward-, but I can't really envisage any actual benefits
from doing so, apart from things being a bit conceptually cleaner and nicer,
unless I've overlooked something?  (Do we have to ever worry about anyone
trying to link java applications using 'ld' directly and avoiding the gcj
driver and its specs?  I wouldn't have expected so!)

  Anyway, that's why I figured on taking the simple approach right now; it'll
work, and it's simple, and we can change it without problems in the future.

  Stage 3 probably isn't going to finish this week, but it probably isn't
going to last much longer either.  How about we commit this one now, as
insurance against the branch getting cut, but I also go ahead and see if I can
figure out how to get the dlltool-plus-fake-DEF-file trick working as well; if
I can get it to work while stage 3 is still running, we can revert the change
to the specs at the same time.  OK?

    cheers,
      DaveK

  reply	other threads:[~2010-02-22 16:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-20 18:18 Dave Korn
2010-02-22 10:12 ` Andrew Haley
2010-02-22 16:49   ` Dave Korn [this message]
2010-03-19 15:55     ` Dave Korn
2010-03-20 14:29   ` [PATCH,final respin] " Dave Korn
2010-03-20 18:17     ` Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B82B9B4.7070306@gmail.com \
    --to=dave.korn.cygwin@googlemail.com \
    --cc=aph@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=java-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).