[Gc] Re: [Fwd: [PATCH] Fix boehm-gc build on Cygwin]

Ivan Maidanski ivmai at mail.ru
Sun May 17 03:08:52 PDT 2009


Andrew Haley <aph at redhat.com> wrote:
> OK to commit?

> Andrew.

Dave Korn <dave.korn.cygwin at googlemail.com> wrote:
>     Hi all,
>   Boehm-gc doesn't currently build correctly on Cygwin; it's ok for objc, but
> libjava wants to use an interface that isn't currently fully implemented:
> ../boehm-gc/.libs/libgcjgc_convenience.a(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
> make[3]: *** [libgcj.la] Error 1

What's GC version? I guess prior to 6.8 (GC_get_thread_stack_base is not used at present).

Not sure for CVS version but with my pending patches, it could be built for Cygwin and works (including thread-local-alloc and parallel marking, but except for memory unmapping in the threaded case). Although, I can't say I've tested it much (unlike for MinGW). Not tested with GCJ directly but GCJ functionality of GC itself works OK.

Also, not sure for building scripts be up to date, I'm direct directly calling gcc like this:


To get a working copy either fetch latest CVS and apply my Cygwin-specific patches, or use this snapshot:

>   With the attached patch (which I've had in my local tree for some time now),
> it not only builds (and allows libjava to build) but passes its tests:
> Completed 3 tests
> Allocated 5694334 collectable objects
> Allocated 306 uncollectable objects
> Allocated 3557803 atomic objects
> Allocated 34418 stubborn objects
> Finalized 6603/6603 objects - finalization is probably ok
> Total number of bytes allocated is 192747548
> Final heap size is 16338944 bytes
> Collector appears to work
> Completed 137 collections
> PASS: gctest
> ==================
> All 1 tests passed
> ==================
>   Tested by building (non-bootstrap, since this is a target lib) with
> --enable-languages=c,c++,java, and running check-target-boehm-gc.
> boehm-gc/ChangeLog:
> 	* win32_threads.c (GC_get_thread_stack_base):  Implement for Cygwin.
>   Ok?
>     cheers,
>       DaveK


More information about the Gc mailing list