public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: Craig Vanderborgh <craigvanderborgh@gmail.com>
Cc: java@gcc.gnu.org
Subject: Re: TROUBLE with gcj 4.1.1 for arm-wince-pe
Date: Wed, 31 Dec 2008 16:56:00 -0000	[thread overview]
Message-ID: <495BA424.3030302@redhat.com> (raw)
In-Reply-To: <7a6473990812310843g72ac2965p36df4161c1b6aa50@mail.gmail.com>

Craig Vanderborgh wrote:

> I am trying to bring up gcj 4.1.1 for arm-wince-pe, using binutils
> 2.18.50.  So far C, C++, and the binutils all seem to be working well
> for arm-wince-pe (Windows CE 5 and Windows Mobile 5/6).  The problems
> I'm having are with our older libgcj.
> 
> After taking a close look at libgcj/classpath 4.1.1, I decided to try
> to reuse our older libgcj that's derived from gcc-3.3.  This version
> of libgcj has many fixes and enhancements we added, but more
> importantly - its use results in much smaller executables.
> 
> Porting our old libgcj-3.3 to the new 4.1.1 toolchain was a pretty
> straightforward affair.  Most of the compilation problems I had to fix
> were due to illegal access of private class members and so on.  After
> a few days of porting work, I had our libgcj-3.3 compiling under
> gcj-4.1.1.
> 
> Then all hell broke loose.  The linked test programs (e.g.
> HelloWorld.java) run, but crash early on in _Jv_CreateJavaVM.  An
> examination of the situation shows that Java classes seen from the C++
> code (e.g. in prims.cc, natClassLoader.cc, natClass.cc and so on) are
> really messed up.  In one case, with java.lang.reflect.Modifier, I
> observed that invoking the method Modifier.isAbstract(int) from C++
> with:
> 
> java::lang::reflect::Modifier::isAbstract(foo);
> 
> results in an ENTIRELY DIFFERENT METHOD being invoked.
> 
> It's so screwed up that I am completely lost and need some input.  Is
> there some *elemental* reason why I can't port libgcj-3.3 to
> gcj-4.1.1?

Yes.  We changed the ABI.

> Do I have to change some things in the gcj 4.1.1 compiler
> build to do this?  Where should I look? 

The C++ header files are the most likely cause of this problem, but
I'm sure there will be many more.

The compiler knows a great deal about the structure of the runtime
library.  For what you're doing to work you'd have to find all the
ABI changes and back-port them to the new compiler.

What you're doing is more or less equivalent to ripping the telephone
exchange out of Tokyo, dropping it into New York, and expecting it to
work.

Andrew.

      reply	other threads:[~2008-12-31 16:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-31 16:43 Craig Vanderborgh
2008-12-31 16:56 ` Andrew Haley [this message]

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=495BA424.3030302@redhat.com \
    --to=aph@redhat.com \
    --cc=craigvanderborgh@gmail.com \
    --cc=java@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).