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: libgcj on MMUless (aka uClinux) systems...


>>>>> "David" == David Daney <ddaney@avtrex.com> writes:

David> Does anyone know of ports of libgcj to libgcj on MMUless
David> systems?  Or more specifically to uClinux running on an ARM
David> core?

Offhand I don't know of any up-to-date ports.  Anthony might.

The very first port was to a machine like this.  In fact it didn't
have an OS at all, and we used a longjmp()-based cooperative threading
system.

David> If the answer is no, how hard would it be?

Probably not very hard.  You need to arrange for -fcheck-references to
end up in libgcj.spec; that is easily done via `can_unwind_signal=no'
in configure.host (though that also causes use of the divide
subroutine, which may not be what you want -- though it appears ARM
doesn't have MD_FALLBACK_FRAME_STATE_FOR, so this should be just
right).

David> I am thinking that it could be quite difficult as the Boehm GC seems
David> to rely on SIGSEGV for some stack probing IIRC.  It seems that at a
David> minimum there would be hacking required on the GC.

Yes, you may need to hack the GC a bit.  However, this isn't as bad as
you fear, since the GC actually already has several approaches for
finding stack bounds.  You would simply need to teach it how to do
that on your target machine.  In the early port referred to above, we
did it by writing an implementation of `GC_push_all_stacks' that knew
how to find the stack bounds.  (For uClinux you may be able to do
something simpler -- anyway it shouldn't be too bad.)

The biggest drawback of this is that CNI currently doesn't have null
pointer checking, and the CNI code in the library generally doesn't do
null checks.  Andrew once had a g++ patch for this, but it was
rejected; we hope to instead use smart pointers as part of the new ABI
work, but this is far from finished.

Tom


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