[Gc] Latest cvs commits

Andreas Tobler andreast-list at fgznet.ch
Thu Oct 1 13:00:19 PDT 2009


Hi Ivan,

Ivan Maidanski wrote:

> I've changed gc_pthread_redirects.h so that GC_ symbols are exported
> regardless of GC_NO_THREAD_REDIRECTS (behaving the same style as for
> Win32) and GC_USE_LD_WRAP settings (GC_USE_LD_WRAP now acts as
> GC_NO_THREAD_REDIRECTS during import). Also I've added GC_dlopen
> redirector for GC_USE_LD_WRAP case (the same is in pthread_support.c
> for GC_pthread_create and friends).
> 
> Could anybody do "make check" on OS X using the latest CVS (where is
> a minor probability that some .c file may lack include signal.h
> hoping it's always done in gc_pthread_redirects.h which does it no
> longer for Darwin)?

After a longer time I found a slot to test on darwin.

Hm, it might be that my offtime was too long and I do not know anymore 
how to build bdwgc. But for me darwin i686/x86_64 is completely broken. 
A fresh CVS co does not build at all.

A lot of duplicated symbols during link time.

Is there a new config option I miss, I usually do a configure and that's it.

The attached patch brings me back to work and all tests do pass on both, 
i686 and x86_64 darwin.

If I miss something please tell me.

Thanks,
Andreas

-------------- next part --------------
Index: allchblk.c
===================================================================
RCS file: /cvsroot/bdwgc/bdwgc/allchblk.c,v
retrieving revision 1.21
diff -u -r1.21 allchblk.c
--- allchblk.c	30 Sep 2009 17:47:48 -0000	1.21
+++ allchblk.c	1 Oct 2009 19:50:51 -0000
@@ -628,9 +628,9 @@
     return 0;
 }
 
-unsigned GC_fail_count; /* defined in alloc.c */
+extern unsigned GC_fail_count; /* defined in alloc.c */
 
-long GC_large_alloc_warn_interval; /* defined in misc.c */
+extern long GC_large_alloc_warn_interval; /* defined in misc.c */
 
 STATIC long GC_large_alloc_warn_suppressed = 0;
                         /* Number of warnings suppressed so far.        */
Index: alloc.c
===================================================================
RCS file: /cvsroot/bdwgc/bdwgc/alloc.c,v
retrieving revision 1.37
diff -u -r1.37 alloc.c
--- alloc.c	30 Sep 2009 17:47:48 -0000	1.37
+++ alloc.c	1 Oct 2009 19:50:51 -0000
@@ -105,7 +105,7 @@
 
 /* some more variables */
 
-signed_word GC_bytes_found;     /* Number of reclaimed bytes    */
+extern signed_word GC_bytes_found;     /* Number of reclaimed bytes    */
                                 /* after garbage collection;    */
                                 /* defined in reclaim.c.        */
 
Index: finalize.c
===================================================================
RCS file: /cvsroot/bdwgc/bdwgc/finalize.c,v
retrieving revision 1.26
diff -u -r1.26 finalize.c
--- finalize.c	30 Sep 2009 17:47:48 -0000	1.26
+++ finalize.c	1 Oct 2009 19:50:51 -0000
@@ -493,7 +493,7 @@
   STATIC word GC_old_dl_entries = 0; /* for stats printing */
 #endif
 
-unsigned GC_fail_count;
+extern unsigned GC_fail_count;
                         /* How many consecutive GC/expansion failures?  */
                         /* Reset by GC_allochblk(); defined in alloc.c. */
 
Index: mallocx.c
===================================================================
RCS file: /cvsroot/bdwgc/bdwgc/mallocx.c,v
retrieving revision 1.22
diff -u -r1.22 mallocx.c
--- mallocx.c	30 Sep 2009 17:47:48 -0000	1.22
+++ mallocx.c	1 Oct 2009 19:50:51 -0000
@@ -234,7 +234,7 @@
 
 #if defined(THREADS)
 
-signed_word GC_bytes_found; /* protected by GC lock; defined in reclaim.c */
+extern signed_word GC_bytes_found; /* protected by GC lock; defined in reclaim.c */
 
 #ifdef PARALLEL_MARK
 volatile signed_word GC_bytes_allocd_tmp = 0;
Index: mark_rts.c
===================================================================
RCS file: /cvsroot/bdwgc/bdwgc/mark_rts.c,v
retrieving revision 1.19
diff -u -r1.19 mark_rts.c
--- mark_rts.c	30 Sep 2009 18:46:40 -0000	1.19
+++ mark_rts.c	1 Oct 2009 19:50:51 -0000
@@ -716,7 +716,7 @@
 }
 
 #ifdef THREAD_LOCAL_ALLOC
-  GC_bool GC_world_stopped; /* defined in alloc.c */
+  extern GC_bool GC_world_stopped; /* defined in alloc.c */
 #endif
 
 /*
Index: thread_local_alloc.c
===================================================================
RCS file: /cvsroot/bdwgc/bdwgc/thread_local_alloc.c,v
retrieving revision 1.27
diff -u -r1.27 thread_local_alloc.c
--- thread_local_alloc.c	30 Sep 2009 17:47:48 -0000	1.27
+++ thread_local_alloc.c	1 Oct 2009 19:50:51 -0000
@@ -111,7 +111,7 @@
 }
 
 #ifdef GC_GCJ_SUPPORT
-  ptr_t * GC_gcjobjfreelist; /* defined in gcj_mlc.c. */
+  extern ptr_t * GC_gcjobjfreelist; /* defined in gcj_mlc.c. */
 #endif
 
 /* We hold the allocator lock.  */
@@ -211,7 +211,7 @@
   GC_bool GC_gcj_malloc_initialized; /* defined in gcj_mlc.c. */
 #endif
 
-int GC_gcj_kind; /* defined in gcj_mlc.c. */
+extern int GC_gcj_kind; /* defined in gcj_mlc.c. */
 
 /* Gcj-style allocation without locks is extremely tricky.  The         */
 /* fundamental issue is that we may end up marking a free list, which   */


More information about the Gc mailing list