This is the mail archive of the mailing list for the GCC 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]

[PATCH] Fix boehm-gc build on Cygwin

    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
collect2: ld returned 1 exit status

make[3]: *** [] Error 1

  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.


	* win32_threads.c (GC_get_thread_stack_base):  Implement for Cygwin.



Index: boehm-gc/win32_threads.c
--- boehm-gc/win32_threads.c	(revision 147215)
+++ boehm-gc/win32_threads.c	(working copy)
@@ -753,6 +753,12 @@
     return result;
+GC_PTR GC_get_thread_stack_base()
+  extern GC_PTR _tlsbase __asm__ ("%fs:4");
+  return _tlsbase;
 #else /* !CYGWIN32 */

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