How to fix mono-1.1.3 so it builds on a PPC



I have managed to get mono-1.1.3 to build on a PPC. Here is the fix:

--- libgc/configure.in  2005-02-14 14:56:11.714446029 -0500
+++ libgc/configure.in- 2005-02-14 14:47:37.728214724 -0500
@@ -72,7 +72,7 @@
     THREADS=posix
     THREADLIBS=-lpthread
     case "$host" in
-     x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* |
x86_64-*-linux* | alpha-*-linux* | s390*-*-linux* | powerpc*-linux*)
+     x86-*-linux* | ia64-*-linux* | i586-*-linux* | i686-*-linux* |
x86_64-*-linux* | alpha-*-linux* | s390*-*-linux*)
        AC_DEFINE(GC_LINUX_THREADS)
        AC_DEFINE(_REENTRANT)
         if test "${enable_parallel_mark}" = yes; then



Discussion
------------
Garnome-2.8.2.1 contains mono-1.04, which built without incident.
mono-1.1.3 fails to compile, complaining about undefined reference to
'GC_local_malloc'. 

What changed?

	./mono/os/gc_wrapper.h

now defines GC_REDIRECT_TO_LOCAL

                           ...
#ifdef HAVE_BOEHM_GC
                                                                                                
        /* libgc specifies this on the command line,
         * so we must define it ourselfs
         */
#       define GC_GCJ_SUPPORT
        /*
         * Local allocation is only beneficial if we have __thread
         * We had to fix a bug with include order in libgc, so only do
         * it if it is the included one.
         */
                                                                                                
#       if defined(HAVE_KW_THREAD) && defined(USE_INCLUDED_LIBGC)
#               define GC_REDIRECT_TO_LOCAL
#       endif

                         ...


which requires THREAD_LOCAL_ALLOC to be defined when building libgc
using pthreads.


-Joseph

-- 
joseph_sacco[at]comcast[dot]net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]