--- Comment #8 from eduardo dot m dot costa at gmail dot com 2009-06-01
19:48 ---
(In reply to comment #7)
> Subject: Re: [arm] libjava build failure due to missing
> thread synchronization primitives
>
> >> I'm not quite sure what you're trying to do.
> >>
> >> What did you change to support arm-eabi* ?
> >
> > I changed libjava/configure.host to also support arm-eabi
> > (arm*-elf|arm*-eabi)but that probably wasn't enough. Given that arm-elf
> > appears
> > to be supported for this as per the last comment in the bug report, I
> > thought
> > it would make sense to have it working for arm-eabi.
> >
> > I decided to go back and try an arm-elf build as well just now. I get a
> > failure
> > with jni-libjvm.cc with an error about ParkHelper not naming a type. Hence
> > this
> > appears to be broken on trunk as revision 146222 for arm-elf as well as
> > arm-eabi.
>
> Probably. The java.lang.concurrent library requires thread support,
> so the only way you're going to get it to run with no threads is to
> create dummy definitions for ParkHelper. That should be easy, since
> null definitions for park() and unpark() will be fine.
>
> Just add these to libjava/no-threads.cc and libjava/include/no-threads.h.
>
> Andrew.
>
I tryed this:
libjava/include/no-threads.h
struct ParkHelper
{
void init ();
void deactivate ();
void destroy ();
void park (jboolean isAbsolute, jlong time);
void unpark ();
};
libjava/no-threads.cc
void ParkHelper::init () {}
void ParkHelper::deactivate () {}
void ParkHelper::destroy () {}
void ParkHelper::park (jboolean isAbsolute, jlong time) {}
void ParkHelper::unpark () {}
But I got more errors on libjava/sysdep/arm/locks.h (thumb mode does not
recognize swp and swpne).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32340