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: libjava threads vs no-threads?


On 23 April 2007 05:43, David Daney wrote:

> Brian Dessent wrote:
>> David Daney wrote:
>> 
>>> It used to work, but as Mohan mentioned has suffered bit rot.  The best
>>> case would be to restore it to working order.
>>> 
>>> The threads setting should default to the proper value.  If you are
>>> getting failures, then you are either asking for a broken configuration
>>> which should be fixed, or you are specifying an invalid combination in
>>> which case configure should be made to offer a helpful diagnostic.
>>> 
>>> It is unclear to me which of these cases you find yourself in.
>> 
>> I think what Dave is saying is that it would work if he configured with
>> --enable-threads=posix, however, if he doesn't specify anything it
>> assumes --disable-threads and fails.
> 
> I should have read more carefully.  Although not stated in the message,
> I assume That newlib is being used as that was stated in a post to gcc@.
>   So I doubt it would work with --enable-threads=posix.

  Quick summary of what I've tried so far:

configure --enable-languages=c,c++,java
 - bootstraps, gcj is built successfully, no attempt is made to build libjava.

configure --enable-languages=c,c++,java --enable-libgcj
 - bootstraps, gcj is built successfully, attempts to build target-libjava but
fails as it assumes no-threads.

configure --enable-languages=c,c++,java --enable-libgcj --enable-threads=posix
 - bootstraps, builds gcj and target-libjava, hits PR31662 and dies.

  With a patch in for PR31662, it still dies a little later with 

/gnu/gcc/obj2/gcc/gcj -B/gnu/gcc/obj2/i686-pc-cygwin/libjava/
-B/gnu/gcc/obj2/gcc/ -ffloat-store -fomit-frame-pointer -g -O2 -o
jv-convert.exe --main=gnu.gcj.convert.Convert -shared-libgcc
-L/gnu/gcc/obj2/i686-pc-cygwin/libjava
-L/gnu/gcc/obj2/i686-pc-cygwin/libjava/.libs ./.libs/libgcj.a
-L/gnu/gcc/obj2/i686-pc-cygwin/libstdc++-v3/src
-L/gnu/gcc/obj2/i686-pc-cygwin/libstdc++-v3/src/.libs -ldl
-L/gnu/gcc/obj2/./gcc -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32
-lgcc 
./.libs/libgcj.a(lt102-misc.o): In function `GC_init_inner':
/gnu/gcc/gcc/boehm-gc/misc.c:680: undefined reference to
`_GC_get_thread_stack_base'
collect2: ld returned 1 exit status
Makefile:8804: *** [jv-convert.exe] Error 1

#0  jv-convert.exe at
/repository/davek/patch-gnu/gcc/obj2/i686-pc-cygwin/libjava/Makefile:8804

  This was tested on r.124020, as head was failing for unrelated reasons at
the time I started testing over the weekend.  Christian J. is currently trying
the same test with head which appears to have been fixed now.

> I guess I would just confirm that I think using no-threads.h may be the
> proper thing to do.  But as stated several times in the thread, it has
> bit rotted some and needs fixing.  I cannot approve it, but generally
> patches to fix lesser used configurations are approved if they look sane.

  I'm flying blind here, as I don't know what libjava does with threads or
what a ParkHelper does, but would just implementing a completely dummy
do-nothing definition in no-threads.h be the right thing to try?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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